Commit 21afd251 21afd2514c36084625911424680279ae53fd344b by 金学艇

1.新增历史和收藏界面

1 parent 31fc8e35
[
{
"__type__": "cc.SceneAsset",
"_name": "",
"_objFlags": 0,
"_native": "",
"scene": {
"__id__": 1
}
},
{
"__type__": "cc.Scene",
"_objFlags": 0,
"_parent": null,
"_children": [
{
"__id__": 2
}
],
"_active": false,
"_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,
"y": 0
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_is3DNode": true,
"_groupIndex": 0,
"groupIndex": 0,
"autoReleaseAssets": false,
"_id": "36e68e88-9892-445e-a121-d01b73ffdd6c"
},
{
"__type__": "cc.Node",
"_name": "Canvas",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
},
{
"__id__": 5
},
{
"__id__": 7
},
{
"__id__": 10
},
{
"__id__": 13
},
{
"__id__": 20
},
{
"__id__": 45
},
{
"__id__": 48
}
],
"_active": true,
"_components": [
{
"__id__": 50
},
{
"__id__": 51
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 720
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
640,
360,
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": "cdYufzFHhJl7rOXLb+DJtL"
},
{
"__type__": "cc.Node",
"_name": "Main Camera",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
}
],
"_prefab": null,
"_opacity": 0,
"_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": "Float32Array",
"array": [
0,
0,
271.0659484863281,
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": "99M7M75IFKzoWvG5oeOIh2"
},
{
"__type__": "cc.Camera",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 3
},
"_enabled": true,
"_cullingMask": 4294967295,
"_clearFlags": 7,
"_backgroundColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_depth": -1,
"_zoomRatio": 1,
"_targetTexture": null,
"_fov": 60,
"_orthoSize": 10,
"_nearClip": 1,
"_farClip": 4096,
"_ortho": true,
"_rect": {
"__type__": "cc.Rect",
"x": 0,
"y": 0,
"width": 1,
"height": 1
},
"_renderStages": 1,
"_id": "95HmldDWtAUaCaBAOlepR9"
},
{
"__type__": "cc.Node",
"_name": "Bg",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 6
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1280,
"height": 720
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"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": "4b+jn1Y/VI27MvVQeAWsWj"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 5
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "ed6fe971-2e89-425f-9e8d-30ad0d4d6596"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "0bJanYPL9GTrlCOCqS0XSc"
},
{
"__type__": "cc.Node",
"_name": "New Sprite",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 8
},
{
"__id__": 9
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 195,
"height": 79
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
-506.5,
308.5,
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": "2aDTTt4VND573Fg1DX5r5g"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "af1cc76d-4254-4cc3-b2bc-c0e7026a5059"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "9ehTcbq4lOIb3MQ+u4NMge"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 7
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 36,
"_right": 0,
"_top": 12,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "62oyus3lJEY4hxSlL+3bMp"
},
{
"__type__": "cc.Node",
"_name": "TitleLabel",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 11
},
{
"__id__": 12
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 246,
"g": 254,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 60,
"height": 37.8
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
-530,
317.1000061035156,
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": "95N43/51NONrtOFqzxEAah"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "分类",
"_N$string": "分类",
"_fontSize": 30,
"_lineHeight": 30,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "ackt/J+XZNZp/rJVq2csxX"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 9,
"_left": 80,
"_right": 0,
"_top": 24,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "51VlCee69C7I5r1KIUrxz0"
},
{
"__type__": "cc.Node",
"_name": "TypeListArea",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 14
},
{
"__id__": 16
}
],
"_active": true,
"_components": [
{
"__id__": 19
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 250,
"height": 550
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
-505,
-43,
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": "54GpLg9MROYa0wsr1cDPTB"
},
{
"__type__": "cc.Node",
"_name": "Bg",
"_objFlags": 0,
"_parent": {
"__id__": 13
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 15
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 250,
"height": 550
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"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": "04sPoMQIdBvYX8yRYcoBjX"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 14
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "57Sd6PitBGrbQFnI7bMYEE"
},
{
"__type__": "cc.Node",
"_name": "TypeListWrapper",
"_objFlags": 0,
"_parent": {
"__id__": 13
},
"_children": [
{
"__id__": 17
}
],
"_active": true,
"_components": [
{
"__id__": 18
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 250,
"height": 565
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 1
},
"_position": {
"__type__": "cc.Vec3",
"x": -598,
"y": 0,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
0,
275,
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": "1ev3MDyQRC9IfjRSvOo+xq"
},
{
"__type__": "cc.Node",
"_name": "TypeList",
"_objFlags": 0,
"_parent": {
"__id__": 16
},
"_children": [],
"_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,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"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": "70w9JVerJKo6WH5QHtizcp"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 16
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_spriteFrame": null,
"_type": 0,
"_segments": 64,
"_N$alphaThreshold": 0,
"_N$inverted": false,
"_id": "8eIrbdxN1J74JaekVs4au4"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 13
},
"_enabled": true,
"alignMode": 2,
"_target": null,
"_alignFlags": 9,
"_left": 10,
"_right": 0,
"_top": 128,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "f7A74/rllPQ4wTdc6dTWMg"
},
{
"__type__": "cc.Node",
"_name": "CategoryList",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 21
},
{
"__id__": 24
}
],
"_active": true,
"_components": [
{
"__id__": 44
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1000,
"height": 650
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 107,
"y": -54,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
90,
-35,
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": "42Yns4eY1B3JcH3wTcA+4k"
},
{
"__type__": "cc.Node",
"_name": "DataContainerMask",
"_objFlags": 0,
"_parent": {
"__id__": 20
},
"_children": [
{
"__id__": 22
}
],
"_active": true,
"_components": [
{
"__id__": 23
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1020,
"height": 650
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"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": "672kHUI+pEFo/SxpgxkDNs"
},
{
"__type__": "cc.Node",
"_name": "DataContainer",
"_objFlags": 0,
"_parent": {
"__id__": 21
},
"_children": [],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1000,
"height": 650
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"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": "bcAsjCquRLfKSxbhacL2pO"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 21
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_spriteFrame": null,
"_type": 0,
"_segments": 64,
"_N$alphaThreshold": 1,
"_N$inverted": false,
"_id": "ebCyQKBk9NMLueZXAS4qPT"
},
{
"__type__": "cc.Node",
"_name": "ScrollBarContainer",
"_objFlags": 0,
"_parent": {
"__id__": 20
},
"_children": [
{
"__id__": 25
},
{
"__id__": 27
}
],
"_active": false,
"_components": [
{
"__id__": 42
},
{
"__id__": 43
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 10,
"height": 475
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 440,
"y": 5,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
601.5,
5,
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": "b9mxpzWjBJ7rqDGA6l6VCF"
},
{
"__type__": "cc.Node",
"_name": "ScrollBarHight",
"_objFlags": 0,
"_parent": {
"__id__": 24
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 26
}
],
"_prefab": null,
"_opacity": 100,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2,
"height": 475
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"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": "c7rW/WDgFCTqXacKZQlwf6"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 25
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "64B63JzWFJTKGEmunQrLrJ"
},
{
"__type__": "cc.Node",
"_name": "ScrollBarShadow",
"_objFlags": 0,
"_parent": {
"__id__": 24
},
"_children": [
{
"__id__": 28
}
],
"_active": true,
"_components": [
{
"__id__": 40
},
{
"__id__": 41
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 2,
"height": 94
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
},
"_position": {
"__type__": "cc.Vec3",
"x": 0,
"y": 143.5,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
0,
143.5,
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": "56tSzxQ0NKOaYEYKXfskx2"
},
{
"__type__": "cc.Node",
"_name": "ScrollBarBlock",
"_objFlags": 0,
"_parent": {
"__id__": 27
},
"_children": [
{
"__id__": 29
},
{
"__id__": 32
},
{
"__id__": 35
}
],
"_active": true,
"_components": [
{
"__id__": 38
},
{
"__id__": 39
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 10,
"height": 94
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 0,
"y": 47,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
0,
47,
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": "f5RZZ2rmZOGbpTIDB9Q2kA"
},
{
"__type__": "cc.Node",
"_name": "AU",
"_objFlags": 0,
"_parent": {
"__id__": 28
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 30
},
{
"__id__": 31
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 10,
"height": 12
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 30,
"y": 47,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
30,
47,
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": "49ipjulgtNbKxiGRvYN5aA"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 29
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "900TDgr+lDyoeMAkdFm8QJ"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 29
},
"_enabled": true,
"alignMode": 0,
"_target": null,
"_alignFlags": 12,
"_left": 30,
"_right": 0,
"_top": 41,
"_bottom": 88,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 12,
"_id": "f1HCAllAxG37giHBz9DKPw"
},
{
"__type__": "cc.Node",
"_name": "AD",
"_objFlags": 0,
"_parent": {
"__id__": 28
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 33
},
{
"__id__": 34
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 10,
"height": 13
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 30,
"y": -47,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
30,
-47,
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": "3cXbE8vXtOEbm/Bm7vJbG4"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "ban8EWbBRFLKY8d9Y3fyJ2"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 32
},
"_enabled": true,
"alignMode": 0,
"_target": null,
"_alignFlags": 13,
"_left": 30,
"_right": 0,
"_top": 87.5,
"_bottom": -6.5,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 12,
"_id": "2dZJFmoDFP/q/1HnvepYCU"
},
{
"__type__": "cc.Node",
"_name": "Page",
"_objFlags": 0,
"_parent": {
"__id__": 28
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 36
},
{
"__id__": 37
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 22.68
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 30,
"y": 0,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
30,
-2.3399999141693115,
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": "a034hnTbpAlL/FYlIDb6ru"
},
{
"__type__": "cc.RichText",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
},
"_enabled": true,
"_fontFamily": "Arial",
"_isSystemFontUsed": true,
"_N$string": "",
"_N$horizontalAlign": 1,
"_N$fontSize": 18,
"_N$font": null,
"_N$maxWidth": 0,
"_N$lineHeight": 18,
"_N$imageAtlas": null,
"_N$handleTouchEvent": true,
"_id": "f6IFKqG7dLKaMP90JvuFL4"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 35
},
"_enabled": true,
"alignMode": 0,
"_target": null,
"_alignFlags": 9,
"_left": 35,
"_right": 0,
"_top": 38,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "62Mf6SVulKU5L0K6MQxi2+"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 28
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "51/chf1KRHK7w0yDbE+Db7"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 28
},
"_enabled": true,
"alignMode": 2,
"_target": {
"__id__": 27
},
"_alignFlags": 4,
"_left": -4,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 94,
"_id": "95hY114h9GkICuqXmWecGJ"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "7fCX6n9ndCVpggTH8H+G5E"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 27
},
"_enabled": true,
"alignMode": 2,
"_target": null,
"_alignFlags": 1,
"_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": 0,
"_originalHeight": 0,
"_id": "2bTvBQ1T9Fo6ANY1F6joJk"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
},
"_enabled": true,
"alignMode": 0,
"_target": null,
"_alignFlags": 33,
"_left": 0,
"_right": -30,
"_top": 17.5,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "c81utOPjpLkJv43f22DxQc"
},
{
"__type__": "cc.Mask",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 24
},
"_enabled": false,
"_materials": [],
"_spriteFrame": null,
"_type": 0,
"_segments": 64,
"_N$alphaThreshold": 0,
"_N$inverted": false,
"_id": "53lW61dX9A7bSJMQ1pSvoL"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 20
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 12,
"_left": 230,
"_right": 0,
"_top": 119,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "6aO6FqdHRPtoWCXY9Ka+pq"
},
{
"__type__": "cc.Node",
"_name": "DataPosition",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 46
},
{
"__id__": 47
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 22.68
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 564.5100000000002,
"y": -309,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
564.510009765625,
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": "62WwipK9lLfJbDSp77/9u9"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 45
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "",
"_N$string": "",
"_fontSize": 18,
"_lineHeight": 18,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "a5ElAnezdLS45klqbiIbaY"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 45
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 8,
"_left": 1204.5100000000002,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "91kqf2NwZDvLKeXcGwm4+R"
},
{
"__type__": "cc.Node",
"_name": "BlankIcon",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 49
}
],
"_prefab": null,
"_opacity": 0,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 784,
"height": 448
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_position": {
"__type__": "cc.Vec3",
"x": 110,
"y": 0,
"z": 0
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
94.94999694824219,
-47.474998474121094,
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": "12nyv3O9RDW6JMe750zbWs"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 48
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "cc7ac792-45be-42ad-8b30-e44c2e510d64"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "31UnPjcLFAaaqMGUOu4lte"
},
{
"__type__": "cc.Canvas",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_designResolution": {
"__type__": "cc.Size",
"width": 1280,
"height": 720
},
"_fitWidth": false,
"_fitHeight": true,
"_id": "71oNPYgcBDorPuGjzz03qR"
},
{
"__type__": "d07d49iykZFpZuhN290g2km",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 2
},
"_enabled": true,
"_cLog": null,
"_cApplication": null,
"_cFocus": null,
"_aFocusTargets": [],
"_fiCurrentFocus": null,
"_iSceneStatus": 0,
"_fFocusScaleFactor": 1.06,
"_bIsFocusInit": false,
"_oSceneContext": null,
"_oNextSceneParameter": null,
"_compPlayer": null,
"_aTouchContext": [],
"_defaultBackScene": null,
"_oFocusScaleFactorInfo": null,
"_bShowExitBox": false,
"PFB_COMMON": {
"__uuid__": "9e0214ed-5de0-4667-a660-d4fa85a5de1d"
},
"_id": "c9KsWDV7dCDqN4r3qyoiWq"
}
]
\ No newline at end of file
......@@ -469,7 +469,8 @@ cc.Class({
doCurrentFocusTVLinkAction: function (strAction) {
let strTVLink = this._fiCurrentFocus.getTVLink();
cc.log("tvlink===============" + strTVLink);
let cellData = JSON.stringify(this._fiCurrentFocus.node.getComponent(ListCell)._cellData);
// cc.log("tvlink===============" + JSON.stringify(this._fiCurrentFocus.node.getComponent(ListCell)._cellData));
try {
let oTVLink = JSON.parse(strTVLink);
let aOperationList = oTVLink.click;
......@@ -478,6 +479,7 @@ cc.Class({
switch (aOperationList[i].action) {
case "changeLayout":
default:
aOperationList[i]['parameters']["cellData"] = cellData;
this.doTVLinkAction(aOperationList[i]);
break;
}
......
......@@ -34,6 +34,7 @@ cc.Class({
this._oSceneContext._packageName = "";
this._oSceneContext._className = "";
this._oSceneContext._downloadUrl = "";
this._oSceneContext._cellData = "";
this._oSceneContext._iCurrentLeftIndex = 1;
this._oSceneContext.focusPath = "ButtonOpen";
......@@ -55,10 +56,12 @@ cc.Class({
this._oSceneContext._packageName = aSceneParameter[aSceneParameter.length - 1].packageName;
this._oSceneContext._className = aSceneParameter[aSceneParameter.length - 1].activityName;
this._oSceneContext._downloadUrl = aSceneParameter[aSceneParameter.length - 1].downloadUrl;
this._oSceneContext._cellData = aSceneParameter[aSceneParameter.length - 1].cellData;
} else if (aSceneParameter) {
this._oSceneContext._packageName = aSceneParameter.packageName;
this._oSceneContext._className = aSceneParameter.activityName;
this._oSceneContext._downloadUrl = aSceneParameter.downloadUrl;
this._oSceneContext._cellData = aSceneParameter.cellData;
}
cc.log("类名:" + this._oSceneContext._packageName);
......@@ -84,6 +87,28 @@ cc.Class({
this.initPrefab(); //获取导航栏信息
// this.getTypeList();
this.checkPfbReadyAndInitPage();
this.saveHistory();
},
saveHistory: function () {
var oDataCell = JSON.parse(this._oSceneContext._cellData);
var gameHistory = JSON.parse(cc.sys.localStorage.getItem("gameHistoryList"));
if (gameHistory != null) {
if (-1 == JSON.stringify(gameHistory.resultSet).indexOf(JSON.stringify(oDataCell))) {
gameHistory.resultSet.push(oDataCell);
gameHistory.count++;
cc.sys.localStorage.setItem("gameHistoryList", JSON.stringify(gameHistory));
}
} else {
let oData = {};
oData.businessCode = "success";
oData.count = 1;
oData.resultSet = [];
oData.resultSet.push(oDataCell);
cc.sys.localStorage.setItem("gameHistoryList", JSON.stringify(oData));
}
cc.log("检查存储的数据:" + cc.sys.localStorage.getItem("gameHistoryList"));
},
initPrefab: function () {
......
var Common = require('Common');
var Network = require('Network');
var CCNetwork = require('CCNetwork');
var TVFocus = require('TVFocus');
var CCTVFocus = require('CCTVFocus');
var FocusInfo = require('FocusInfo');
var TVCanvas = require('TVCanvas');
var TVScrollParameter = require('TVScrollParameter');
// var ListView = require('ListView');
var ListView = require('ListView_SimulateData');
var BusinessParameter = require('BusinessParameter');
var ListCell = require('ListCell');
cc.Class({
extends: TVCanvas,
properties: {
PFB_COMMON: {
default: null,
type: cc.Prefab
},
},
onLoad: function () {
this._super();
this._oInit = {};
this._lastFocus = null;
this._oSceneContext._iCurrentLeftIndex = 0;
// this._oSceneContext.focusPath = "TypeListArea/TypeListWrapper/TypeList/topNavi" + this._oSceneContext._iCurrentLeftIndex;
this._bIsDataListMoving = false;
this._bInitCategoryListSuccess = false;
let aSceneParameter = this._cApplication.getSceneParameter();
cc.log("gameDetail->aSceneParameter..." + JSON.stringify(aSceneParameter));
if (aSceneParameter.length) {
this._oSceneContext._iCurrentLeftIndex = aSceneParameter[aSceneParameter.length - 1].currentIndex || 0;
} else if (aSceneParameter) {
this._oSceneContext._iCurrentLeftIndex = aSceneParameter.currentIndex || 0;
}
if (this._cApplication.getBackStatus()) { //返回值放到下方,否则恢复的数据是首页带回来的数值
//恢复上下文 包括
//光标位置 focusPath
let oSceneContext = this._cApplication.popSceneContext();
if (oSceneContext) {
this._oSceneContext = oSceneContext;
cc.log(this._oSceneContext);
}
this._cApplication.setBackStatus(false);
}
cc.log("back status: " + this._oSceneContext._iCurrentLeftIndex);
this._nodeTypeListWrapper = cc.find("TypeListArea/TypeListWrapper", this.node);
this._nodeTypeList = cc.find("TypeList", this._nodeTypeListWrapper);
this._nodeTypeList.addComponent(TVScrollParameter);
//滚动条按钮
// let nodeScrollBtn = cc.find("CategoryList/ScrollBarContainer/ScrollBarShadow/ScrollBarBlock", this.node);
// var fiScrollBtn = nodeScrollBtn.addComponent(FocusInfo);
// this._aFocusTargets[0]['scroll_bar_block'] = nodeScrollBtn;
// fiScrollBtn.init(null, true);
this.getNavList(); //获取导航栏信息
},
getNavList: function () {
var self = this;
this._nodeTypeList.y = 0;
// var oNavParas = {
// 'view': 'json',
// "start": 0,
// "limit": 10,
// "dictionaryCode": "categoryNav",
// "sortField": "sequence",
// "sortDirection": 'asc',
// 'token': Common.TEST_API_TOKEN,
// };
Network.ajax("GET", Common.TOPDRAW_API_SERVER + "historyAndCollect/history_collect_navi.json", null, null,
function (strResponse) {
try {
var oJSONResult = JSON.parse(strResponse);
// var oJSONResult = this.navi_json.json;
// this._cLog.screenI("gameCategory getNavList start..." + JSON.stringify(oJSONResult));
if (oJSONResult.businessCode == 'success') {
this._oInit.aNavList = [];
this._oInit.aTopNaviImg = [];
for (let i = 0; i < oJSONResult.resultSet.length; i++) {
var oProgram = oJSONResult.resultSet[i];
// var oTvlink = JSON.parse(oProgram.description);
let node = cc.instantiate(this.PFB_COMMON);
if (oProgram.image[0] && oProgram.image[0].fileUrl) {
this._oInit.aTopNaviImg.push(Common.TOPDRAW_IMAGE_SERVER + oProgram.image[0].fileUrl);
node.width = oProgram.image[0].width;
node.height = oProgram.image[0].height;
node.getChildByName("Pic").width = oProgram.image[0].width;
node.getChildByName("Pic").height = oProgram.image[0].height;
// cc.loader.loadRes(oProgram.image[0].fileUrl, cc.Texture2D, function (err, texture) {
// node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, oProgram.image[0].width, oProgram.image[0].height));
// if (i == self._oSceneContext._iCurrentLeftIndex) {
// node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, oProgram.image[0].height, oProgram.image[0].width, oProgram.image[0].height));
// }
// });
Network.loadImageInNativeRuntime(
Common.TOPDRAW_IMAGE_SERVER + oProgram.image[0].fileUrl, null,
function (texture, iRequestId) {
node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, oProgram.image[0].width, oProgram.image[0].height));
if (i == self._oSceneContext._iCurrentLeftIndex) {
node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, oProgram.image[0].height * 2, oProgram.image[0].width, oProgram.image[0].height));
}
}, function () { }, this
);
// Network.loadImageInNativeRuntime(Common.TOPDRAW_IMAGE_SERVER + oProgram.image[0].fileUrl, i,
// function (texture, iRequestId) {
// node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, oProgram.image[1].width, oProgram.image[1].height));
// if (i == 1) {
// node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, oProgram.image[1].height, oProgram.image[1].width, oProgram.image[1].height));
// }
// },
// function (texture, iRequestId) {
// },
// );
}
// node.x = node.width / 2 + i * (node.width + 29);
node.y = -node.height / 2 - i * (node.height);
this._nodeTypeList.addChild(node, 10, "topNavi" + i);
//准备焦点坐标
let fiNodeBlock = node.addComponent(FocusInfo);
fiNodeBlock.init(
'', true, null, null, 1.1 //最后一个参数决定要不要放大显示
);
this._aFocusTargets[0]["topNavi" + i] = node;
}
// this._oSceneContext.focusPath = "TypeListArea/TypeListWrapper/TypeList/topNavi" + this._oSceneContext._iCurrentLeftIndex;
this.checkDataReadyAndInitFocus();
// this.requestMediaList(1);
this.getSimulateRequest();
} else {
cc.log("Business Error:getNavList..." + oJSONResult.description);
}
} catch (error) {
cc.log("Business Exception:getNavList..." + error);
}
},
function (strResponse) {
cc.log("Business Error:getNavList..." + strResponse);
}, this, "uuid");
},
getSimulateRequest: function () {
var self = this;
try {
if (this._oSceneContext._iCurrentLeftIndex == 0
&& (this._oInit[this._oSceneContext._iCurrentLeftIndex] == null || this._oInit[this._oSceneContext._iCurrentLeftIndex].resultSet == 0)) {
this._oInit[this._oSceneContext._iCurrentLeftIndex] = cc.sys.localStorage.getItem("gameHistoryList");
if (this._oInit[this._oSceneContext._iCurrentLeftIndex] == null) {
let oData = {};
oData.businessCode = "success";
oData.count = 0;
oData.resultSet = [];
this._oInit[this._oSceneContext._iCurrentLeftIndex] = JSON.stringify(oData);
}
} else if (this._oSceneContext._iCurrentLeftIndex == 1
&& this._oInit[this._oSceneContext._iCurrentLeftIndex] == null) {
this._oInit[this._oSceneContext._iCurrentLeftIndex] = cc.sys.localStorage.getItem("collectList");
}
this.scheduleOnce(function () {
self.requestMediaList(1);
}, 0);
} catch (error) {
cc.log("Business Exception:Get getSimulateRequest..." + error);
}
},
requestMediaList: function (cId) {
var self = this;
if (cId) {
// cc.log("//////////"+requestMediaList);
//把之前的东西删掉
let nodeCategoryList = this.node.getChildByName('CategoryList');
// nodeCategoryList.getChildByName('DataContainerMask').getChildByName('DataContainer').removeAllChildren();
nodeCategoryList.getChildByName('DataContainerMask').getChildByName('DataContainer').destroyAllChildren();
// let strAppId = this._oInit.aNavList[this._oSceneContext.iNaviIndex].appId;
// switch (strAppId) {
// case BusinessParameter.CARTOON_APPID:
this._oSceneContext.focusPath = this._oSceneContext.focusPath || "CategoryList/DataContainerMask/DataContainer/CategoryListCell0";
this._strSongListCellComponentName = "pfbCategoryListCell";
this._iBeginPositionX = -350;
this._iBeginPositionY = 196;
this._iShowCellRows = 3;
this._iAlphaCellRows = 0;
this._iHiddenCellRows = 3;
this._iCellCountEachRow = 4;
this._fCellMarginTop = 0;
this._fCellMarginRight = 24;
this._fCellMarginBottom = 24;
this._fCellMarginLeft = 0;
// break;
// default:
// // this._oSceneContext.focusPath = this._oSceneContext.focusPath || "SongList/DataContainerMask/DataContainer/ListCell0/ImageBlock";
// this._strSongListCellComponentName = "CategoryOtherListCell";
// this._iBeginPositionX = -271;
// this._iBeginPositionY = 166;
// this._iShowCellRows = 3;
// this._iAlphaCellRows = 0;
// this._iHiddenCellRows = 3;
// this._iCellCountEachRow = 3;
// this._fCellMarginTop = 3;
// break;
// }
//重新开始
let lvCategoryList = nodeCategoryList.getComponent(ListView);
if (!lvCategoryList) {
lvCategoryList = nodeCategoryList.addComponent(ListView);
}
lvCategoryList.init(this, this._iShowCellRows, this._iAlphaCellRows, this._iHiddenCellRows, this._iCellCountEachRow, this._strSongListCellComponentName,
this._iBeginPositionX, this._iBeginPositionY,//起始位置
this._fCellMarginTop, this._fCellMarginRight, this._fCellMarginBottom, this._fCellMarginLeft,
1, 1, //0-横向 1-纵向
function () {
this.renderCategoryList(cId);
}
);
// this._strAppId = this._oInit.aNavList[this._oSceneContext.iNaviIndex].appId;
// lvCategoryList.setDataDecorator(
// function (oData, onDecorate, oScope) {
// let aData = oData.refData;
// //造一个跳转tvlink
// for (let i = 0; i < aData.length; i++) {
// //造一个跳转界面
// let tvlink = '{"click": [{"action": "ChangeScene","parameters": {"sceneName":"sceneProgram",\
// "appId":"' + self._strAppId + '","id":"' + aData[i].id + '"}}]}';
// aData[i].tvlink = tvlink;
// }
// if (onDecorate) {
// if (null != oScope) {
// onDecorate.call(oScope, aData);
// } else {
// onDecorate(aData);
// }
// }
// }
// );
// lvCategoryList.setDataPositionRender(function (iPosition, iCount) {
// //这里是ListView的this 执行时作用域
// let nodeDataPosition = self.node.getChildByName('DataPosition');
// if (null == iCount) {
// iCount = parseInt(nodeDataPosition.getComponent(cc.Label).string.split('/')[1]);
// // cc.log(iCount);
// }
// nodeDataPosition.getComponent(cc.Label).string = Math.ceil(Math.min((iPosition + self._iShowCellRows * self._iCellCountEachRow - 1), iCount) / self._iShowCellRows / self._iCellCountEachRow) + " / " + Math.ceil(iCount / self._iShowCellRows / self._iCellCountEachRow);
// nodeDataPosition.x = Common.SCREEN_WIDTH / 2 - 70 - nodeDataPosition.width / 2;
// // this._compSceneCanvas.checkCountAndDisplayTopBtns(iCount);
// });
}
},
renderCategoryList: function (cId) {
// let strAppId = this._oInit.aNavList[this._oSceneContext.iNaviIndex].appId;
let strAppId = "";
let nodeCategoryList = this.node.getChildByName('CategoryList');
//请求列表
let oMediaParas = {};
oMediaParas.categoryId = cId;//
oMediaParas.appId = strAppId;
let iStart1 = 0;
if (null != this._oSceneContext.categoryRecordIndexOfFirstCell) {
iStart1 = this._oSceneContext.categoryRecordIndexOfFirstCell;
}
let lvCategoryList = nodeCategoryList.getComponent(ListView);
//函数默认取一页数据,但是第一次显示需要加上Alpha的部分
lvCategoryList.setDataSource(
"GET",
Common.TOPDRAW_API_SERVER + "Media/List",
oMediaParas,
iStart1, (lvCategoryList.getShowCellRows() + lvCategoryList.getAlphaCellRows()) * lvCategoryList.getCellCountEachRow(),
null, null
);
let strResponse = this._oInit[this._oSceneContext._iCurrentLeftIndex];
lvCategoryList.loadData(
function (strResponse) {
lvCategoryList.renderInitData(strResponse, function () {
var oJSONResult = JSON.parse(strResponse);
if (oJSONResult.resultSet.length <= 0) { //没有数据就显示占位图
cc.find('BlankIcon', this.node).opacity = 255;
} else {
cc.find('BlankIcon', this.node).opacity = 0;
}
this._bInitCategoryListSuccess = true;
this._oSceneContext.categoryRecordIndexOfFirstCell = lvCategoryList.getRecordIndexOfFirstCellInPage();
//如果滚动列表为空,那么焦点放在导航上
if (JSON.parse(this._oInit[this._oSceneContext._iCurrentLeftIndex]).resultSet.length == 0) {
this._oSceneContext.focusPath = "TypeListArea/TypeListWrapper/TypeList/topNavi" + this._oSceneContext._iCurrentLeftIndex;
}
this.checkDataReadyAndInitFocus();
});
}, null, this, strResponse
);
},
checkDataReadyAndInitFocus: function () {
if (!this._bIsFocusInit && this._bInitCategoryListSuccess) {
this.scheduleOnce(() => { //指定0让回调函数在下一帧立即执行
this.initFocus();
}, 0);
this._bIsFocusInit = true;
}
},
//初始化焦点框
initFocus: function () {
var nodeInitFocus = cc.find(this._oSceneContext.focusPath, this.node);
cc.log("初始化 " + nodeInitFocus.name);
var nodeFocus = new cc.Node('nodeFocus');
this.node.addChild(nodeFocus, 10);
this._cFocus = this.node.getChildByName('nodeFocus').addComponent(CCTVFocus);
this._cFocus.init('focusContainer', this,
nodeInitFocus.getComponent(FocusInfo),
Common.SCREEN_WIDTH, Common.SCREEN_HEIGHT, 10, 6, 1.1, true);
this._lastFocus = nodeInitFocus.getComponent(FocusInfo);
if (0 == nodeInitFocus.name.indexOf("topNavi")) {
this._cFocus.hide();
let iIndex = nodeInitFocus.name.replace("topNavi", '');
if (this._oInit.aTopNaviImg[iIndex]) {
Network.loadImageInNativeRuntime(
this._oInit.aTopNaviImg[iIndex], null,
function (texture, iRequestId) {
nodeInitFocus.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, nodeInitFocus.height, nodeInitFocus.width, nodeInitFocus.height));
}, function () { }, this
);
}
}
if (0 == nodeInitFocus.getName().indexOf('CategoryListCell')) {
nodeInitFocus.getChildByName("Normal").active = false;
nodeInitFocus.getChildByName("Name").active = true;
nodeInitFocus.getComponent(ListCell).setUIWithFocus();
}
//处理焦点位于下方问题
if (this._oSceneContext.typeListY) {
this._nodeTypeList.y = this._oSceneContext.typeListY;
}
},
keyDownDirection: function (Direct) {
var fiFocusTarget = null;
var fiCurrentFocus = this._fiCurrentFocus;
var oScrollParameter = null;
let aCheckResult;
fiFocusTarget = this._cFocus.findTarget(fiCurrentFocus, this._aFocusTargets, this._iSceneStatus, Direct);
if (!fiFocusTarget) { return; }
aCheckResult = this.checkFocusTarget(fiFocusTarget, null, Direct);
fiFocusTarget = aCheckResult[0];
oScrollParameter = aCheckResult[1];
this._cFocus.flyFocus(this._fiCurrentFocus, fiFocusTarget, Direct, null, oScrollParameter);
},
checkFocusTarget: function (fiFocusTarget, oScrollParameter, Direct) {
this._cFocus.show();
// cc.log("目标节点:" + fiFocusTarget.node.x);
if (fiFocusTarget && 0 == fiFocusTarget.node.name.indexOf("topNavi")) {
this._cFocus.hide();
if (0 != this._fiCurrentFocus.node.name.indexOf("topNavi")) {//如果不是TypeList之间跳转,则哪里来回哪里去
fiFocusTarget = cc.find("topNavi" + this._oSceneContext._iCurrentLeftIndex, this._nodeTypeList).getComponent(FocusInfo);
}
}
//打补丁,焦点在TypeList向下滑动,会找到category的焦点,禁掉这种
if (0 == this._fiCurrentFocus.node.name.indexOf("topNavi") && 0 != fiFocusTarget.node.name.indexOf("topNavi")
&& Direct == Common.MOVE_DIRECTION_DOWN) {
this._cFocus.hide();
fiFocusTarget = null;
}
//打补丁:Direct != Common.MOVE_DIRECTION_LEFT,右侧categoryCell跳到左侧总会出错
if (fiFocusTarget && 0 == fiFocusTarget.node.name.indexOf("topNavi") && Direct != Common.MOVE_DIRECTION_LEFT) {
if (-fiFocusTarget.node.y + fiFocusTarget.node.height / 2 - this._nodeTypeList.y >= this._nodeTypeListWrapper.height) {
oScrollParameter = this._nodeTypeList.getComponent(TVScrollParameter);
oScrollParameter.setHasRelation(true);
oScrollParameter.setStep(-(-fiFocusTarget.node.y + fiFocusTarget.node.height / 2 - this._nodeTypeList.y) + this._nodeTypeListWrapper.height);
oScrollParameter.setTargetPosition(this._nodeTypeList.y - oScrollParameter.getStep());
this._oSceneContext.nodeTypeListY = this._nodeTypeList.y - oScrollParameter.getStep();
}
if (-fiFocusTarget.node.y - this._nodeTypeList.y - 30 < 0) { //打补丁:30
oScrollParameter = this._nodeTypeList.getComponent(TVScrollParameter);
oScrollParameter.setHasRelation(true);
oScrollParameter.setStep(-fiFocusTarget.node.y - fiFocusTarget.node.height / 2 - this._nodeTypeList.y);
oScrollParameter.setTargetPosition(this._nodeTypeList.y + oScrollParameter.getStep())
this._oSceneContext.nodeTypeListY = this._nodeTypeList.y + oScrollParameter.getStep();
}
}
return [fiFocusTarget, oScrollParameter];
},
onKeyUp: function (event) {
// cc.log(" down->抬起。。。" + this._fiCurrentFocus.node.getName().indexOf('topNavi'));
cc.log("抬起:" + event.keyCode);
if (this._lastFocus != null && 0 == this._lastFocus.node.getName().indexOf('topNavi')
&& 0 == this._fiCurrentFocus.node.getName().indexOf('topNavi')
&& event.keyCode != (Common.ANDROID_KEY.left || cc.macro.KEY.left)) {
this.scheduleOnce(function () {
this.getSimulateRequest();
}, 0);
}
},
onKeyDown: function (event) {
this._super(event);
var fiFocusTarget = null;
var fiCurrentFocus = this._fiCurrentFocus;
this._lastFocus = this._fiCurrentFocus; //存储上一个节点
switch (event.keyCode) {
case cc.macro.KEY.up:
case Common.ANDROID_KEY.up:
// cc.log("变量值:"+this._bIsDataListMoving);
if (this._bIsDataListMoving) {
return;
}
if (0 == this._fiCurrentFocus.node.getName().indexOf('CategoryListCell')) {
var index = parseInt(this._fiCurrentFocus.node.getName().replace('CategoryListCell', ''));
// cc.log("当前时多少条目:" + index);
let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView);
if (lvCategoryList.scrollARowUp(index, this._oInit[this._oSceneContext._iCurrentLeftIndex])) {
this._oSceneContext.categoryRecordIndexOfFirstCell = lvCategoryList.getRecordIndexOfFirstCellInPage();
return;
}
}
this.keyDownDirection(Common.MOVE_DIRECTION_UP);
break;
case cc.macro.KEY.right:
case Common.ANDROID_KEY.right:
this.keyDownDirection(Common.MOVE_DIRECTION_RIGHT);
break;
case cc.macro.KEY.down:
case Common.ANDROID_KEY.down:
if (this._bIsDataListMoving) {
return;
}
if (0 == this._fiCurrentFocus.node.getName().indexOf('CategoryListCell')) {
var index = parseInt(this._fiCurrentFocus.node.getName().replace('CategoryListCell', ''));
let lvCategoryList = this.node.getChildByName('CategoryList').getComponent(ListView);
if (lvCategoryList.scrollARowDown(null, index, this._oInit[this._oSceneContext._iCurrentLeftIndex])) {
this._oSceneContext.categoryRecordIndexOfFirstCell = lvCategoryList.getRecordIndexOfFirstCellInPage();
return;
}
}
this.keyDownDirection(Common.MOVE_DIRECTION_DOWN);
break;
case cc.macro.KEY.left:
case Common.ANDROID_KEY.left:
this.keyDownDirection(Common.MOVE_DIRECTION_LEFT);
break;
case cc.macro.KEY.enter:
case cc.macro.KEY.space:
case Common.ANDROID_KEY.enter:
if (0 == this._fiCurrentFocus.node.name.indexOf('close') || 0 == this._fiCurrentFocus.node.name.indexOf('close_btn')) {
this._iSceneStatus = 0;
cc.find("update", this.node).active = false; //关闭更新面板
let fiAfterNode = cc.find(this._oSceneContext.focusPath, this.node).getComponent(FocusInfo); //热更新按钮
this._cFocus.flyFocus(this._fiCurrentFocus, fiAfterNode, Common.MOVE_DIRECTION_RIGHT, null, null);
}
else {
this.doCurrentFocusTVLinkAction(Common.TV_LINK_ACTION_CLICK);
}
break;
case cc.macro.KEY.backspace:
case Common.ANDROID_KEY.back:
this.backAScene();
break;
}
},
doCurrentFocusTVLinkAction: function (strAction) {
let strTVLink = this._fiCurrentFocus.getTVLink();
let cellData = JSON.stringify(this._fiCurrentFocus.node.getComponent(ListCell)._cellData);
cc.log("tvlink===============" + strTVLink);
try {
let oTVLink = JSON.parse(strTVLink);
let aOperationList = oTVLink.click;
this._oSceneContext._iPageIndex = 1;
for (let i = 0; i < aOperationList.length; i++) {
switch (aOperationList[i].action) {
case "changeLayout":
default:
aOperationList[i]['parameters']["cellData"] = cellData;
this.doTVLinkAction(aOperationList[i]);
break;
}
}
} catch (error) {
cc.log("runTVLinkAction Exception..." + error);
}
},
onBeforeFocusChange: function (event) {
let fiFrom = event.detail.from;
let fiTo = event.detail.to;
if (0 == this._fiCurrentFocus.node.getName().indexOf('topNavi')) {
// fiFrom.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, fiFrom.node.width, fiFrom.node.height));
let iIndex = fiFrom.node.name.replace("topNavi", '');
if (this._oInit.aTopNaviImg[iIndex]) {
if (0 == fiTo.node.getName().indexOf('topNavi')) {
// cc.loader.loadRes(this._oInit.aTopNaviImg[iIndex], cc.Texture2D, function (err, texture) {
// fiFrom.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, fiFrom.node.width, fiFrom.node.height));
// });
Network.loadImageInNativeRuntime(
this._oInit.aTopNaviImg[iIndex], null,
function (texture, iRequestId) {
fiFrom.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, fiFrom.node.width, fiFrom.node.height));
}, function () { }, this
);
} else {
// cc.loader.loadRes(this._oInit.aTopNaviImg[iIndex], cc.Texture2D, function (err, texture) {
// fiFrom.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, fiFrom.node.height * 2, fiFrom.node.width, fiFrom.node.height));
// });
Network.loadImageInNativeRuntime(
this._oInit.aTopNaviImg[iIndex], null,
function (texture, iRequestId) {
fiFrom.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, fiFrom.node.height * 2, fiFrom.node.width, fiFrom.node.height));
}, function () { }, this
);
}
// Network.loadImageInNativeRuntime(
// this._oInit.aLeftImg[iIndex],
// function (texture) {
// fiFrom.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, fiFrom.node.width, fiFrom.node.height));
// }, null, this
// );
}
}
if (0 == fiFrom.node.getName().indexOf('CategoryListCell')) {
fiFrom.node.getChildByName("Normal").active = true;
fiFrom.node.getChildByName("Name").active = false;
fiFrom.node.getComponent(ListCell).setUIWithoutFocus();
}
// if (0 == this._fiCurrentFocus.node.getName().indexOf('TopCell')) {
// // fiFrom.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, fiFrom.node.width, fiFrom.node.height));
// let iIndex = fiFrom.node.name.replace("TopCell", '');
// if (this._oInit.aTopImg[iIndex]) {
// Network.loadImageInNativeRuntime(
// this._oInit.aTopImg[iIndex],
// function (texture) {
// fiFrom.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, fiFrom.node.width, fiFrom.node.height));
// }, null, this
// );
// }
// }
},
onAfterFocusChange: function (event) {
let fiTo = event.detail.to;
let fiFrom = event.detail.from;
if (0 == fiTo.node.getName().indexOf('topNavi')) {
let iIndex = fiTo.node.name.replace("topNavi", '');
// fiTo.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height));
// cc.log(iIndex + " ... " + this._oInit.aTopNaviImg[iIndex]);
if (this._oInit.aTopNaviImg[iIndex]) {
// cc.loader.loadRes(this._oInit.aTopNaviImg[iIndex], cc.Texture2D, function (err, texture) {
// fiTo.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height));
// });
Network.loadImageInNativeRuntime(
this._oInit.aTopNaviImg[iIndex], null,
function (texture, iRequestId) {
fiTo.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height));
}, function () { }, this
);
// Network.loadImageInNativeRuntime(
// this._oInit.aTopNaviImg[iIndex],
// function (texture) {
// fiTo.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height));
// }, null, this
// );
}
if (0 == fiFrom.node.getName().indexOf('topNavi')) {
this._oSceneContext._iCurrentLeftIndex = iIndex;
this._oSceneContext.categoryRecordIndexOfFirstCell = 0; //将列表记录置空
// this.scheduleOnce(function () { //这个放到onKeyUp中去,解决长按导致的焦点丢失
// cc.log("onAfter..." + iIndex);
// // this.requestMediaList(1); //重新渲染CategoryList
// this.getSimulateRequest();
// }, 0);
}
}
if (0 == fiTo.node.getName().indexOf('CategoryListCell')) {
fiTo.node.getChildByName("Normal").active = false;
fiTo.node.getChildByName("Name").active = true;
fiTo.node.getComponent(ListCell).setUIWithFocus();
}
// if (0 == fiTo.node.getName().indexOf('TopCell')) {
// let iIndex = fiTo.node.name.replace("TopCell", '');
// // fiTo.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height));
// if (this._oInit.aTopImg[iIndex]) {
// Network.loadImageInNativeRuntime(
// this._oInit.aTopImg[iIndex],
// function (texture) {
// fiTo.node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height));
// }, null, this
// );
// }
// }
},
onListScrollStart: function () {
this._bIsDataListMoving = true;
// cc.log("scroll start");
},
onListScrollEnd: function () {
this._bIsDataListMoving = false;
// cc.log("scroll completed");
},
});
......@@ -15,6 +15,7 @@ cc.Class({
normalName: cc.Label,
Name: cc.Label,
textScore: cc.Label, //分数
_cellData: null,
},
statics: {
......@@ -32,6 +33,7 @@ cc.Class({
},
render(oData, iRecordIndex) {
this._cellData = oData;
// this.id = oData.id;
// cc.log("categoryList-->name: "+JSON.stringify(oData));
this.activeName1.string = oData.name;
......@@ -65,7 +67,7 @@ cc.Class({
// cc.loader.loadRes(oData.image[0].fileUrl, cc.Texture2D, function (err, texture) {
// self.pic.spriteFrame = new cc.SpriteFrame(texture);
// });
cc.log("pfbCategoryListCell.."+self.pic);
cc.log("pfbCategoryListCell.." + self.pic);
if (self.pic) {
Network.loadImageInNativeRuntime(
Common.TOPDRAW_IMAGE_SERVER + oData.image[0].fileUrl, null,
......
cc.Class({
extends: cc.Component,
properties: {
},
start () {
},
});
......@@ -68,28 +68,10 @@ cc.Class({
this._nodeEpisodeList = cc.find("EpisodeList", this._nodeEpisodeListWrapper);
this._nodeEpisodeList.addComponent(TVScrollParameter);
// this.initPrefab();
this.checkPfbReadyAndInitPage();
this.checkDataReadyAndInitFocus();
},
// initPrefab: function () {
// for (let i = 0; i < 4; i++) {
// let nodeEpisodeCell = cc.instantiate(this.PFB_EPISODE);
// nodeEpisodeCell.x = nodeEpisodeCell.width / 2 + (i) * (nodeEpisodeCell.width + 20);
// this._nodeEpisodeList.addChild(nodeEpisodeCell, 10, "EpisodeListCell" + i);
// let fiEpisodeBlock = nodeEpisodeCell.addComponent(FocusInfo);
// fiEpisodeBlock.init('{"click": [{"action": "ChangeScene","parameters": {"sceneName":"sceneProgramPlayerFullScreen"}}]}'
// , true, null, null, 1.0);
// this._aFocusTargets[0]['episode_list_cell_' + i] = nodeEpisodeCell;
// // let borderX = nodeEpisodeCell.x - nodeEpisodeCell.width / 2; //搞边框
// // let borderY = nodeEpisodeCell.y - nodeEpisodeCell.height / 2;
// // this._graphicsLine.roundRect(borderX, borderY, 278, 175, 20);//圆角矩形路径
// // this._graphicsLine.stroke(); //绘制路径
// }
// },
getGatherDetailList: function () {
Network.ajax("GET", Common.TOPDRAW_API_SERVER + "videoDetail/movie_detail_list_by_media.json", null, null,
function (strResponse) {
......@@ -199,6 +181,7 @@ cc.Class({
// this.getTypeList();
this.checkCollect();
this.getGatherDetailList(); //获取剧集列表
this.getPlayURLAndPlay();
} else {
......@@ -213,6 +196,25 @@ cc.Class({
}, this, "uuid");
},
checkCollect: function () {
var collectList = JSON.parse(cc.sys.localStorage.getItem("collectList"));
if (collectList != null) {
if (-1 != JSON.stringify(collectList.resultSet).indexOf(this._strResponse)) {
this._bCollected = true;
// collectList.resultSet.push(JSON.parse(strResponse));
// collectList.count++;
// cc.sys.localStorage.setItem("collectList", JSON.stringify(collectList));
}
} else {
let oData = {};
oData.businessCode = "success";
oData.count = 0;
oData.resultSet = [];
// oData.resultSet.push(JSON.parse(strResponse));
cc.sys.localStorage.setItem("collectList", JSON.stringify(oData));
}
},
getPlayURLAndPlay: function () {
try {
this._ComOperation.initPlayer(64, 56, 564, 317, true, true); //这里采用左右边距对应android坐标 fix jerry
......@@ -358,15 +360,15 @@ cc.Class({
case cc.macro.KEY.enter:
case cc.macro.KEY.space:
case Common.ANDROID_KEY.enter:
if (0 == this._fiCurrentFocus.node.name.indexOf('Collect')) {
if (0 == this._fiCurrentFocus.node.name.indexOf('ButtonCollect')) {
this._bCollected = !this._bCollected;
if (this._bCollected) {
this.commonSimpleTip("恭喜您!收藏成功!", 3);
}
let icon = this._bCollected ? "GameDetail/be_collected" : "GameDetail/not_collected";
cc.loader.loadRes(icon, cc.Texture2D, function (err, texture) {
self._fiCurrentFocus.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 56, self._fiCurrentFocus.node.width, 56));
});
this.collectMovie();
return;
// let icon = this._bCollected ? "GameDetail/be_collected" : "GameDetail/not_collected";
// cc.loader.loadRes(icon, cc.Texture2D, function (err, texture) {
// self._fiCurrentFocus.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 56, self._fiCurrentFocus.node.width, 56));
// });
} else if (0 == this._fiCurrentFocus.node.name.indexOf('LabelDesc')) {
cc.find("FullDesc", this.node).active = true;
} else if (0 == this._fiCurrentFocus.node.name.indexOf('ButtonOpen') || 0 == this._fiCurrentFocus.node.name.indexOf('Pic')) {
......@@ -383,6 +385,29 @@ cc.Class({
}
},
collectMovie: function () {
var collectList = JSON.parse(cc.sys.localStorage.getItem("collectList"));
// cc.log("//////" + JSON.stringify(this._oInit));
if (this._bCollected && -1 == JSON.stringify(collectList.resultSet).indexOf(JSON.stringify(this._oInit))) {
this.commonSimpleTip("恭喜您!收藏成功!", 3);
collectList.resultSet.push(this._oInit);
collectList.count++;
cc.sys.localStorage.setItem("collectList", JSON.stringify(collectList));
} else if (-1 != (JSON.stringify(collectList.resultSet).indexOf(JSON.stringify(this._oInit)))) {
this.commonSimpleTip("取消收藏!", 3);
for (let i = 0; i < collectList.resultSet.length; i++) {
if (JSON.stringify(collectList.resultSet[i]) == JSON.stringify(this._oInit)) {
collectList.resultSet.splice(i, 1);
collectList.count <= 0 ? collectList.count = 0 : collectList.count--;
cc.sys.localStorage.setItem("collectList", JSON.stringify(collectList));
}
}
}
cc.log("检查存储:" + cc.sys.localStorage.getItem("collectList"));
},
doCurrentFocusTVLinkAction: function (strAction) {
let strTVLink = this._fiCurrentFocus.getTVLink();
cc.log("tvlink===============" + strTVLink);
......
......@@ -18,7 +18,17 @@
"height": 168
}
]
},
"image": [
{
"extension": ".png",
"size": 100405,
"enable": true,
"fileUrl": "upload/image/games/o宝脑力训练270-167.jpg",
"width": 270,
"height": 167
}
]
}
]
}
\ No newline at end of file
......
{
"//": "upload/image/category/",
"businessCode": "success",
"count": 7,
"currentTime": 1581664965116,
"description": "",
"resultSet": [
{
"name": "游戏历史",
"image": [
{
"extension": ".png",
"code": "image_e9fea105-0412-4600-a0f1-f606a003c63f",
"size": 74263,
"enable": true,
"name": "b2b1bb5f-a956-4930-9273-eb72920a9faa.png",
"fileUrl": "upload/image/historyAndCollect/icon_history.png",
"id": 7509,
"type": 2,
"width": 202,
"height": 94
}
]
},
{
"name": "我的收藏",
"image": [
{
"extension": ".png",
"code": "image_e9fea105-0412-4600-a0f1-f606a003c63f",
"size": 74263,
"enable": true,
"name": "b2b1bb5f-a956-4930-9273-eb72920a9faa.png",
"fileUrl": "upload/image/historyAndCollect/icon_collect.png",
"id": 7509,
"type": 2,
"width": 202,
"height": 94
}
]
}
]
}
\ No newline at end of file