Commit d4883190 authored by huoshizhe's avatar huoshizhe

test: 测试

parent bf078b94
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -28,8 +28,8 @@
"ali-oss": "^6.5.1",
"compressing": "^1.5.0",
"ng-zorro-antd": "^8.5.2",
"node-sass": "4.14.0",
"rxjs": "~6.5.4",
"node-sass": "^4.0.0",
"spark-md5": "^3.0.0",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
......
......@@ -17,7 +17,7 @@
</div>
-->
<div *ngFor='let data of item ;index as i'>
<div *ngFor='let data of item.data ;index as i'>
<span> 卡片{{i+1}}</span>
<app-custom-hot-zone-mini [bgItem]="data.bgItem" [hotZoneItemArr]="data.hotZoneItemArr"
[customTypeGroupArr]="customTypeGroupArr" (save)="saveHotZone(data, $event)" (del)="delHotZone(i)">
......
......@@ -52,14 +52,20 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
ngOnInit() {
this.item = [];
this.item = {
data: []
};
// 获取存储的数据
(<any>window).courseware.getData((data) => {
if (data && data.length) {
this.item = data;
}
if (data) {
if (data.length) {
this.item = { data:data };
} else {
this.item = data;
}
}
this.init();
this.changeDetectorRef.markForCheck();
......@@ -93,12 +99,12 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
/** 删除按钮 */
delHotZone(index: number) {
this.item.splice(index, 1)
this.item.data.splice(index, 1)
}
/** 添加按钮 */
addClick() {
this.item.push({})
this.item.data.push({})
}
/**
......
{
"ver": "1.1.2",
"uuid": "c35bb2f6-f24a-4850-ae44-643f2fdc7541",
"isBundle": false,
"isBundle": true,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"compressionType": {
"android": "default"
},
"optimizeHotUpdate": {
"android": false
},
"inlineSpriteFrames": {
"android": false
},
"isRemoteBundle": {
"android": true
},
"subMetas": {}
}
\ No newline at end of file
......@@ -58,7 +58,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"autoReleaseAssets": true,
"_id": "57ea7c61-9b8b-498a-b024-c98ee9124beb"
"_id": "c1225785-d011-4753-966e-7b08081b71d9"
},
{
"__type__": "cc.Node",
......@@ -1381,7 +1381,7 @@
"__id__": 2
},
"component": "",
"_componentId": "c238bwNxXtAHqIXQECY4nQz",
"_componentId": "f3d0dsNiwBNiI2iHXJ2myfc",
"handler": "onClickAudio",
"customEventData": ""
},
......@@ -1538,7 +1538,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 1,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
......@@ -1999,7 +1999,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 1,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
......@@ -2592,7 +2592,7 @@
"__id__": 2
},
"component": "",
"_componentId": "c238bwNxXtAHqIXQECY4nQz",
"_componentId": "f3d0dsNiwBNiI2iHXJ2myfc",
"handler": "onClickLeft",
"customEventData": ""
},
......@@ -2771,7 +2771,7 @@
"__id__": 2
},
"component": "",
"_componentId": "c238bwNxXtAHqIXQECY4nQz",
"_componentId": "f3d0dsNiwBNiI2iHXJ2myfc",
"handler": "onClickRight",
"customEventData": ""
},
......@@ -3102,7 +3102,7 @@
"_id": "29zXboiXFBKoIV4PQ2liTe"
},
{
"__type__": "c238bwNxXtAHqIXQECY4nQz",
"__type__": "f3d0dsNiwBNiI2iHXJ2myfc",
"_name": "",
"_objFlags": 0,
"node": {
......
{
"ver": "1.2.9",
"uuid": "57ea7c61-9b8b-498a-b024-c98ee9124beb",
"uuid": "c1225785-d011-4753-966e-7b08081b71d9",
"asyncLoadAssets": false,
"autoReleaseAssets": true,
"subMetas": {}
......
......@@ -87,8 +87,15 @@ cc.Class({
}
getData((data) => {
console.log('data:', data);
this.data = (data && data.length) ? data : this.getDefaultData();
if (data) {
if (data.data) {
this.data = data.data;
} else {
this.data = data;
}
} else {
this.data = this.getDefaultData();
}
this.data = JSON.parse(JSON.stringify(this.data))
this.preloadItem()
})
......@@ -107,8 +114,20 @@ cc.Class({
},
getData(cb) {
cb(this.getDefaultData());
getData(func) {
// if (window && window.courseware) {
// window.courseware.getData(func, 'ww03');
// return;
// }
// const middleLayer = cc.find('middleLayer');
// if (middleLayer) {
// const middleLayerComponent = middleLayer.getComponent('middleLayer');
// middleLayerComponent.getData(func);
// return;
// }
func(this.getDefaultData());
},
getDefaultData() {
......
{
"ver": "1.0.8",
"uuid": "c238bc0d-c57b-401e-a217-404098e27433",
"uuid": "f3d0db0d-8b00-4d88-8da2-1d72769b27dc",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
......
{
"title": "play",
"packageName": "org.cocos2d.demo",
"startScene": "57ea7c61-9b8b-498a-b024-c98ee9124beb",
"startScene": "c1225785-d011-4753-966e-7b08081b71d9",
"excludeScenes": [],
"includeSDKBox": false,
"orientation": {
......@@ -19,7 +19,7 @@
"md5Cache": false,
"nativeMd5Cache": true,
"encryptJs": true,
"xxteaKey": "af95a0f7-a8da-4f",
"xxteaKey": "6bbfce23-28b4-4a",
"zipCompressJs": true,
"fb-instant-games": {},
"android": {
......@@ -28,7 +28,8 @@
},
"ios": {
"REMOTE_SERVER_ROOT": "",
"packageName": "org.cocos2d.demo"
"packageName": "org.cocos2d.demo",
"ios_enable_jit": true
},
"mac": {
"REMOTE_SERVER_ROOT": "",
......@@ -50,5 +51,6 @@
"scheme": "https",
"skipRecord": false
},
"appBundle": false
"appBundle": false,
"agreements": {}
}
{
"last-module-event-record-time": 1600677246969,
"last-module-event-record-time": 1636477280768,
"migrate-history": [
"cloud-function"
]
......
{
"ios": {
"sceneName": "Book_Read",
"version": "e5634"
},
"android": {
"sceneName": "Book_Read",
"version": "c8307"
}
}
\ No newline at end of file
{"paths":{"0":["textures/bg_quan_huang",5],"1":["anim/hand",0],"2":["textures/btn_audio-play3",4,1],"3":["textures/bg_move",5],"4":["textures/icon_hand2",5],"5":["textures/bg_number0",4,1],"6":["textures/icon_hand0",4,1],"7":["prefab/hitItem",3],"8":["textures/btn_audio-play2",5],"9":["audios/按钮",1],"10":["textures/btn_last",4,1],"11":["textures/bg_quan_huang",4,1],"13":["textures/bg_bg",5],"14":["textures/icon_play",4,1],"15":["textures/icon_dian",4,1],"16":["textures/bg_background0",4,1],"17":["textures/btn_x",5],"18":["textures/bg_move",4,1],"19":["textures/btn_next",4,1],"20":["textures/bg_quan_lan",4,1],"21":["textures/icon_hand0",5],"22":["textures/bg_quan",5],"23":["textures/icon_play",5],"24":["textures/bg_number0",5],"25":["textures/btn_audio-play1",4,1],"26":["textures/icon_stop",5],"27":["textures/bg_book0",4,1],"28":["textures/btn_audio-play2",4,1],"29":["textures/bg_quan",4,1],"30":["textures/bg_desk0",5],"31":["anim/tips",0],"32":["textures/icon_stop",4,1],"33":["textures/icon_tips",5],"34":["textures/icon_tips",4,1],"35":["textures/btn_next",5],"36":["textures/btn_x",4,1],"37":["textures/btn_audio-play3",5],"38":["textures/btn_audio-play1",5],"39":["textures/bg_bottom",4,1],"40":["textures/bg_bg",4,1],"41":["textures/bg_book0",5],"42":["textures/btn_last",5],"43":["textures/btn_return0",5],"44":["textures/bg_background0",5],"45":["audios/提示",1],"46":["textures/bg_bottom",5],"47":["textures/btn_return0",4,1],"48":["textures/icon_dian",5],"49":["textures/icon_hand",5],"50":["textures/bg_quan_lan",5],"51":["textures/icon_hand",4,1],"52":["textures/icon_hand2",4,1],"53":["fonts/BRLNSDB",2],"54":["textures/bg_desk0",4,1]},"types":["cc.AnimationClip","cc.AudioClip","cc.TTFFont","cc.Prefab","cc.SpriteFrame","cc.Texture2D"],"uuids":["0967eEj6xPVp1laxKrZ65R","11DVptTU5KBL7SS7VsVtA9","11FtUjwdBPs6isc7gNtsEM","17NOlyhqlHZr3Oe8x5NEXF","1dJ365QGFOiJkF38bPaKZy","24JLpmId9IRbSo6hRB65GT","24PnGr62dN0Iq9XKEQSQPf","2c59WNtv5O96Eo3nb2cqgD","36C+u4ix1EgayWvV179Hq+","397xk5O/lNIaZ6vB3t5SGp","48Ezf1pjVCN4pnejf9WfEZ","4bfQh7hGtCvqD9BoCpQouI","576nxhm4tJirAkyY7pEkvr","58+Z76LCRAGLicXK5k3Vx0","5aKNZF2KpCoIEZYqculvhU","5dq6lv7/VL7pup1nwBNCEq","60apvKpHJCLqjXpX/kouBX","61esvO6yJBa7XV8er3GHyp","65mJJDA61FcolKwdRxLOgs","75RqMzHYtMOqaZskYz2YfT","76Ud18+SFPcYAGTyVxTSS5","80k9fNdkRMxoDHuLRZB+Lh","82rjvDi99GO5fRYOvRkLrS","82txnb9hNIbIsJJ6CAdmXu","887AVyKrhPTK8ND133qWil","95QFuuwFZDaJPcgJ4bPtYc","97TFf9cPFEp63gTG9Q247Q","98ZjcIfq1M+7ws0VxEZSxh","98jaJamRFG4YSe4jOqVVgn","9bM2iCli5Ee50siayiv5W0","9caMSFuCNDko8t3umyyCWz","a1PWVSDs5C44E6ICmtDKsM","a643oIgNdO+oJWjJJa2QY9","b3JUv1ev5NQogVlpPt8U2B","b4Fmf1DglJ9rfoGbiNyOqL","b5ogPZnW5AIKqbKLFRHiAz","b7MWZkq6RACKVKEZCKbAsV","b9PeKj6tVKS7J0IeGg1jxY","bb6ljgkrdMFICLw+sx5rft","c2YOfTmqdGypn1fKXzH3/v","c3H4Hzg9tLRqXDozVywS5/","c62iEUrNZPi4f+Wyt9WgLb","d5yS2hQk1JiLVdSupkB84u","d5409Z4OxF94C3Z5OnAi39","dcGvi65s9Lvr15VA2Ysg5o","e0vPTMNadNYbICjdSSmcLA","e1GnxhcB1BvbdL26x+/Tp+","e5T6qVbndI94w3sdv/Znwb","eazI5bztBBx6HecPsGRb9g","edW4Hi7ntPdrQknfNA5fKY","fca8q58wZK+bPXhRrThjM4","56Le79yf1C8JfX1vWJPvPz","615HxoZY1Ba6RuOZ6/3dLI","c5UZcOsJVF858dJc3ouN6x","d1UP0U3GNBV73aRW8bNYjt","ecpdLyjvZBwrvm+cedCcQy"],"scenes":{"db://assets/Book_Read/scene/Book_Read.fire":12},"redirect":[55,0],"deps":["internal"],"packs":{"01a91b421":[1,6],"096b1073e":[7,11,14,15,20,29,31,32,34,36,39,45],"0ada4dbe2":[2,5,9,10,12,16,18,19,25,27,28,40,47],"0dfad8d6f":[0,3,4,8,13,17,21,22,23,24,26,30,33,35,37,38,41,42,43,44,46,48,49,50]},"name":"Book_Read","importBase":"import","nativeBase":"native","debug":false,"isZip":false,"encrypted":false}
\ No newline at end of file
[1,["24PnGr62dN0Iq9XKEQSQPf","80k9fNdkRMxoDHuLRZB+Lh"],["value","_textureSetter"],["cc.SpriteFrame",["cc.AnimationClip",["_name","_duration","sample","wrapMode","curveData"],-1,11]],[[1,0,1,2,3,4,5]],[[[[0,"hand",0.7,30,2,[{},"paths",11,[{},"icon_hand",11,[{},"comps",11,[{},"cc.Sprite",11,[{},"spriteFrame",12,[[[{"frame":0},"value",6,0],[{"frame":0.3333333333333333},"value",6,1],[{"frame":0.6666666666666666},"value",6,2]],11,11,11]]],"props",11,[{},"color",12,[[[{"frame":0,"curve":"constant"},"value",8,[4,4294967295]],[{"frame":0.3333333333333333,"curve":"constant"},"value",8,[4,4289769648]],[{"frame":0.6666666666666666},"value",8,[4,4294967295]]],11,11,11]]],"icon_dian",11,[{},"props",11,[{"position":[{"frame":0,"curve":"constant","value":[-22.199,34.822,0]}]},"scale",12,[[[{"frame":0,"curve":"constant"},"value",8,[0,1,1]],[{"frame":0.3333333333333333,"curve":"constant"},"value",8,[0,1.3,1.3]],[{"frame":0.6666666666666666},"value",8,[0,1,1]]],11,11,11]]]]]]],0,0,[0,0,0],[0,0,0],[0,0,0]],[[{"name":"icon_hand0","rect":[0,0,52,50],"offset":[0,0],"originalSize":[52,50],"capInsets":[0,0,0,0]}],[0],0,[0],[1],[1]]]]
\ No newline at end of file
[1,["ecpdLyjvZBwrvm+cedCcQy","a1PWVSDs5C44E6ICmtDKsM","76Ud18+SFPcYAGTyVxTSS5","11DVptTU5KBL7SS7VsVtA9","b4Fmf1DglJ9rfoGbiNyOqL","9bM2iCli5Ee50siayiv5W0","b7MWZkq6RACKVKEZCKbAsV","5aKNZF2KpCoIEZYqculvhU","a643oIgNdO+oJWjJJa2QY9","5dq6lv7/VL7pup1nwBNCEq","24PnGr62dN0Iq9XKEQSQPf","e0vPTMNadNYbICjdSSmcLA","4bfQh7hGtCvqD9BoCpQouI","c2YOfTmqdGypn1fKXzH3/v","0967eEj6xPVp1laxKrZ65R","82txnb9hNIbIsJJ6CAdmXu","eazI5bztBBx6HecPsGRb9g","fca8q58wZK+bPXhRrThjM4","82rjvDi99GO5fRYOvRkLrS","97TFf9cPFEp63gTG9Q247Q","b3JUv1ev5NQogVlpPt8U2B","61esvO6yJBa7XV8er3GHyp","e1GnxhcB1BvbdL26x+/Tp+"],["node","_spriteFrame","_textureSetter","_defaultClip","root","icon_stop","icon_play","btnX","sprite","hand","handAnim","tipsAnim","quan","data","tipClip","quan_lan","quan_huang"],["cc.SpriteFrame",["cc.Node",["_name","_active","_components","_prefab","_contentSize","_parent","_trs","_children"],1,9,4,5,1,7,2],["cc.Widget",["_alignFlags","_top","_left","_right","_verticalCenter","_horizontalCenter","_isAbsHorizontalCenter","_bottom","_originalWidth","_originalHeight","node"],-7,1],["cc.Sprite",["_sizeMode","_type","node","_materials","_spriteFrame"],1,1,3,6],["cc.Node",["_name","_active","_parent","_components","_prefab","_contentSize","_trs","_children"],1,1,12,4,5,7,2],["cc.PrefabInfo",["fileId","root"],2,1],["cc.Animation",["_enabled","node","_clips"],2,1,3],["cc.Prefab",["_name"],2],["cc.Node",["_name","_active","_parent","_components","_prefab","_contentSize"],1,1,2,4,5],["57f79KAb0tNU7HjHMpUOk2e",["node","quan","tipsAnim","handAnim","hand","sprite","btnX","icon_play","icon_stop","tipClip","quan_lan","quan_huang"],3,1,1,1,1,1,1,1,1,1,6,6,6],["d7912kM6VxIgoOHkOzKc7g4",["node"],3,1],["cc.Button",["node","clickEvents"],3,1,9],["cc.ClickEvent",["_componentId","handler","target"],1,1],["cc.AnimationClip",["_name","_duration","sample","wrapMode","curveData"],-2],["cc.AudioClip",["_name","_native","duration"],0]],[[5,0,1,2],[3,2,3,4,1],[1,0,1,5,2,3,4,6,3],[2,0,2,1,10,4],[1,0,1,5,2,3,4,3],[2,0,2,3,1,7,8,9,10,8],[3,0,2,3,4,2],[7,0,2],[1,0,7,2,3,4,2],[1,0,5,2,3,4,6,2],[4,0,2,7,3,4,5,6,2],[4,0,1,2,3,4,5,6,3],[8,0,1,2,3,4,5,3],[9,0,1,2,3,4,5,6,7,8,9,10,11,1],[5,1,1],[2,0,4,5,6,10,5],[2,0,3,1,10,4],[10,0,1],[3,1,0,2,3,4,3],[3,2,3,1],[11,0,1,1],[12,0,1,2,3],[6,1,2,1],[6,0,1,2,2],[13,0,1,2,3,4,6],[14,0,1,2,4]],[[[[7,"hitItem"],[8,"hitItem",[-11,-12,-13,-14,-15,-16,-17,-18],[[13,-10,-9,-8,-7,-6,-5,-4,-3,-2,19,20,21]],[14,-1],[5,351,93]],[10,"hand",1,[-22,-23],[[-19,[15,18,-35,0.1,false,-20],[17,-21]],1,4,4],[0,"9aI5le42RBv5GR0xkx1QW1",1],[5,78,78],[35.1,-35,0,0,0,0,1,1,1,1]],[2,"btn_x",false,1,[[1,-24,[6],7],[20,-25,[[21,"57f79KAb0tNU7HjHMpUOk2e","onClickHide",1]]],[3,9,-30,-30,-26]],[0,"49bqoo7I9FCKRZC0ySxp3O",1],[5,34,34],[-188.5,59.5,0,0,0,0,1,1,1,1]],[11,"icon_tips",false,1,[[[1,-27,[0],1],-28,[16,33,-53.85499999999999,-51.726,-29]],4,1,4],[0,"3ffMrh7m1CyZDq4KfPs7IU",1],[5,46,67],[206.355,64.726,0,0,0,0,1,1,1,1]],[2,"icon_play",false,1,[[1,-30,[8],9],[3,9,-21.30600000000001,-47.931,-31]],[0,"a3Ou7g0PRAKpk6eoBoqYHr",1],[5,42,25],[-175.806,81.931,0,0,0,0,1,1,1,1]],[2,"icon_stop",false,1,[[1,-32,[10],11],[3,9,-21.578000000000003,-48.06699999999999,-33]],[0,"bdj7Z5C1hG9ZUpslIq23db",1],[5,42,25],[-176.078,82.067,0,0,0,0,1,1,1,1]],[4,"bg_quan",false,1,[[6,0,-34,[12],13],[5,45,-23,-23,-23,-23,170,100,-35]],[0,"f7H0+H+qJGh5CiCBaESrqN",1],[5,397,139]],[4,"bg_quan_old",false,1,[[18,1,0,-36,[3],4],[5,45,-23,-23,-23,-23,170,100,-37]],[0,"5bDJee3rVFeaYgoeDYafmQ",1],[5,397,139]],[22,4,[2]],[12,"sprite",false,1,[-38],[0,"b9fWLpmVVF2qpZu9r009Ps",1],[5,351,93]],[19,10,[5]],[2,"icon_dian",false,2,[[1,-39,[14],15]],[0,"85Cu0e6IdO7rehoMCnMUPa",1],[5,49,49],[-22.199,34,0,0,0,0,1,1,1,1]],[9,"icon_hand",2,[[6,0,-40,[16],17]],[0,"60grmEaEVCx7SsKEadDwBA",1],[5,52,50],[-1.579,19.664,0,0,0,0,1,1,1,1]],[23,false,2,[18]]],0,[0,4,1,0,5,6,0,6,5,0,7,3,0,8,11,0,9,2,0,10,14,0,11,9,0,12,7,0,0,1,0,-1,4,0,-2,8,0,-3,10,0,-4,3,0,-5,5,0,-6,6,0,-7,7,0,-8,2,0,-1,14,0,0,2,0,0,2,0,-1,12,0,-2,13,0,0,3,0,0,3,0,0,3,0,0,4,0,-2,9,0,0,4,0,0,5,0,0,5,0,0,6,0,0,6,0,0,7,0,0,7,0,0,8,0,0,8,0,-1,11,0,0,12,0,0,13,0,13,1,40],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,11,14],[-1,1,-1,-1,1,-1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,14,15,16,3,1,3],[0,4,1,0,5,0,0,6,0,7,0,8,0,2,0,9,0,10,3,11,2,12,1,13,3]],[[{"name":"bg_quan_huang","rect":[35,35,100,100],"offset":[0,0],"originalSize":[170,170],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[14]],[[{"name":"icon_play","rect":[0,0,42,25],"offset":[0,0],"originalSize":[42,25],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[15]],[[{"name":"icon_dian","rect":[0,0,49,49],"offset":[0,0],"originalSize":[49,49],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[16]],[[{"name":"bg_quan_lan","rect":[34,35,100,100],"offset":[-1,0],"originalSize":[170,170],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[17]],[[{"name":"bg_quan","rect":[0,0,170,100],"offset":[0,0],"originalSize":[170,100],"capInsets":[31,31,31,31]}],[0],0,[0],[2],[18]],[[[24,"tips",0.5,40,2,{"props":{"opacity":[{"frame":0,"value":255,"curve":"cubicIn"},{"frame":0.25,"value":0,"curve":"cubicIn"},{"frame":0.5,"value":255}]}}]],0,0,[],[],[]],[[{"name":"icon_stop","rect":[0,0,42,25],"offset":[0,0],"originalSize":[42,25],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[19]],[[{"name":"icon_tips","rect":[0,0,46,67],"offset":[0,0],"originalSize":[46,67],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[20]],[[{"name":"btn_x","rect":[0,0,34,34],"offset":[0,0],"originalSize":[34,34],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[21]],[[{"name":"bg_bottom","rect":[0,0,351,93],"offset":[0,0],"originalSize":[351,93],"capInsets":[0,0,0,0]}],[0],0,[0],[2],[22]],[[[25,"提示",".mp3",1.7487],-1],0,0,[],[],[]]]]
\ No newline at end of file
[1,["ecpdLyjvZBwrvm+cedCcQy","65mJJDA61FcolKwdRxLOgs","c3H4Hzg9tLRqXDozVywS5/","2c59WNtv5O96Eo3nb2cqgD","b9PeKj6tVKS7J0IeGg1jxY","887AVyKrhPTK8ND133qWil","d5yS2hQk1JiLVdSupkB84u","60apvKpHJCLqjXpX/kouBX","98ZjcIfq1M+7ws0VxEZSxh","e5T6qVbndI94w3sdv/Znwb","95QFuuwFZDaJPcgJ4bPtYc","98jaJamRFG4YSe4jOqVVgn","11FtUjwdBPs6isc7gNtsEM","c2YOfTmqdGypn1fKXzH3/v","48Ezf1pjVCN4pnejf9WfEZ","75RqMzHYtMOqaZskYz2YfT","24JLpmId9IRbSo6hRB65GT","397xk5O/lNIaZ6vB3t5SGp","dcGvi65s9Lvr15VA2Ysg5o","17NOlyhqlHZr3Oe8x5NEXF","b5ogPZnW5AIKqbKLFRHiAz","bb6ljgkrdMFICLw+sx5rft","c62iEUrNZPi4f+Wyt9WgLb","36C+u4ix1EgayWvV179Hq+","58+Z76LCRAGLicXK5k3Vx0","d5409Z4OxF94C3Z5OnAi39"],["node","_spriteFrame","_textureSetter","_parent","_N$target","hitPre","btn_audio","movepageNode","pageNumNode","rightNode","leftNode","picTempNode","picNode","btn2","btn1","btn0","scene","btnClip"],[["cc.Node",["_name","_active","_id","_opacity","_contentSize","_parent","_components","_trs","_children","_anchorPoint","_color"],-1,5,1,9,7,2,5,5],"cc.SpriteFrame",["cc.Widget",["_alignFlags","_top","_right","_left","_originalWidth","_originalHeight","node"],-3,1],["cc.Button",["zoomScale","_N$transition","node","clickEvents","_N$target"],1,1,9,1],["cc.Sprite",["_srcBlendFactor","_sizeMode","node","_materials","_spriteFrame"],1,1,3,6],["cc.AudioClip",["_name","_native","duration"],0],["cc.SceneAsset",["_name","asyncLoadAssets"],1],["cc.Node",["_name","_parent","_children","_components","_contentSize","_trs"],2,1,12,9,5,7],["cc.Canvas",["_fitHeight","node","_designResolution"],2,1,5],["c238bwNxXtAHqIXQECY4nQz",["node","picNode","picTempNode","leftNode","rightNode","pageNumNode","movepageNode","btn_audio","btnClip"],3,1,1,1,1,1,1,1,1,6],["5bb7aCdT2RLSYYLIb2z0J6C",["node","btn0","btn1","btn2"],3,1,1,1,1],["cc.ClickEvent",["_componentId","handler","target"],1,1],["fccd421MOxLZq6iwp/QwDAf",["node","borders","hitPre"],3,1,2,6],["cc.Scene",["_name","_active","autoReleaseAssets","_children","_anchorPoint","_trs"],0,2,5,7],["cc.Camera",["_clearFlags","_depth","node"],1,1],["cc.Label",["_string","_N$horizontalAlign","_N$verticalAlign","node","_materials"],0,1,3]],[[4,2,3,4,1],[0,0,5,6,4,7,2],[0,0,5,6,4,2],[0,0,1,5,6,4,9,7,3],[11,0,1,2,3],[0,0,5,8,6,4,7,2],[0,0,1,5,6,4,7,3],[7,0,1,2,3,4,5,2],[2,0,6,2],[3,0,1,2,3,3],[12,0,1,2,1],[4,0,1,2,3,3],[5,0,1,2,4],[6,0,1,3],[0,0,2,8,6,4,7,3],[0,0,5,4,9,7,2],[0,0,5,7,2],[0,0,1,5,8,6,4,7,3],[0,0,3,5,6,4,7,3],[0,0,5,6,10,4,2],[0,0,1,5,6,4,3],[8,0,1,2,2],[2,0,2,1,6,4],[2,0,3,2,1,4,6,6],[2,0,3,1,6,4],[2,0,4,5,6,4],[9,0,1,2,3,4,5,6,7,8,1],[10,0,1,2,3,1],[3,2,3,4,1],[3,2,4,1],[4,0,1,2,3,4,3],[13,0,1,2,3,4,5,4],[14,0,1,2,3],[15,0,1,2,3,4,4]],[[[{"name":"btn_audio-play3","rect":[0,0,82,65],"offset":[0,0],"originalSize":[82,65],"capInsets":[0,0,0,0]}],[1],0,[0],[2],[4]],[[{"name":"bg_number0","rect":[0,0,138,48],"offset":[0,0],"originalSize":[138,48],"capInsets":[0,0,0,0]}],[1],0,[0],[2],[5]],[[[12,"按钮",".mp3",0.130612],-1],0,0,[],[],[]],[[{"name":"btn_last","rect":[0,0,64,68],"offset":[0,0],"originalSize":[64,68],"capInsets":[0,0,0,0]}],[1],0,[0],[2],[6]],[[[13,"Book_Read",null],[14,"Canvas","a5esZu+45LA5mBpvttspPD",[-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22],[[21,false,-1,[5,1280,720]],[8,45,-2],[26,-10,-9,-8,-7,-6,-5,-4,-3,37]],[5,1280,720],[640,360,0,0,0,0,1,1,1,1]],[5,"btn_audio",1,[-29,-30,-31],[[27,-26,-25,-24,-23],[28,-28,[[4,"c238bwNxXtAHqIXQECY4nQz","onClickAudio",1]],-27]],[5,82,65],[0,-325.423,0,0,0,0,1,1,1,1]],[7,"pic",1,[[-35,[15,"items",-36,[5,720,720],[0,0,1],[-360,360,0,0,0,0,1,1,1,1]],-37,-38],1,4,1,1],[[10,-34,[-32,-33],21]],[5,1280,720],[0,0,0,0,0,0,1,1,1,0]],[7,"pic_temp",1,[[-42,[16,"items",-43,[1274,0,0,0,0,0,1,1,1,1]],-44,-45],1,4,1,1],[[10,-41,[-39,-40],27]],[5,1280,720],[-1280,0,0,0,0,0,1,1,1,0]],[17,"bottomPart",false,1,[-47,-48,-49],[[8,36,-46]],[5,351,91],[464.5,-314.5,0,0,0,0,1,1,1,1]],[5,"page_num",1,[-52],[[0,-50,[35],36],[22,33,1.8110000000000355,8.937000000000012,-51]],[5,138,48],[569.189,327.063,0,0,0,0,1,1,1,1]],[2,"movepage",1,[[29,-54,-53]],[5,1280,720]],[6,"btn_left",false,5,[[9,1.1,3,-55,[[4,"c238bwNxXtAHqIXQECY4nQz","onClickLeft",1]]],[0,-56,[30],31]],[5,64,68],[42.455,-7.606,0,0,0,0,1,1,1,0]],[6,"btn_right",false,5,[[9,1.1,3,-57,[[4,"c238bwNxXtAHqIXQECY4nQz","onClickRight",1]]],[0,-58,[32],33]],[5,64,68],[135.449,-6.961,0,0,0,0,1,1,1,0]],[1,"bg_top",1,[[0,-59,[4],5],[23,41,-27,-27,-20,1334,-60]],[5,1334,132],[0,314,0,0,0,0,1,1,1,1]],[18,"btn_return0",0,1,[[0,-61,[8],9],[24,9,6.013000000000034,3.52800000000002,-62]],[5,82,65],[-601.187,330.472,0,0,0,0,1,0.8,0.8,1]],[1,"0",2,[[0,-63,[10],11]],[5,82,65],[0,0.107,0,0,0,0,1,1,1,1]],[1,"1",2,[[0,-64,[12],13]],[5,82,65],[0,0.083,0,0,0,0,1,1,1,1]],[1,"2",2,[[0,-65,[14],15]],[5,82,65],[0,0.107,0,0,0,0,1,1,1,1]],[2,"icon",3,[[11,1,0,-66,[16]],[25,45,636,396,-67]],[5,1280,720]],[3,"bg_move",false,3,[[0,-68,[17],18]],[5,14,720],[0,1,0.5],[-639.807,0,0,0,0,0,1,1,1,1]],[3,"bg_move",false,3,[[0,-69,[19],20]],[5,14,720],[0,0,0.5],[640.413,0,0,0,0,0,1,1,1,1]],[3,"bg_move",false,4,[[0,-70,[23],24]],[5,14,720],[0,1,0.5],[-626,0,0,0,0,0,1,1,1,1]],[3,"bg_move",false,4,[[0,-71,[25],26]],[5,14,720],[0,0,0.5],[626,0,0,0,0,0,1,1,1,1]],[31,"New Node",false,true,[1],[0,0,0],[0,0,0,0,0,0,1,1,1,1]],[1,"Main Camera",1,[[32,7,-1,-72]],[5,1280,720],[0,0,362.85545494732423,0,0,0,1,1,1,1]],[19,"bg",1,[[30,1,0,-73,[0],1]],[4,4294636517],[5,1280,720]],[2,"bg_bg",1,[[0,-74,[2],3]],[5,1280,720]],[1,"bg_book",1,[[0,-75,[6],7]],[5,1160,700],[0,4.06,0,0,0,0,1,1,1,1]],[1,"icon",4,[[11,1,0,-76,[22]]],[5,1266,706],[0,0,0,0,0,0,1,1,1,0]],[20,"bg_bottom",false,5,[[0,-77,[28],29]],[5,351,93]],[2,"text",6,[[33,"0/3",1,1,-78,[34]]],[5,55.61,50.4]]],0,[0,0,1,0,0,1,0,6,2,0,7,7,0,8,6,0,9,9,0,10,8,0,11,4,0,12,3,0,0,1,0,-1,21,0,-2,22,0,-3,23,0,-4,10,0,-5,24,0,-6,7,0,-7,11,0,-8,2,0,-9,3,0,-10,4,0,-11,5,0,-12,6,0,13,14,0,14,13,0,15,12,0,0,2,0,4,2,0,0,2,0,-1,12,0,-2,13,0,-3,14,0,-1,16,0,-2,17,0,0,3,0,-1,15,0,3,3,0,-3,16,0,-4,17,0,-1,18,0,-2,19,0,0,4,0,-1,25,0,3,4,0,-3,18,0,-4,19,0,0,5,0,-1,26,0,-2,8,0,-3,9,0,0,6,0,0,6,0,-1,27,0,4,7,0,0,7,0,0,8,0,0,8,0,0,9,0,0,9,0,0,10,0,0,10,0,0,11,0,0,11,0,0,12,0,0,13,0,0,14,0,0,15,0,0,15,0,0,16,0,0,17,0,0,18,0,0,19,0,0,21,0,0,22,0,0,23,0,0,24,0,0,25,0,0,26,0,0,27,0,16,20,1,3,20,78],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,-1,1,-1,1,5,-1,-1,1,-1,1,5,-1,1,-1,1,-1,1,-1,-1,1,17],[0,2,0,2,0,7,0,8,0,9,0,10,0,11,0,12,0,0,1,0,1,3,0,0,1,0,1,3,0,13,0,14,0,15,0,0,16,17]],[[{"name":"bg_background0","rect":[0,0,1334,132],"offset":[0,0],"originalSize":[1334,132],"capInsets":[0,0,0,0]}],[1],0,[0],[2],[18]],[[{"name":"bg_move","rect":[0,0,14,720],"offset":[0,0],"originalSize":[14,720],"capInsets":[0,22,0,33]}],[1],0,[0],[2],[19]],[[{"name":"btn_next","rect":[0,0,64,68],"offset":[0,0],"originalSize":[64,68],"capInsets":[0,0,0,0]}],[1],0,[0],[2],[20]],[[{"name":"btn_audio-play1","rect":[0,0,82,65],"offset":[0,0],"originalSize":[82,65],"capInsets":[0,0,0,0]}],[1],0,[0],[2],[21]],[[{"name":"bg_book0","rect":[0,0,1160,700],"offset":[0,0],"originalSize":[1160,700],"capInsets":[0,0,0,0]}],[1],0,[0],[2],[22]],[[{"name":"btn_audio-play2","rect":[0,0,82,65],"offset":[0,0],"originalSize":[82,65],"capInsets":[0,0,0,0]}],[1],0,[0],[2],[23]],[[{"name":"bg_bg","rect":[0,0,1280,720],"offset":[0,0],"originalSize":[1280,720],"capInsets":[0,0,0,0]}],[1],0,[0],[2],[24]],[[{"name":"btn_return0","rect":[0,0,82,65],"offset":[0,0],"originalSize":[82,65],"capInsets":[0,0,0,0]}],[1],0,[0],[2],[25]]]]
\ No newline at end of file
{"type":"cc.Texture2D","data":"0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1"}
\ No newline at end of file
[1,["edW4Hi7ntPdrQknfNA5fKY"],["_textureSetter"],["cc.SpriteFrame"],0,[{"name":"icon_hand","rect":[0,0,69,78],"offset":[0,0],"originalSize":[69,78],"capInsets":[0,0,0,0]}],[0],0,[0],[0],[0]]
\ No newline at end of file
[1,["1dJ365QGFOiJkF38bPaKZy"],["_textureSetter"],["cc.SpriteFrame"],0,[{"name":"icon_hand2","rect":[0,2,69,76],"offset":[0,-1],"originalSize":[69,78],"capInsets":[0,0,0,0]}],[0],0,[0],[0],[0]]
\ No newline at end of file
[1,0,0,[["cc.TTFFont",["_name","_native"],1]],[[0,0,1,3]],[[0,"BRLNSDB","BRLNSDB.ttf"],-1],0,0,[],[],[]]
\ No newline at end of file
[1,["9caMSFuCNDko8t3umyyCWz"],["_textureSetter"],["cc.SpriteFrame"],0,[{"name":"bg_desk0","rect":[0,0,1334,663],"offset":[0,0],"originalSize":[1334,663],"capInsets":[0,0,0,0]}],[0],0,[0],[0],[0]]
\ No newline at end of file
window.__require=function t(e,i,n){function o(a,r){if(!i[a]){if(!e[a]){var s=a.split("/");if(s=s[s.length-1],!e[s]){var d="function"==typeof __require&&__require;if(!r&&d)return d(s,!0);if(c)return c(s,!0);throw new Error("Cannot find module '"+a+"'")}a=s}var h=i[a]={exports:{}};e[a][0].call(h.exports,function(t){return o(e[a][1][t]||t)},h,h.exports,t,e,i,n)}return i[a].exports}for(var c="function"==typeof __require&&__require,a=0;a<n.length;a++)o(n[a]);return o}({Book_Read:[function(t,e){"use strict";function i(t,e){var i;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=n(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(i=t[Symbol.iterator]()).next.bind(i)}function n(t,e){if(t){if("string"==typeof t)return o(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}cc._RF.push(e,"c238bwNxXtAHqIXQECY4nQz","Book_Read"),cc.Class({extends:cc.Component,properties:{picNode:{type:cc.Node,default:null},picTempNode:{type:cc.Node,default:null},leftNode:{type:cc.Node,default:null},rightNode:{type:cc.Node,default:null},pageNumNode:{type:cc.Node,default:null},movepageNode:{type:cc.Node,default:null},btn_audio:{type:cc.Node,default:null},btnClip:cc.AudioClip},onLoad:function(){this.initSceneData(),this.initSize()},_imageResList:null,_audioResList:null,_animaResList:null,initSceneData:function(){this._imageResList=[],this._audioResList=[],this._animaResList=[]},_designSize:null,_frameSize:null,_mapScaleMin:null,_mapScaleMax:null,_cocosScale:null,initSize:function(){var t=cc.view.getFrameSize().width/cc.view.getFrameSize().height>=cc.Canvas.instance.designResolution.width/cc.Canvas.instance.designResolution.height;cc.Canvas.instance.fitHeight=t,cc.Canvas.instance.fitWidth=!t;var e=cc.view.getFrameSize();this._frameSize=e,this._designSize=cc.view.getDesignResolutionSize();var i=cc.winSize.width/e.width,n=cc.winSize.height/e.height;this._cocosScale=Math.min(i,n),i=e.width/this._designSize.width,n=e.height/this._designSize.height,this._mapScaleMin=Math.min(i,n)*this._cocosScale,this._mapScaleMax=Math.max(i,n)*this._cocosScale},start:function(){var t=this,e=this.getData.bind(this);window&&window.courseware&&(e=window.courseware.getData),e(function(e){console.log("data:",e),t.data=e&&e.length?e:t.getDefaultData(),t.data=JSON.parse(JSON.stringify(t.data)),t.preloadItem()}),this.picNode.opacity=0,this.leftNode.active=!1,this.rightNode.active=!1},onEnable:function(){cc.systemEvent.on("playAudio",this.onPlayAudio,this)},onDisable:function(){cc.systemEvent.off("playAudio",this.onPlayAudio,this)},getData:function(t){t(this.getDefaultData())},getDefaultData:function(){return JSON.parse(' [{"bgItem":{"url":"http://staging-teach.cdn.ireadabc.com/a962378295f3deb54e9f9329d59aa909.jpg","rect":{"x":427.1,"y":0,"width":1534.81,"height":892}},"hotZoneItemArr":[{"id":"1634813643232","index":0,"audio_url":"http://staging-teach.cdn.ireadabc.com/0b42398a12e1b2f075e9965e4d608765.mp3","itemType":"rect","fontScale":1.86640625,"imgScale":1,"mapScale":1.86640625,"gIdx":"0","useHand":true,"useBorder":true,"rect":{"x":108.92,"y":450.35,"width":290.08,"height":290.08}},{"id":"1634813702995","index":1,"itemType":"rect","fontScale":1.86640625,"imgScale":1,"mapScale":1.86640625,"gIdx":"0","useHand":true,"useBorder":true,"rect":{"x":493.28,"y":408.29,"width":290.08,"height":290.08}},{"id":"1634813712642","index":2,"audio_url":"http://staging-teach.cdn.ireadabc.com/784cd4188bf126d6c3c9395d9a807619.mp3","itemType":"rect","fontScale":1.86640625,"imgScale":1,"mapScale":1.86640625,"gIdx":"0","useHand":true,"useBorder":true,"rect":{"x":789.18,"y":469.21,"width":290.08,"height":290.08}}]},{"bgItem":{"url":"http://staging-teach.cdn.ireadabc.com/281406244e10356325f075522f016ceb.jpg","rect":{"x":427.1,"y":0,"width":1534.81,"height":892}},"hotZoneItemArr":[{"id":"1634813750668","index":0,"itemType":"rect","fontScale":1.86640625,"imgScale":1,"mapScale":1.86640625,"gIdx":"0","useHand":true,"useBorder":true,"rect":{"x":637.6,"y":419.17,"width":100.08,"height":100.08}},{"id":"1634813772152","index":1,"itemType":"rect","fontScale":1.86640625,"imgScale":1,"mapScale":1.86640625,"gIdx":"0","useHand":true,"useBorder":true,"rect":{"x":791.35,"y":398.86,"width":85.57,"height":85.57}},{"id":"1634813784384","index":2,"itemType":"rect","fontScale":1.86640625,"imgScale":1,"mapScale":1.86640625,"gIdx":"0","useHand":true,"useBorder":true,"rect":{"x":898.68,"y":374.21,"width":82.67,"height":82.67}},{"id":"1634813800497","index":3,"itemType":"rect","fontScale":1.86640625,"imgScale":1,"mapScale":1.86640625,"gIdx":"0","useHand":true,"useBorder":true,"rect":{"x":1030.67,"y":342.3,"width":73.97,"height":73.97}}]},{"bgItem":{"url":"http://staging-teach.cdn.ireadabc.com/562f741288227a9a36a7ce63a152278e.jpg","rect":{"x":288.4,"y":0,"width":1058.19,"height":615}},"hotZoneItemArr":[{"id":"1634813836558","index":0,"audio_url":"http://staging-teach.cdn.ireadabc.com/7c1d1540233b6d050eae8215679104a8.mp3","itemType":"rect","fontScale":1.27734375,"imgScale":1,"mapScale":1.27734375,"gIdx":"1","useHand":true,"useBorder":true,"rect":{"x":9.6,"y":305,"width":69,"height":69}},{"id":"1634813857964","index":1,"audio_url":"http://staging-teach.cdn.ireadabc.com/495324991838775e49e3ca6593d432c9.mp3","itemType":"rect","fontScale":1.27734375,"imgScale":1,"mapScale":1.27734375,"gIdx":"1","useHand":true,"useBorder":true,"rect":{"x":115.6,"y":303,"width":67,"height":67}},{"id":"1634813868736","index":2,"audio_url":"http://staging-teach.cdn.ireadabc.com/3d0fea61d5d97f3caf04a9b738a0291b.mp3","itemType":"rect","fontScale":1.27734375,"imgScale":1,"mapScale":1.27734375,"gIdx":"1","useHand":true,"useBorder":true,"rect":{"x":209.6,"y":290,"width":65,"height":65}}]}]')},preloadItem:function(){this.addPreload(),this.preload()},addPreload:function(){for(var t,e=0;e<this.data.length;e++)if((t=this.data[e]).bgItem){this._imageResList.push({url:t.bgItem.url});for(var n,o=i(t.hotZoneItemArr);!(n=o()).done;){var c=n.value;c.pic_url&&this._imageResList.push({url:c.pic_url}),c.audio_url&&this._audioResList.push({url:c.audio_url})}}else this.data.splice(e,1)},preload:function(){var t=this,e=this._imageResList.concat(this._audioResList).concat(this._animaResList);cc.assetManager.loadAny(e,null,null,function(){t.loadEnd(),window&&window.air&&window.air.hideAirClassLoading(),cc.debug.setDisplayStats(!1)})},loadEnd:function(){this.initData(),this.initView()},_cantouch:null,initData:function(){this._cantouch=!0},initView:function(){this.initBg(),this.initPic(),this.initEvent()},initEvent:function(){this.movepageNode.on(cc.Node.EventType.TOUCH_END,this.onTouchEnd,this),cc.systemEvent.on("stopAutoPlay",this.stopAll,this)},initBg:function(){cc.find("Canvas/bg").scale=this._mapScaleMax},initPic:function(){this.picNode.opacity=0,cc.Tween.stopAllByTarget(this.picNode),cc.tween(this.picNode).to(1,{opacity:255},{easing:"cubicInOut"}).start(),this.curPage=0,1==this.data.length?(this.leftNode.active=!1,this.rightNode.active=!1):(this.leftNode.active=!1,this.rightNode.active=!0),this.setContent(this.picNode,this.data[0])},curPage:null,onTouchEnd:function(t){var e=t.touch,i=e.getStartLocation(),n=e.getLocation().x-i.x;n<-100?this.onClickRight():n>100&&this.onClickLeft()},onClickRight:function(){this._cantouch&&(this.curPage+=1,this.curPage==this.data.length&&(this.curPage=0),1==this.curPage&&(this.leftNode.active=!0,this.leftNode.scale=1),this.curPage==this.data.length-1&&(this.rightNode.active=!1),this.leftMove(),cc.audioEngine.play(this.btnClip,!1,.5))},onClickLeft:function(){this._cantouch&&(this.curPage-=1,this.curPage<0&&(this.curPage=2),0==this.curPage&&(this.leftNode.active=!1),this.curPage==this.data.length-2&&(this.rightNode.active=!0,this.rightNode.scale=1),this.rightMove(),cc.audioEngine.play(this.btnClip,!1,.8))},onClickAudio:function(){this.isPlaying?this.stopAll():this.playAll()},playAll:function(){this.isPlaying=!0,this.btn_audio.getComponent("btn_loop").startPlay(),this.picNode.getComponent("picNode").autoTouchAll()},stopAll:function(){this.isPlaying=!1,this.btn_audio.getComponent("btn_loop").stopPlay(),this.picNode.getComponent("picNode").stopTouchAll()},leftMove:function(){var t=this;this.stopAudio(),this._cantouch=!1;var e=cc.winSize.width+64;this.picNode.x=0,this.picTempNode.x=e,this.setContent(this.picTempNode,this.data[this.curPage]),cc.tween(this.picNode).to(1,{x:-e},{easing:"cubicInOut"}).start(),cc.tween(this.picTempNode).to(1,{x:0},{easing:"cubicInOut"}).call(function(){var e=t.picNode;t.picNode=t.picTempNode,t.picTempNode=e,t._cantouch=!0}).start()},rightMove:function(){var t=this;this.stopAudio(),this._cantouch=!1;var e=cc.winSize.width+64;this.picNode.x=0,this.picTempNode.x=-e,this.setContent(this.picTempNode,this.data[this.curPage]),cc.tween(this.picNode).to(1,{x:e},{easing:"cubicInOut"}).start(),cc.tween(this.picTempNode).to(1,{x:0},{easing:"cubicInOut"}).call(function(){var e=t.picNode;t.picNode=t.picTempNode,t.picTempNode=e,t._cantouch=!0}).start()},stopAudio:function(){cc.systemEvent.emit("stopMusic")},setContent:function(t,e){if(e){var i=e.hotZoneItemArr.every(function(t){return!t.audio_url});this.btn_audio.active=!i,t.getComponent("picNode").initWithData(e)}else console.log("\u6570\u636e\u9519\u8bef")},update:function(){this.pageNumNode.getChildByName("text").getComponent(cc.Label).string=this.curPage%this.data.length+1+"/"+this.data.length}}),cc._RF.pop()},{}],NewScript:[function(t,e,i){"use strict";cc._RF.push(e,"81db34s2BVIkad9VlHVTckt","NewScript");var n,o=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),c=this&&this.__decorate||function(t,e,i,n){var o,c=arguments.length,a=c<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(a=(c<3?o(a):c>3?o(e,i,a):o(e,i))||a);return c>3&&a&&Object.defineProperty(e,i,a),a};Object.defineProperty(i,"__esModule",{value:!0});var a=cc._decorator,r=a.ccclass,s=a.property,d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.label=null,e.text="hello",e}return o(e,t),e.prototype.start=function(){cc.color(),this.node.off(cc.Node.EventType.MOUSE_DOWN),cc.systemEvent.emit("stopMusic")},e.prototype.onEnable=function(){this.node.removeAllChildren()},c([s(cc.Label)],e.prototype,"label",void 0),c([s],e.prototype,"text",void 0),c([r],e)}(cc.Component);i.default=d,cc._RF.pop()},{}],btn_loop:[function(t,e){"use strict";cc._RF.push(e,"5bb7aCdT2RLSYYLIb2z0J6C","btn_loop"),cc.Class({extends:cc.Component,properties:{btn0:cc.Node,btn1:cc.Node,btn2:cc.Node},onLoad:function(){this.isPlaying=!1,this.count=-1},startPlay:function(){this.isPlaying=!0},stopPlay:function(){this.isPlaying=!1},start:function(){},update:function(){this.isPlaying?(this.count/20%3==0?(this.btn0.active=!0,this.btn1.active=!1,this.btn2.active=!1):this.count/20%3==1?(this.btn0.active=!1,this.btn1.active=!0,this.btn2.active=!1):this.count/20%3==2&&(this.btn0.active=!1,this.btn1.active=!1,this.btn2.active=!0),this.count=this.count+1):(this.btn0.active=!1,this.btn1.active=!1,this.btn2.active=!0)}}),cc._RF.pop()},{}],btn_rotate:[function(t,e){"use strict";cc._RF.push(e,"d7912kM6VxIgoOHkOzKc7g4","btn_rotate"),cc.Class({extends:cc.Component,properties:{},onLoad:function(){this.node},play:function(){var t=cc.repeatForever(cc.sequence(cc.rotateTo(.1,-5),cc.rotateTo(.1,0),cc.rotateTo(.1,5),cc.rotateTo(.1,0),cc.rotateTo(.1,-5),cc.rotateTo(.1,0),cc.rotateTo(.1,5),cc.rotateTo(.1,0),cc.rotateTo(.1,0),cc.rotateTo(.1,0),cc.rotateTo(.1,0),cc.rotateTo(.1,0)));this.node.runAction(t)},stop:function(){this.node.stopAllActions()},start:function(){},update:function(){}}),cc._RF.pop()},{}],defaultData:[function(t,e,i){"use strict";cc._RF.push(e,"c41b05RVddEPK86siw92bnl","defaultData"),i.__esModule=!0,i.defaultData=void 0,i.defaultData={pic_url:"http://staging-teach.cdn.ireadabc.com/ed94332a503c31e0908bd4c6923a2665.png",pic_url_2:"http://staging-teach.cdn.ireadabc.com/5fb60317ade0195d35ad8034d5370a7f.png",text:"This is a test label.",audio_url:"http://staging-teach.cdn.ireadabc.com/f47f1d7b5c160fe1c59500d180346240.mp3"},cc._RF.pop()},{}],hitItem:[function(t,e){"use strict";function i(t,e){var i;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=n(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(i=t[Symbol.iterator]()).next.bind(i)}function n(t,e){if(t){if("string"==typeof t)return o(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}cc._RF.push(e,"57f79KAb0tNU7HjHMpUOk2e","hitItem");var c,a=t("../script/tools");cc.Class({extends:cc.Component,properties:{quan:cc.Node,tipsAnim:cc.Animation,handAnim:cc.Animation,hand:cc.Node,sprite:cc.Sprite,tipClip:cc.AudioClip,btnX:cc.Node,icon_play:cc.Node,icon_stop:cc.Node,quan_lan:cc.SpriteFrame,quan_huang:cc.SpriteFrame},data:null,onLoad:function(){this._playing=!1,this.quan.active=!1,this.tipsAnim.node.active=!1,this.hand.active=!1,this.icon_stop.active=!1},onEnable:function(){this.node.on(cc.Node.EventType.TOUCH_START,this.onTouchStart,this)},onDisable:function(){this.node.off(cc.Node.EventType.TOUCH_START,this.onTouchStart,this)},initWithData:function(t,e){this.data=t;var n=this.data.rect;this.node.x=(n.x+n.width/2)/e,this.node.y=(-n.y-n.height/2)/e,this.node.width=n.width/e*.8,this.node.height=n.height/e*.8,this.sprite.node.active=!1,t.useHand&&(this.hand.active=!0,this.hand.getComponent("btn_rotate").play());for(var o,c=i(this.getComponentsInChildren(cc.Widget));!(o=c()).done;)o.value.updateAlignment();this.audioId=null},onTouchStart:function(){var t=this;return new Promise(function(e){if(!t.data.audio_url)return t.hand.active=!1,t.stopAudio(),void(t.data.useBorder&&(t.quan.active=!0));if(t._playing||t.audioId){if(t._playing=!1,t.icon_play.active=!0,t.icon_stop.active=!1,!t.audioId)return;return cc.audioEngine.stop(t.audioId),void(t.audioId=null)}if(t.data&&(t.quan.getComponent(cc.Sprite).spriteFrame=t.quan_lan,t.icon_stop.active=!0,t.icon_play.active=!1,t.data.pic_url&&0==t.data.gIdx&&a.getSpriteFrimeByUrl(t.data.pic_url,function(e){t.sprite.spriteFrame=e,t.sprite.node.width=t.node.width,t.sprite.node.height=t.node.height,t.sprite.node.active=!0}),t.data.useBorder&&(t.quan.active=!0),t.hand.getComponent("btn_rotate").stop(),t.hand.active=!1,c=t,!t._playing)){if(t._playing=!0,cc.systemEvent.once("stopMusic",t.onStopAudio,t),c!=t)return void(t._playing=!1);var i=t.data.audio_url;i&&""!=i?t.playAudio(i):t._playing=!1}t.timer&&clearInterval(t.timer),t.timer=setInterval(function(){t._playing||(t.timer&&clearInterval(t.timer),t.timer=null,e(""))},60)})},onClickHide:function(){this.sprite.node.active=!1,this.hideBox()},hideBox:function(){this.quan.active=!1,this.icon_stop.active=!1,this.stopAudio()},playAudio:function(t){var e=this;cc.assetManager.loadRemote(t,function(t,i){t||e._playing&&(e.audioId=cc.audioEngine.play(i,!1,.8),cc.audioEngine.setFinishCallback(e.audioId,e.stopAudio.bind(e)))})},onStopAudio:function(){this._playing=!1,this.stopAudio()},stopAudio:function(){this._playing=!1,null!=this.audioId&&(cc.audioEngine.stop(this.audioId),this.audioId=null),this.quan.getComponent(cc.Sprite).spriteFrame=this.quan_huang,this.icon_stop.active=!1,cc.systemEvent.off("stopMusic",this.onStopAudio,this)},audioId:null}),cc._RF.pop()},{"../script/tools":"tools"}],picNode:[function(t,e){"use strict";function i(t,e){var i;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=n(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(i=t[Symbol.iterator]()).next.bind(i)}function n(t,e){if(t){if("string"==typeof t)return o(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}cc._RF.push(e,"fccd421MOxLZq6iwp/QwDAf","picNode");var c=t("../script/tools");cc.Class({extends:cc.Component,properties:{hitPre:cc.Prefab,borders:[cc.Node]},onLoad:function(){this._hitItem=[],this._items=this.node.getChildByName("items"),this._sprite=this.getComponentInChildren(cc.Sprite),this.borders[0].active=!1,this.borders[1].active=!1},initWithData:function(t){var e=this;this.clearItems(),c.getSpriteFrimeByUrl(t.bgItem.url,function(n){var o,c=n.getRect(),a=c.width/c.height,r=cc.size(1084,630),s=r.width/r.height;if(a<s){a=c.height/r.height;var d=c.width/a;e.node.width=d,e.node.height=r.height}else a>s?(a=c.width/r.width,e.node.height=c.height/a,e.node.width=r.width):(a=c.width/r.width,e.node.width=r.width,e.node.height=r.height);e._sprite.spriteFrame=n,e._sprite.node.width=e.node.width,e._sprite.node.height=e.node.height,e._items.width=e.node.width,e._items.height=e.node.height,e._items.x=-e.node.width/2,e._sprite.node.y=30,e._items.y=e.node.height/2+e._sprite.node.y,a=t.bgItem.rect.width/e.node.width;for(var h,u=i(t.hotZoneItemArr);!(h=u()).done;){var l=h.value;o=cc.instantiate(e.hitPre),e._items.addChild(o),o.getComponent("hitItem").initWithData(l,a),e._hitItem.push(o)}})},autoTouchAll:function(){this.autoPlay||(this.autoPlay=!0,this.items=this._items.children,this.count=0,this.play())},play:function(){var t=this;if(!this.autoPlay)return cc.systemEvent.emit("stopAutoPlay");var e=this.items[this.count++];if(!e)return cc.systemEvent.emit("stopAutoPlay");e.getComponent("hitItem").onTouchStart().then(function(){t.play()})},stopTouchAll:function(){this.autoPlay&&(this.autoPlay=!1,cc.systemEvent.emit("stopMusic"))},clearItems:function(){this._items.removeAllChildren(!0),this._hitItem.length=0}}),cc._RF.pop()},{"../script/tools":"tools"}],tools:[function(t,e){"use strict";cc._RF.push(e,"689472Q4ERI/4vOZw24YzaB","tools");var i={getSpriteFrimeByUrl:function(t,e){cc.loader.load({url:t},function(t,i){var n=new cc.SpriteFrame(i);e&&e(n)})}};e.exports=i,cc._RF.pop()},{}]},{},["Book_Read","hitItem","picNode","NewScript","btn_loop","btn_rotate","defaultData","tools"]);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment