Commit 5016642d authored by 唐鑫's avatar 唐鑫

bug处理

parent 90dbaf92
......@@ -15,21 +15,20 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
item;
customTypeGroupArr = [
// {
// name: '发音图片',
// pic: true,
// audio: true,
// },
{
name: '发音图片',
pic: true,
audio: true,
},
{
name: '发音区块',
name: '热区',//发音区块
rect: true,
audio: true,
},
{
name: "热区",
rect: true
}
// {
// name: "热区",
// rect: true
// }
]
constructor(private appRef: ApplicationRef, private changeDetectorRef: ChangeDetectorRef) {
......
......@@ -16,19 +16,19 @@
{
"frame": 0,
"value": {
"__uuid__": "562deefd-c9fd-42f0-97d7-d6f5893ef3f3"
"__uuid__": "243e71ab-eb67-4dd0-8abd-5ca1104903df"
}
},
{
"frame": 0.3333333333333333,
"value": {
"__uuid__": "61e47c68-658d-416b-a46e-399ebfddd2c8"
"__uuid__": "243e71ab-eb67-4dd0-8abd-5ca1104903df"
}
},
{
"frame": 0.6666666666666666,
"value": {
"__uuid__": "562deefd-c9fd-42f0-97d7-d6f5893ef3f3"
"__uuid__": "243e71ab-eb67-4dd0-8abd-5ca1104903df"
}
}
]
......
......@@ -45,11 +45,11 @@
"_active": true,
"_components": [
{
"__id__": 45
"__id__": 43
}
],
"_prefab": {
"__id__": 46
"__id__": 44
},
"_opacity": 255,
"_color": {
......@@ -1147,22 +1147,22 @@
},
{
"__id__": 36
},
{
"__id__": 39
}
],
"_active": true,
"_components": [
{
"__id__": 42
"__id__": 39
},
{
"__id__": 43
"__id__": 40
},
{
"__id__": 41
}
],
"_prefab": {
"__id__": 44
"__id__": 42
},
"_opacity": 255,
"_color": {
......@@ -1345,8 +1345,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 60,
"height": 70
"width": 52,
"height": 50
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -1357,8 +1357,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0.435,
-1.306,
-1.579,
19.664,
0,
0,
0,
......@@ -1425,113 +1425,6 @@
"fileId": "60grmEaEVCx7SsKEadDwBA",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "icon_hand_old",
"_objFlags": 0,
"_parent": {
"__id__": 32
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 40
}
],
"_prefab": {
"__id__": 41
},
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 69,
"height": 78
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": ""
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "562deefd-c9fd-42f0-97d7-d6f5893ef3f3"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__uuid__": "2ce7d58d-b6fe-4ef7-a128-de76f672a803"
},
"fileId": "b6EBayLo9DCrkpa2CYD+lG",
"sync": false
},
{
"__type__": "cc.Animation",
"_name": "",
......@@ -1539,7 +1432,7 @@
"node": {
"__id__": 32
},
"_enabled": true,
"_enabled": false,
"_defaultClip": {
"__uuid__": "110d5a6d-4d4e-4a04-bed2-4bb56c56d03d"
},
......@@ -1578,6 +1471,16 @@
"_originalHeight": 0,
"_id": ""
},
{
"__type__": "d7912kM6VxIgoOHkOzKc7g4",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
},
"_enabled": true,
"_id": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {
......@@ -1604,7 +1507,10 @@
"__id__": 4
},
"handAnim": {
"__id__": 42
"__id__": 39
},
"hand": {
"__id__": 32
},
"sprite": {
"__id__": 12
......
......@@ -77,6 +77,12 @@
{
"__id__": 7
},
{
"__id__": 9
},
{
"__id__": 12
},
{
"__id__": 14
},
......@@ -84,31 +90,31 @@
"__id__": 16
},
{
"__id__": 18
"__id__": 19
},
{
"__id__": 28
"__id__": 29
},
{
"__id__": 38
"__id__": 39
},
{
"__id__": 47
"__id__": 48
},
{
"__id__": 59
"__id__": 60
}
],
"_active": true,
"_components": [
{
"__id__": 63
"__id__": 65
},
{
"__id__": 64
"__id__": 66
},
{
"__id__": 65
"__id__": 67
}
],
"_prefab": null,
......@@ -351,86 +357,18 @@
"_atlas": null,
"_id": "eaS1JEsKZJk5kn9K13PwO5"
},
{
"__type__": "cc.Node",
"_name": "bg0",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 8
},
{
"__id__": 10
},
{
"__id__": 12
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "2cLPHZ55pGB4S7biD1cfpU"
},
{
"__type__": "cc.Node",
"_name": "bg_bg",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
"__id__": 8
}
],
"_prefab": null,
......@@ -486,7 +424,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
"__id__": 7
},
"_enabled": true,
"_materials": [
......@@ -515,14 +453,17 @@
},
{
"__type__": "cc.Node",
"_name": "bg_background0",
"_name": "bg_top",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 10
},
{
"__id__": 11
}
......@@ -551,7 +492,7 @@
"ctor": "Float64Array",
"array": [
0,
336.467,
314,
0,
0,
0,
......@@ -580,7 +521,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
"__id__": 9
},
"_enabled": true,
"_materials": [
......@@ -607,12 +548,39 @@
"_atlas": null,
"_id": "bbEpp1vc1EWJg6BB8jOW1N"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 9
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 1,
"_left": 0,
"_right": 0,
"_top": -20,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "64VLnTwUFGwKD+MCQpWnxr"
},
{
"__type__": "cc.Node",
"_name": "bg_book0",
"_name": "bg_book",
"_objFlags": 0,
"_parent": {
"__id__": 7
"__id__": 2
},
"_children": [],
"_active": true,
......@@ -845,6 +813,9 @@
"_components": [
{
"__id__": 17
},
{
"__id__": 18
}
],
"_prefab": null,
......@@ -927,6 +898,33 @@
"_atlas": null,
"_id": "d2podFg/xK0L8sn0S7+ngq"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 1,
"_left": 0,
"_right": 0,
"_top": 3.52800000000002,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "04MhEJX1JJW5qP2xO0/5Ik"
},
{
"__type__": "cc.Node",
"_name": "btn_audio",
......@@ -936,22 +934,22 @@
},
"_children": [
{
"__id__": 19
"__id__": 20
},
{
"__id__": 21
"__id__": 22
},
{
"__id__": 23
"__id__": 24
}
],
"_active": true,
"_components": [
{
"__id__": 25
"__id__": 26
},
{
"__id__": 26
"__id__": 27
}
],
"_prefab": null,
......@@ -1007,13 +1005,13 @@
"_name": "0",
"_objFlags": 0,
"_parent": {
"__id__": 18
"__id__": 19
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 20
"__id__": 21
}
],
"_prefab": null,
......@@ -1069,7 +1067,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 19
"__id__": 20
},
"_enabled": true,
"_materials": [
......@@ -1101,13 +1099,13 @@
"_name": "1",
"_objFlags": 0,
"_parent": {
"__id__": 18
"__id__": 19
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 22
"__id__": 23
}
],
"_prefab": null,
......@@ -1163,7 +1161,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 21
"__id__": 22
},
"_enabled": true,
"_materials": [
......@@ -1195,13 +1193,13 @@
"_name": "2",
"_objFlags": 0,
"_parent": {
"__id__": 18
"__id__": 19
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 24
"__id__": 25
}
],
"_prefab": null,
......@@ -1257,7 +1255,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
"__id__": 24
},
"_enabled": true,
"_materials": [
......@@ -1289,17 +1287,17 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
"__id__": 19
},
"_enabled": true,
"btn0": {
"__id__": 19
"__id__": 20
},
"btn1": {
"__id__": 21
"__id__": 22
},
"btn2": {
"__id__": 23
"__id__": 24
},
"_id": "e8TJXgO+9BVaJxqHj7bagF"
},
......@@ -1308,7 +1306,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
"__id__": 19
},
"_enabled": true,
"_normalMaterial": null,
......@@ -1317,7 +1315,7 @@
"zoomScale": 1.2,
"clickEvents": [
{
"__id__": 27
"__id__": 28
}
],
"_N$interactable": true,
......@@ -1373,7 +1371,7 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 18
"__id__": 19
},
"_id": "ede/L01tZPn5z0KzF82UmH"
},
......@@ -1396,22 +1394,22 @@
},
"_children": [
{
"__id__": 29
"__id__": 30
},
{
"__id__": 32
"__id__": 33
},
{
"__id__": 33
"__id__": 34
},
{
"__id__": 35
"__id__": 36
}
],
"_active": true,
"_components": [
{
"__id__": 37
"__id__": 38
}
],
"_prefab": null,
......@@ -1467,16 +1465,16 @@
"_name": "icon",
"_objFlags": 0,
"_parent": {
"__id__": 28
"__id__": 29
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 30
"__id__": 31
},
{
"__id__": 31
"__id__": 32
}
],
"_prefab": null,
......@@ -1532,7 +1530,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 29
"__id__": 30
},
"_enabled": true,
"_materials": [
......@@ -1562,7 +1560,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 29
"__id__": 30
},
"_enabled": true,
"alignMode": 1,
......@@ -1589,7 +1587,7 @@
"_name": "items",
"_objFlags": 0,
"_parent": {
"__id__": 28
"__id__": 29
},
"_children": [],
"_active": true,
......@@ -1647,13 +1645,13 @@
"_name": "bg_move",
"_objFlags": 0,
"_parent": {
"__id__": 28
"__id__": 29
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 34
"__id__": 35
}
],
"_prefab": null,
......@@ -1709,7 +1707,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 33
"__id__": 34
},
"_enabled": true,
"_materials": [
......@@ -1741,13 +1739,13 @@
"_name": "bg_move",
"_objFlags": 0,
"_parent": {
"__id__": 28
"__id__": 29
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 36
"__id__": 37
}
],
"_prefab": null,
......@@ -1803,7 +1801,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
"__id__": 36
},
"_enabled": true,
"_materials": [
......@@ -1835,7 +1833,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 28
"__id__": 29
},
"_enabled": true,
"hitPre": {
......@@ -1843,10 +1841,10 @@
},
"borders": [
{
"__id__": 33
"__id__": 34
},
{
"__id__": 35
"__id__": 36
}
],
"_id": "25htXxEOZC+47ROkvoLV/U"
......@@ -1860,22 +1858,22 @@
},
"_children": [
{
"__id__": 39
"__id__": 40
},
{
"__id__": 41
"__id__": 42
},
{
"__id__": 42
"__id__": 43
},
{
"__id__": 44
"__id__": 45
}
],
"_active": true,
"_components": [
{
"__id__": 46
"__id__": 47
}
],
"_prefab": null,
......@@ -1931,13 +1929,13 @@
"_name": "icon",
"_objFlags": 0,
"_parent": {
"__id__": 38
"__id__": 39
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 40
"__id__": 41
}
],
"_prefab": null,
......@@ -1993,7 +1991,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
"__id__": 40
},
"_enabled": true,
"_materials": [
......@@ -2023,7 +2021,7 @@
"_name": "items",
"_objFlags": 0,
"_parent": {
"__id__": 38
"__id__": 39
},
"_children": [],
"_active": true,
......@@ -2081,13 +2079,13 @@
"_name": "bg_move",
"_objFlags": 0,
"_parent": {
"__id__": 38
"__id__": 39
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 43
"__id__": 44
}
],
"_prefab": null,
......@@ -2143,7 +2141,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 42
"__id__": 43
},
"_enabled": true,
"_materials": [
......@@ -2175,13 +2173,13 @@
"_name": "bg_move",
"_objFlags": 0,
"_parent": {
"__id__": 38
"__id__": 39
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 45
"__id__": 46
}
],
"_prefab": null,
......@@ -2237,7 +2235,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 44
"__id__": 45
},
"_enabled": true,
"_materials": [
......@@ -2269,7 +2267,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 38
"__id__": 39
},
"_enabled": true,
"hitPre": {
......@@ -2277,10 +2275,10 @@
},
"borders": [
{
"__id__": 42
"__id__": 43
},
{
"__id__": 44
"__id__": 45
}
],
"_id": "89aCQ7yHtOn4s8onn5MbAu"
......@@ -2294,19 +2292,19 @@
},
"_children": [
{
"__id__": 48
"__id__": 49
},
{
"__id__": 50
"__id__": 51
},
{
"__id__": 54
"__id__": 55
}
],
"_active": false,
"_components": [
{
"__id__": 58
"__id__": 59
}
],
"_prefab": null,
......@@ -2362,13 +2360,13 @@
"_name": "bg_bottom",
"_objFlags": 0,
"_parent": {
"__id__": 47
"__id__": 48
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 49
"__id__": 50
}
],
"_prefab": null,
......@@ -2424,7 +2422,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 48
"__id__": 49
},
"_enabled": true,
"_materials": [
......@@ -2456,16 +2454,16 @@
"_name": "btn_left",
"_objFlags": 0,
"_parent": {
"__id__": 47
"__id__": 48
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 51
"__id__": 52
},
{
"__id__": 53
"__id__": 54
}
],
"_prefab": null,
......@@ -2521,7 +2519,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 50
"__id__": 51
},
"_enabled": true,
"_normalMaterial": null,
......@@ -2530,7 +2528,7 @@
"zoomScale": 1.1,
"clickEvents": [
{
"__id__": 52
"__id__": 53
}
],
"_N$interactable": true,
......@@ -2603,7 +2601,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 50
"__id__": 51
},
"_enabled": true,
"_materials": [
......@@ -2635,16 +2633,16 @@
"_name": "btn_right",
"_objFlags": 0,
"_parent": {
"__id__": 47
"__id__": 48
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 55
"__id__": 56
},
{
"__id__": 57
"__id__": 58
}
],
"_prefab": null,
......@@ -2700,7 +2698,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 54
"__id__": 55
},
"_enabled": true,
"_normalMaterial": null,
......@@ -2709,7 +2707,7 @@
"zoomScale": 1.1,
"clickEvents": [
{
"__id__": 56
"__id__": 57
}
],
"_N$interactable": true,
......@@ -2782,7 +2780,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 54
"__id__": 55
},
"_enabled": true,
"_materials": [
......@@ -2814,7 +2812,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 47
"__id__": 48
},
"_enabled": true,
"alignMode": 1,
......@@ -2845,13 +2843,16 @@
},
"_children": [
{
"__id__": 60
"__id__": 61
}
],
"_active": true,
"_components": [
{
"__id__": 62
"__id__": 63
},
{
"__id__": 64
}
],
"_prefab": null,
......@@ -2907,13 +2908,13 @@
"_name": "text",
"_objFlags": 0,
"_parent": {
"__id__": 59
"__id__": 60
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 61
"__id__": 62
}
],
"_prefab": null,
......@@ -2969,7 +2970,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 60
"__id__": 61
},
"_enabled": true,
"_materials": [
......@@ -3002,7 +3003,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 59
"__id__": 60
},
"_enabled": true,
"_materials": [
......@@ -3029,6 +3030,33 @@
"_atlas": null,
"_id": "a8EmADfV9Mz5J5TBPEtt49"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 60
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 1,
"_left": 0,
"_right": 0,
"_top": 8.937000000000012,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "adAZnzFWpAu6z1qtGmPfZR"
},
{
"__type__": "cc.Canvas",
"_name": "",
......@@ -3082,25 +3110,25 @@
},
"_enabled": true,
"picNode": {
"__id__": 28
"__id__": 29
},
"picTempNode": {
"__id__": 38
"__id__": 39
},
"leftNode": {
"__id__": 50
"__id__": 51
},
"rightNode": {
"__id__": 54
"__id__": 55
},
"pageNumNode": {
"__id__": 59
"__id__": 60
},
"movepageNode": {
"__id__": 14
},
"btn_audio": {
"__id__": 18
"__id__": 19
},
"btnClip": {
"__uuid__": "39ef1939-3bf9-4d21-a67a-bc1dede521a9"
......
......@@ -112,7 +112,7 @@ cc.Class({
},
getDefaultData() {
const dataJson = ' [{"bgItem":{"url":"http://staging-teach.cdn.ireadabc.com/a962378295f3deb54e9f9329d59aa909.jpg","rect":{"x":298.4,"y":0,"width":1058.19,"height":615}},"hotZoneItemArr":[{"id":"1634813643232","index":0,"audio_url":"http://staging-teach.cdn.ireadabc.com/0b42398a12e1b2f075e9965e4d608765.mp3","itemType":"rect","fontScale":1.29296875,"imgScale":1,"mapScale":1.29296875,"gIdx":"1","useHand":true,"useBorder":true,"rect":{"x":75.1,"y":310.5,"width":200,"height":200}},{"id":"1634813702995","index":1,"audio_url":"http://staging-teach.cdn.ireadabc.com/7934cdcec68eabe639020bad5420d7f8.mp3","itemType":"rect","fontScale":1.29296875,"imgScale":1,"mapScale":1.29296875,"gIdx":"1","useHand":true,"useBorder":true,"rect":{"x":340.1,"y":281.5,"width":200,"height":200}},{"id":"1634813712642","index":2,"audio_url":"http://staging-teach.cdn.ireadabc.com/784cd4188bf126d6c3c9395d9a807619.mp3","itemType":"rect","fontScale":1.29296875,"imgScale":1,"mapScale":1.29296875,"gIdx":"1","useHand":true,"useBorder":true,"rect":{"x":544.11,"y":323.5,"width":200,"height":200}}]},{"bgItem":{"url":"http://staging-teach.cdn.ireadabc.com/281406244e10356325f075522f016ceb.jpg","rect":{"x":288.4,"y":0,"width":1058.19,"height":615}},"hotZoneItemArr":[{"id":"1634813750668","index":0,"audio_url":"http://staging-teach.cdn.ireadabc.com/ec19a2c73ec4fca0bf0458c74381a702.mp3","itemType":"rect","fontScale":1.27734375,"imgScale":1,"mapScale":1.27734375,"gIdx":"1","useHand":true,"useBorder":true,"rect":{"x":439.6,"y":289,"width":69,"height":69}},{"id":"1634813772152","index":1,"audio_url":"http://staging-teach.cdn.ireadabc.com/0e67aa701df18cbb5581ffb81ffa7836.mp3","itemType":"rect","fontScale":1.27734375,"imgScale":1,"mapScale":1.27734375,"gIdx":"1","useHand":true,"useBorder":true,"rect":{"x":545.61,"y":275,"width":59,"height":59}},{"id":"1634813784384","index":2,"audio_url":"http://staging-teach.cdn.ireadabc.com/4c0379bc0f3bd0722874b2e11fb35336.mp3","itemType":"rect","fontScale":1.27734375,"imgScale":1,"mapScale":1.27734375,"gIdx":"1","useHand":true,"useBorder":true,"rect":{"x":619.61,"y":258,"width":57,"height":57}},{"id":"1634813800497","index":3,"audio_url":"http://staging-teach.cdn.ireadabc.com/fe226bc303f03ea994cb9a93d1620284.mp3","itemType":"rect","fontScale":1.27734375,"imgScale":1,"mapScale":1.27734375,"gIdx":"1","useHand":true,"useBorder":true,"rect":{"x":710.61,"y":236,"width":51,"height":51}}]},{"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}}]}]'
const dataJson = ' [{"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}}]}]'
const data = JSON.parse(dataJson);
return data;
},
......@@ -238,6 +238,7 @@ cc.Class({
return;
}
this.curPage -= 1
if (this.curPage < 0) this.curPage = 2;
if (this.curPage == 0) {
this.leftNode.active = false
}
......@@ -326,6 +327,14 @@ cc.Class({
console.log('数据错误')
return
}
let isAllNotAudio = data.hotZoneItemArr.every(dt => {
return !!!dt.audio_url
})
if (isAllNotAudio) {
this.btn_audio.active = false;
} else {
this.btn_audio.active = true;
}
picNode.getComponent('picNode').initWithData(data)
},
......
......@@ -7,6 +7,7 @@ cc.Class({
quan: cc.Node,
tipsAnim: cc.Animation,
handAnim: cc.Animation,
hand: cc.Node,
sprite: cc.Sprite,
tipClip: cc.AudioClip,
btnX: cc.Node,
......@@ -22,7 +23,7 @@ cc.Class({
this._playing = false
this.quan.active = false
this.tipsAnim.node.active = false
this.handAnim.node.active = false
this.hand.active = false
// this.btnX.active = false
this.icon_stop.active = false
},
......@@ -44,8 +45,8 @@ cc.Class({
this.node.height = rect.height / scale
this.sprite.node.active = false
if (data.useHand) {
this.handAnim.node.active = true
this.handAnim.play()
this.hand.active = true
this.hand.getComponent("btn_rotate").play()
}
let comps = this.getComponentsInChildren(cc.Widget)
for (let one of comps) {
......@@ -56,6 +57,14 @@ cc.Class({
onTouchStart() {
return new Promise((resolve, reject) => {
if (!this.data.audio_url) {
this.hand.active = false
this.stopAudio();
if (this.data.useBorder) {
this.quan.active = true
}
return;
}
if (this._playing || this.audioId) {
//增加暂停功能。
this._playing = false;
......@@ -64,6 +73,7 @@ cc.Class({
this.icon_stop.active = false;
if (!this.audioId) return;
cc.audioEngine.stop(this.audioId);
this.audioId = null;
return
}
if (this.data) {
......@@ -82,13 +92,18 @@ cc.Class({
if (this.data.useBorder) {
this.quan.active = true
}
this.handAnim.stop()
this.handAnim.node.active = false
this.hand.getComponent("btn_rotate").stop()
this.hand.active = false
// if (onlyOne && onlyOne != this) {
// onlyOne.hideBox()
// }
onlyOne = this
if (!this._playing) {
this._playing = true
cc.systemEvent.once('stopMusic', this.onStopAudio, this)
let id = cc.audioEngine.play(this.tipClip)
cc.audioEngine.setFinishCallback(id, () => {
// let id = cc.audioEngine.play(this.tipClip)
// cc.audioEngine.setFinishCallback(id, () => {
if (onlyOne != this) {
this._playing = false
return
......@@ -99,13 +114,8 @@ cc.Class({
} else {
this._playing = false
}
})
// })
}
if (onlyOne && onlyOne != this) {
onlyOne.hideBox()
}
onlyOne = this
}
if (this.timer) clearInterval(this.timer);
this.timer = setInterval(() => {
......
// Learn cc.Class:
// - https://docs.cocos.com/creator/manual/en/scripting/class.html
// Learn Attribute:
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
cc.Class({
extends: cc.Component,
properties: {
// foo: {
// // ATTRIBUTES:
// default: null, // The default value will be used only when the component attaching
// // to a node for the first time
// type: cc.SpriteFrame, // optional, default is typeof default
// serializable: true, // optional, default is true
// },
// bar: {
// get () {
// return this._bar;
// },
// set (value) {
// this._bar = value;
// }
// },
},
// LIFE-CYCLE CALLBACKS:
onLoad() {
this.node;
},
play() {
let action = cc.repeatForever(cc.sequence(
cc.rotateTo(0.1, -5),
cc.rotateTo(0.1, 0),
cc.rotateTo(0.1, 5),
cc.rotateTo(0.1, 0),
cc.rotateTo(0.1, -5),
cc.rotateTo(0.1, 0),
cc.rotateTo(0.1, 5),
cc.rotateTo(0.1, 0),
cc.rotateTo(0.1, 0),
cc.rotateTo(0.1, 0),
cc.rotateTo(0.1, 0),
cc.rotateTo(0.1, 0)
));
this.node.runAction(action);
},
stop() {
this.node.stopAllActions();
},
start() {
},
update(dt) { },
});
{
"ver": "1.0.8",
"uuid": "d791290c-e95c-4882-8387-90ecca73b838",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ 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