Commit bbe9220d authored by liujiangnan's avatar liujiangnan

feat: 兼容多剧本

parent 914e24ee
......@@ -81,13 +81,13 @@
"_active": true,
"_components": [
{
"__id__": 48
"__id__": 45
},
{
"__id__": 49
"__id__": 46
},
{
"__id__": 50
"__id__": 47
}
],
"_prefab": null,
......@@ -770,15 +770,21 @@
},
{
"__id__": 22
},
{
"__id__": 33
},
{
"__id__": 35
}
],
"_active": true,
"_components": [
{
"__id__": 46
"__id__": 43
},
{
"__id__": 47
"__id__": 44
}
],
"_prefab": null,
......@@ -1079,7 +1085,7 @@
},
{
"__type__": "cc.Node",
"_name": "layout",
"_name": "item",
"_objFlags": 0,
"_parent": {
"__id__": 15
......@@ -1089,88 +1095,19 @@
"__id__": 23
},
{
"__id__": 34
}
],
"_active": true,
"_components": [
{
"__id__": 45
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1005,
"height": 500
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-506.881,
4.345,
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": "56/sBtC7VFHJJGC9pGUtu3"
},
{
"__type__": "cc.Node",
"_name": "item",
"_objFlags": 0,
"_parent": {
"__id__": 22
},
"_children": [
{
"__id__": 24
},
{
"__id__": 26
"__id__": 25
},
{
"__id__": 28
"__id__": 27
},
{
"__id__": 30
"__id__": 29
}
],
"_active": true,
"_components": [
{
"__id__": 33
"__id__": 32
}
],
"_prefab": null,
......@@ -1196,7 +1133,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
210,
-410,
0,
0,
0,
......@@ -1219,20 +1156,20 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "12/+NrSahHYq/w0E8Is+4s"
"_id": "3eQYdC1q1EeIQmInZLMQYz"
},
{
"__type__": "cc.Node",
"_name": "bg_color",
"_objFlags": 0,
"_parent": {
"__id__": 23
"__id__": 22
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 25
"__id__": 24
}
],
"_prefab": null,
......@@ -1281,14 +1218,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "71w7fTdttP85A4Mf7ez/Wb"
"_id": "2cWOJO4M5B+LDw4WxceOYN"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
"__id__": 23
},
"_enabled": true,
"_materials": [
......@@ -1313,20 +1250,20 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "a4WWbhmlFCDotihPPJheiC"
"_id": "3cE57OuzNKAbRWUg5NYc+3"
},
{
"__type__": "cc.Node",
"_name": "icon",
"_objFlags": 0,
"_parent": {
"__id__": 23
"__id__": 22
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 27
"__id__": 26
}
],
"_prefab": null,
......@@ -1375,14 +1312,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "71K3SHYplIeLHh6E74FliR"
"_id": "99vy3EHmxH/7FgWBLwNKM+"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 26
"__id__": 25
},
"_enabled": true,
"_materials": [
......@@ -1407,20 +1344,20 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "f8DwVJcixO2YjrdQgNvESo"
"_id": "f9lHRe5jROWaFdHUOxY0gr"
},
{
"__type__": "cc.Node",
"_name": "bg",
"_objFlags": 0,
"_parent": {
"__id__": 23
"__id__": 22
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 29
"__id__": 28
}
],
"_prefab": null,
......@@ -1469,14 +1406,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "9c4jkmJFZIYpBgbetbRvKw"
"_id": "bdcFJ0EO1HoaQN4lPdJtAM"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 28
"__id__": 27
},
"_enabled": true,
"_materials": [
......@@ -1501,23 +1438,23 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "eecpkfrH1KBLZsNy7rbmQS"
"_id": "ffkn6fnyFHqLIlXfVUmPud"
},
{
"__type__": "cc.Node",
"_name": "title",
"_objFlags": 0,
"_parent": {
"__id__": 23
"__id__": 22
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 31
"__id__": 30
},
{
"__id__": 32
"__id__": 31
}
],
"_prefab": null,
......@@ -1566,14 +1503,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "e6z6BzTX9E/IgdFGFmw4Fj"
"_id": "07MTmVvRlEsaceRKeTbgrr"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 30
"__id__": 29
},
"_enabled": true,
"_materials": [
......@@ -1601,14 +1538,14 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "32c78sDTpLX7pdhhIvl5Gc"
"_id": "8eq1F5deRJgYBVyi0iBWZ/"
},
{
"__type__": "cc.LabelOutline",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 30
"__id__": 29
},
"_enabled": true,
"_color": {
......@@ -1619,14 +1556,14 @@
"a": 255
},
"_width": 2,
"_id": "8eaa0nc7JBn52XL2XbxZ+s"
"_id": "9evA1ZurdM1Z0jxeobeIOZ"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 23
"__id__": 22
},
"_enabled": true,
"_normalMaterial": null,
......@@ -1687,35 +1624,22 @@
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 23
"__id__": 22
},
"_id": "a66Q8YZLlAVJMWzKZARhFE"
"_id": "d9O0zJFQxNXIzJb7vDgXkS"
},
{
"__type__": "cc.Node",
"_name": "item",
"_name": "layout",
"_objFlags": 0,
"_parent": {
"__id__": 22
},
"_children": [
{
"__id__": 35
},
{
"__id__": 37
},
{
"__id__": 39
"__id__": 15
},
{
"__id__": 41
}
],
"_children": [],
"_active": true,
"_components": [
{
"__id__": 44
"__id__": 34
}
],
"_prefab": null,
......@@ -1729,20 +1653,20 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 420,
"height": 490
"width": -165,
"height": 500
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
795,
0,
-506.881,
4.345,
0,
0,
0,
......@@ -1764,47 +1688,86 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "4bfjd5K5dNcrMisJBzD2ZY"
"_id": "56/sBtC7VFHJJGC9pGUtu3"
},
{
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 33
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": -165,
"height": 500
},
"_resize": 1,
"_N$layoutType": 1,
"_N$cellSize": {
"__type__": "cc.Size",
"width": 40,
"height": 40
},
"_N$startAxis": 0,
"_N$paddingLeft": 0,
"_N$paddingRight": 0,
"_N$paddingTop": 0,
"_N$paddingBottom": 0,
"_N$spacingX": 165,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "8f2vVQWD9OzJB3Oz8AeFno"
},
{
"__type__": "cc.Node",
"_name": "bg_color",
"_name": "scrollview",
"_objFlags": 0,
"_parent": {
"__id__": 34
"__id__": 15
},
"_children": [],
"_children": [
{
"__id__": 36
}
],
"_active": true,
"_components": [
{
"__id__": 36
"__id__": 41
},
{
"__id__": 42
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 253,
"g": 168,
"b": 49,
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 320,
"height": 370
"width": 1334,
"height": 600
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-667,
0,
40.175,
0,
0,
0,
......@@ -1826,52 +1789,27 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "54DvFG5aBCr7epm2LwgevJ"
"_id": "2b/bhRvQ1J94cFg+vlopfi"
},
{
"__type__": "cc.Sprite",
"_name": "",
"__type__": "cc.Node",
"_name": "view",
"_objFlags": 0,
"node": {
"_parent": {
"__id__": 35
},
"_enabled": true,
"_materials": [
"_children": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
"__id__": 37
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "e5c3i7nj9MwYaFF5/1RHrO"
},
{
"__type__": "cc.Node",
"_name": "icon",
"_objFlags": 0,
"_parent": {
"__id__": 34
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 38
"__id__": 39
},
{
"__id__": 40
}
],
"_prefab": null,
......@@ -1885,12 +1823,12 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 320,
"height": 370
"width": 1334,
"height": 600
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"x": 0,
"y": 0.5
},
"_trs": {
......@@ -1898,7 +1836,7 @@
"ctor": "Float64Array",
"array": [
0,
40.175,
0,
0,
0,
0,
......@@ -1920,52 +1858,20 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "72ScUUDqVMO63dDmLAywI/"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 37
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "97aPpLTclIjZcKAOpzL4PA"
"_id": "8azFI6U59N0Z4ImGUxHVcc"
},
{
"__type__": "cc.Node",
"_name": "bg",
"_name": "content",
"_objFlags": 0,
"_parent": {
"__id__": 34
"__id__": 36
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 40
"__id__": 38
}
],
"_prefab": null,
......@@ -1979,12 +1885,12 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 415,
"height": 477
"width": 440,
"height": 600
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"x": 0,
"y": 0.5
},
"_trs": {
......@@ -2014,111 +1920,46 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "0fNAMSpLVP+JYiiOHaeZIc"
"_id": "76NQAjHttF7ITGxuj2ePxg"
},
{
"__type__": "cc.Sprite",
"__type__": "cc.Layout",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 39
"__id__": 37
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a567032b-3f3a-41ad-8c14-5b2e20a5c9b1"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "146VOaDWFDZYHWoJKPa4CO"
},
{
"__type__": "cc.Node",
"_name": "title",
"_objFlags": 0,
"_parent": {
"__id__": 34
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 42
},
{
"__id__": 43
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"_layoutSize": {
"__type__": "cc.Size",
"width": 214,
"height": 54.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
-165.231,
0,
0,
0,
0,
1,
1,
1,
1
]
"width": 300,
"height": 200
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
"_resize": 1,
"_N$layoutType": 1,
"_N$cellSize": {
"__type__": "cc.Size",
"width": 40,
"height": 40
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "deoV3+Mg9KiZ6VyZc8/NmS"
"_N$startAxis": 0,
"_N$paddingLeft": 100,
"_N$paddingRight": 100,
"_N$paddingTop": 0,
"_N$paddingBottom": 0,
"_N$spacingX": 50,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "2bty5tu9dGZYF5H0k/B+Su"
},
{
"__type__": "cc.Label",
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 41
"__id__": 36
},
"_enabled": true,
"_materials": [
......@@ -2126,147 +1967,92 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "小红帽历险记",
"_N$string": "小红帽历险记",
"_fontSize": 35,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "013bd6df-3d03-41c1-9a89-e5911eb73164"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "bcoYeQWoNHn5J6sLCV6T7f"
"_spriteFrame": null,
"_type": 0,
"_segments": 64,
"_N$alphaThreshold": 0,
"_N$inverted": false,
"_id": "fcNCjIm/pLBqJ2Ovz7/dDx"
},
{
"__type__": "cc.LabelOutline",
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 41
"__id__": 36
},
"_enabled": true,
"_color": {
"__type__": "cc.Color",
"r": 66,
"g": 166,
"b": 24,
"a": 255
},
"_width": 2,
"_id": "e3vazYs4JGXKRMEZNK3A8u"
"alignMode": 1,
"_target": null,
"_alignFlags": 40,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 240,
"_originalHeight": 0,
"_id": "1ceO2daqdAIK5EPiVlRkUh"
},
{
"__type__": "cc.Button",
"__type__": "cc.ScrollView",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 34
"__id__": 35
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
"horizontal": true,
"vertical": false,
"inertia": true,
"brake": 0.75,
"elastic": true,
"bounceDuration": 0.23,
"scrollEvents": [],
"cancelInnerEvents": true,
"_N$content": {
"__id__": 37
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 34
"content": {
"__id__": 37
},
"_id": "05jE/VrAxK+LI/9suQUwuT"
"_N$horizontalScrollBar": null,
"_N$verticalScrollBar": null,
"_id": "72uaWMfJpDF5mCjOmnj3/t"
},
{
"__type__": "cc.Layout",
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 22
"__id__": 35
},
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 1005,
"height": 500
},
"_resize": 1,
"_N$layoutType": 1,
"_N$cellSize": {
"__type__": "cc.Size",
"width": 40,
"height": 40
},
"_N$startAxis": 0,
"_N$paddingLeft": 0,
"_N$paddingRight": 0,
"_N$paddingTop": 0,
"_N$paddingBottom": 0,
"_N$spacingX": 165,
"_N$spacingY": 0,
"_N$verticalDirection": 1,
"_N$horizontalDirection": 0,
"_N$affectedByScale": false,
"_id": "8f2vVQWD9OzJB3Oz8AeFno"
"alignMode": 1,
"_target": null,
"_alignFlags": 40,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 240,
"_originalHeight": 0,
"_id": "94dH5/mbBG2oKFaNmezkfS"
},
{
"__type__": "d4badAh1ItHILlMpvAfCvjP",
......
......@@ -8,13 +8,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
addPreloadImage() {
// TODO 根据自己的配置预加载图片资源
this._imageResList.push({ url: this.data.pic_url });
this._imageResList.push({ url: this.data.pic_url_2 });
}
addPreloadAudio() {
// TODO 根据自己的配置预加载音频资源
this._audioResList.push({ url: this.data.audio_url });
}
addPreloadAnima() {
......@@ -52,10 +49,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
});
}
toPage1(testData = null) {
testData = { left: this.data.left, right: this.data.right };
this.page1.active = true;
this.page1.getComponent('page1').setData(testData)
this.page1.getComponent('page1').setData(this.data)
}
playLocalAudio(audioName) {
......
......@@ -12,7 +12,7 @@ export default class NewClass extends cc.Component {
private list: Array<{ img, name, id }>;
//TODO:入口方法
public setData(val) {
this.list = [val.left, val.right];
this.list = val;
this.initView();
}
//TODO:点击事件
......@@ -25,14 +25,25 @@ export default class NewClass extends cc.Component {
}
private layout: cc.Node;
private item: cc.Node;
onLoad() {
this.item = this.node.getChildByName("item");
this.item.active = false;
this.layout = this.node.getChildByName("layout");
}
initView() {
let children = this.layout.children;
this.list.forEach((data, index) => {
let item = children[index];
if (this.list.length < 3) {
this.layout = this.node.getChildByName("layout");
this.layout.width = this.list.length == 2 ? 880 : 440;
} else {
let scrollview = this.node.getChildByName("scrollview");
let view = scrollview.getChildByName("view");
this.layout = view.getChildByName("content");
}
this.list.forEach((data) => {
let item = cc.instantiate(this.item);
this.updateItem(item, data);
this.layout.addChild(item)
})
}
updateItem(item: any, data) {
......@@ -45,8 +56,6 @@ export default class NewClass extends cc.Component {
title.getComponent(cc.Label).string = data.name;
item.on(cc.Node.EventType.TOUCH_END, this.onTouchItem, this);
}
setNetImg(item, url, { w, h }) {
return new Promise((resolve, reject) => {
if (!item) return console.log("图片更换失败,传入了错误的item");
......
// 新剧本地图页
export const defaultData = {
//左右两个
left: {
export const defaultData = [
{
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '小红帽历险记',
id: 1234,
},
right: {
},{
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '大红帽历险记',
id: 1235,
},
//固定3个
eventList: [{
},{
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '小红帽历险记',
totalIcon: 0,
locked: false,
id: 1234,
}, {
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '中红帽历险记',
totalIcon: 100,
locked: false,
name: '三红帽历险记',
id: 1235,
}, {
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '大红帽历险记',
totalIcon: 100,
locked: true,
id: 1236,
}],
//游戏列表
gameList: [{
},{
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '小红帽历险记1',
locked: false,
id: 1231,
}, {
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '小红帽历险记2',
locked: false,
id: 1232,
}, {
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '小红帽历险记3',
locked: false,
id: 1233,
}, {
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '小红帽历险记4',
locked: false,
id: 1234,
}, {
img: 'http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg',
name: '小红帽历险记5',
locked: false,
name: '四红帽历险记',
id: 1235,
}],
}
},
]
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