Commit 2bf98ed9 2bf98ed9b8b4f665b4a894c5c86496a3c959535c by 金学艇

1.修改详情页

1 parent 224549ff
......@@ -189,7 +189,7 @@
"array": [
0,
0,
271.0659484863281,
250.28134155273438,
0,
0,
0,
......@@ -802,7 +802,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 250,
"height": 550
"height": 565
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......
......@@ -108,16 +108,19 @@
"__id__": 76
},
{
"__id__": 78
"__id__": 90
},
{
"__id__": 92
}
],
"_active": true,
"_components": [
{
"__id__": 83
"__id__": 97
},
{
"__id__": 84
"__id__": 98
}
],
"_prefab": null,
......@@ -207,7 +210,7 @@
"array": [
0,
0,
271.0659484863281,
250.28134155273438,
0,
0,
0,
......@@ -2137,7 +2140,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 564,
"height": 120
"height": 90
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -2149,7 +2152,7 @@
"ctor": "Float32Array",
"array": [
294,
161,
176,
0,
0,
0,
......@@ -3460,20 +3463,98 @@
},
{
"__type__": "cc.Node",
"_name": "LoadingLabel",
"_name": "FullDesc",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 77
},
{
"__id__": 80
},
{
"__id__": 83
},
{
"__id__": 86
}
],
"_active": false,
"_components": [
{
"__id__": 89
}
],
"_prefab": null,
"_opacity": 204,
"_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": "b9ou39SchOnrYLAtLQepFY"
},
{
"__type__": "cc.Node",
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_parent": {
"__id__": 76
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 77
"__id__": 78
},
{
"__id__": 79
}
],
"_prefab": null,
"_opacity": 0,
"_opacity": 76,
"_color": {
"__type__": "cc.Color",
"r": 255,
......@@ -3483,8 +3564,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 60,
"height": 25.2
"width": 1040,
"height": 1
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3495,8 +3576,8 @@
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
404.135986328125,
315.010986328125,
0,
229.5,
0,
0,
0,
......@@ -3518,14 +3599,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "33+kvP1K5KYriv+RzNXWOo"
"_id": "71L4ImABxBvJm8ltxXTNin"
},
{
"__type__": "cc.Label",
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 76
"__id__": 77
},
"_enabled": true,
"_materials": [
......@@ -3533,38 +3614,66 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "加载中",
"_N$string": "加载中",
"_fontSize": 20,
"_lineHeight": 20,
"_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": "0c7WXtuplLNJYfEbLlM04K"
"_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": "6aJ3M1HuRJg6UL+3UYsjeb"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 77
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 1,
"_left": 0,
"_right": 0,
"_top": 130,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "c0iyPOG0lC1aRx6Vxdp7FB"
},
{
"__type__": "cc.Node",
"_name": "Loading",
"_name": "Title",
"_objFlags": 0,
"_parent": {
"__id__": 2
"__id__": 76
},
"_children": [
{
"__id__": 79
}
],
"_children": [],
"_active": true,
"_components": [
{
"__id__": 81
},
{
"__id__": 82
}
],
......@@ -3579,20 +3688,20 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 20
"width": 0,
"height": 63
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
438.4960021972656,
313.9849853515625,
0,
272.5,
0,
0,
0,
......@@ -3614,23 +3723,516 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "18DGk1y4tPN4NY5JQjm9fm"
"_id": "079KCCpUZIO5fYNk9ydZFO"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 80
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "",
"_N$string": "",
"_fontSize": 36,
"_lineHeight": 50,
"_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": "0eooH3aE1B7ru+g0wK7KRl"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 80
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 1,
"_left": 0,
"_right": 0,
"_top": 56,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "fb1vmj8wlKX5zVG4Yw5kgF"
},
{
"__type__": "cc.Node",
"_name": "LoadingIcon",
"_name": "Desc",
"_objFlags": 0,
"_parent": {
"__id__": 78
"__id__": 76
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 80
"__id__": 84
},
{
"__id__": 81
"__id__": 85
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 780,
"height": 192
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
0,
109,
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": "17Vu9sbF5D+qONcUePBxO7"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 83
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "",
"_N$string": "",
"_fontSize": 24,
"_lineHeight": 48,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 0,
"_N$fontFamily": "Arial",
"_N$overflow": 1,
"_N$cacheMode": 0,
"_id": "f39mYY+65IKIXCwqKFZ7nB"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 83
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 1,
"_left": 0,
"_right": 0,
"_top": 155,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "b0bmcNPmZOjrpmPPQvwX2J"
},
{
"__type__": "cc.Node",
"_name": "New Sprite(Splash)",
"_objFlags": 0,
"_parent": {
"__id__": 76
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 87
},
{
"__id__": 88
}
],
"_prefab": null,
"_opacity": 76,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 1040,
"height": 1
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
0,
-259.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": "4fwTm9RZlLDYNPrzWa59sd"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 86
},
"_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": "1agL+bubxF/pN0zOVYqbBb"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 86
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 1,
"_left": 0,
"_right": 0,
"_top": 619,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "e79AV5x4VGd4xbeXZYxXW7"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 76
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "a66022bd-b80b-4cc3-b128-72e532329459"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "54Hd89eq5CuK0tLbPaG/Dt"
},
{
"__type__": "cc.Node",
"_name": "LoadingLabel",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 91
}
],
"_prefab": null,
"_opacity": 0,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 60,
"height": 25.2
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
404.135986328125,
315.010986328125,
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": "33+kvP1K5KYriv+RzNXWOo"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 90
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_useOriginalSize": false,
"_string": "加载中",
"_N$string": "加载中",
"_fontSize": 20,
"_lineHeight": 20,
"_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": "0c7WXtuplLNJYfEbLlM04K"
},
{
"__type__": "cc.Node",
"_name": "Loading",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 93
}
],
"_active": true,
"_components": [
{
"__id__": 96
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 20
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float32Array",
"array": [
438.4960021972656,
313.9849853515625,
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": "18DGk1y4tPN4NY5JQjm9fm"
},
{
"__type__": "cc.Node",
"_name": "LoadingIcon",
"_objFlags": 0,
"_parent": {
"__id__": 92
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 94
},
{
"__id__": 95
}
],
"_prefab": null,
......@@ -3686,7 +4288,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 79
"__id__": 93
},
"_enabled": true,
"_materials": [
......@@ -3718,7 +4320,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 79
"__id__": 93
},
"_enabled": true,
"_defaultClip": {
......@@ -3737,7 +4339,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 78
"__id__": 92
},
"_enabled": true,
"_materials": [
......
......@@ -27,7 +27,7 @@ cc.Class({
this._oInit = {};
this._lastFocus = null;
this._oSceneContext._iCurrentLeftIndex = 0;
this._oSceneContext.focusPath = "TypeListArea/TypeListWrapper/TypeList/topNavi" + this._oSceneContext._iCurrentLeftIndex;
// this._oSceneContext.focusPath = "TypeListArea/TypeListWrapper/TypeList/topNavi" + this._oSceneContext._iCurrentLeftIndex;
this._bIsDataListMoving = false;
this._bInitCategoryListSuccess = false;
......@@ -42,6 +42,14 @@ cc.Class({
this._cApplication.setBackStatus(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;
}
this._nodeTypeListWrapper = cc.find("TypeListArea/TypeListWrapper", this.node);
this._nodeTypeList = cc.find("TypeList", this._nodeTypeListWrapper);
this._nodeTypeList.addComponent(TVScrollParameter);
......@@ -99,7 +107,7 @@ cc.Class({
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, oProgram.image[0].width, oProgram.image[0].height));
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
);
......@@ -142,7 +150,7 @@ cc.Class({
getSimulateRequest: function () {
var self = this;
var aJsonList = ["catetory_jtdr_list.json", "catetory_all_list.json", "catetory_nlbz_list.json", "catetory_3dyx_list.json", "catetory_xyx_list.json", "catetory_tyjj_list.json"];
var aJsonList = ["catetory_jtdr_list.json", "catetory_all_list.json", "catetory_nlbz_list.json", "catetory_3dyx_list.json", "catetory_xyx_list.json", "catetory_dfdj_list.json"];
if (this._oInit[this._oSceneContext._iCurrentLeftIndex]) { //已经加载过数据直接取
self.requestMediaList(1);
} else {
......@@ -174,7 +182,7 @@ cc.Class({
// let strAppId = this._oInit.aNavList[this._oSceneContext.iNaviIndex].appId;
// switch (strAppId) {
// case BusinessParameter.CARTOON_APPID:
// this._oSceneContext.focusPath = this._oSceneContext.focusPath || "SongList/DataContainerMask/DataContainer/ListCell0/SongTitleContainer";
this._oSceneContext.focusPath = this._oSceneContext.focusPath || "CategoryList/DataContainerMask/DataContainer/CategoryListCell0";
this._strSongListCellComponentName = "pfbCategoryListCell";
this._iBeginPositionX = -350;
this._iBeginPositionY = 196;
......@@ -317,6 +325,12 @@ cc.Class({
this._cFocus.hide();
}
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;
......@@ -377,7 +391,7 @@ cc.Class({
onKeyUp: function (event) {
// cc.log(this._lastFocus.node.name + " down->抬起。。。" + this._fiCurrentFocus.node.name);
cc.log("抬起:" + event.keyCode);
if (0 == this._lastFocus.node.getName().indexOf('topNavi')
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 () {
......
......@@ -73,6 +73,7 @@ cc.Class({
cc.find("ButtonOpen", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 264, 100));
// cc.find("ButtonVip", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 572, 72));
cc.find("FullView", this.node).zIndex = 100;
cc.find("FullDesc", this.node).zIndex = 100;
this._nodeTypeListWrapper = cc.find("TypeListArea/TypeListWrapper", this.node);
this._nodeTypeList = cc.find("TypeList", this._nodeTypeListWrapper);
......@@ -279,10 +280,14 @@ cc.Class({
cc.find("Desc/LabelVersion", this.node).getComponent(cc.Label).string = oJSONResult.resultSet[0].versions;
cc.find("Desc/LabelSize", this.node).getComponent(cc.Label).string = oJSONResult.resultSet[0].size;
cc.find("Desc/LabelTime", this.node).getComponent(cc.Label).string = oJSONResult.resultSet[0].updateTime;
//==========放到大屏显示问题
cc.find("FullDesc/Title", this.node).getComponent(cc.Label).string = oJSONResult.resultSet[0].name;
cc.find("FullDesc/Desc", this.node).getComponent(cc.Label).string = oJSONResult.resultSet[0].description;
//==========end
//这里给描述做拦截,防止字数多超出栏目
var description = oJSONResult.resultSet[0].description;
if (description.length > 110) {
description = description.substring(0, 110) + "...";
if (description.length > 80) {
description = description.substring(0, 80) + "...";
}
cc.find("Desc/LabelDesc", this.node).getComponent(cc.Label).string = description;
//搞标签
......@@ -341,9 +346,17 @@ cc.Class({
initFocus: function () {
this._aFocusTargets[1] = [];
// let fiPic = cc.find('Pic', this.node).addComponent(FocusInfo); //
// fiPic.init('', true, null, null, 1.0);
// this._aFocusTargets[0]['pic'] = cc.find('Pic', this.node);
let fiPic = cc.find('Pic', this.node).addComponent(FocusInfo); //
if (this._oSceneContext._downloadUrl && this._oSceneContext._downloadUrl != "undefined") {
fiPic.init("{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameLoading\",\"packageName\":\"" + this._oSceneContext._packageName + "\",\"className\":\"" + this._oSceneContext._className + "\",\"downloadUrl\":\"" + Common.TOPDRAW_API_SERVER + this._oSceneContext._downloadUrl + "\"}}]}", true, null, null, 1.0);
} else {
fiPic.init("{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameLoading\",\"packageName\":\"" + this._oSceneContext._packageName + "\",\"className\":\"" + this._oSceneContext._className + "\",\"downloadUrl\":\"" + this._oSceneContext._downloadUrl + "\"}}]}", true, null, null, 1.0);
}
this._aFocusTargets[0]['pic'] = cc.find('Pic', this.node);
let fiDesc = cc.find('Desc/LabelDesc', this.node).addComponent(FocusInfo); //
fiDesc.init('', true, null, null, 1.0);
this._aFocusTargets[0]['desc'] = cc.find('Desc/LabelDesc', this.node);
let fiOpen = cc.find('ButtonOpen', this.node).addComponent(FocusInfo); //
if (this._oSceneContext._downloadUrl && this._oSceneContext._downloadUrl != "undefined") {
......@@ -416,6 +429,7 @@ cc.Class({
var fiFocusTarget = null;
var fiCurrentFocus = this._fiCurrentFocus;
cc.find("FullView", this.node).active = false;
cc.find("FullDesc", this.node).active = false;
switch (event.keyCode) {
case cc.macro.KEY.up:
case Common.ANDROID_KEY.up:
......@@ -445,9 +459,11 @@ cc.Class({
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('Pic')) {
} else if (0 == this._fiCurrentFocus.node.name.indexOf('TypeListCell')) {
cc.find("FullView", this.node).active = true;
} else if (0 == this._fiCurrentFocus.node.name.indexOf('ButtonOpen')) {
} 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')) {
// this.commonSimpleTip("是否拿到数据: " + this._bInitExistApk);
if (!this._bInitExistApk) { //还未拿到判断数据
return;
......@@ -530,7 +546,7 @@ cc.Class({
},
onAfterFocusChange: function (event) {
var self = this;
let fiTo = event.detail.to;
let fiFrom = event.detail.from;
......@@ -555,6 +571,17 @@ cc.Class({
fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 72, 572, 72));
});
}
if (0 == fiTo.node.getName().indexOf('TypeListCell')) {
let iIndex = fiTo.node.name.replace("TypeListCell", '');
if (this._oInit.aListImage[iIndex]) {
Network.loadImageInNativeRuntime(Common.TOPDRAW_IMAGE_SERVER + this._oInit.aListImage[iIndex].fileUrl, null,
function (texture) {
cc.find("FullView", self.node).getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture);
}, function () { }, this
);
}
}
},
});
......
......@@ -75,7 +75,7 @@ cc.Class({
this._bInitCategoryListSuccess = false;
this._bInitRecommendDataSuccess = false;
this._scrollview = this.node.getComponent(cc.ScrollView);
this._oSceneContext.focusPath = "scrollContent/TopNavi/topNavi1";
this._oSceneContext.focusPath = "scrollContent/RecommendLayout/ViewPager/Carousel0";
this._oSceneContext._iPageIndex = 1;
this._oSceneContext._iCurrentLeftIndex = 1;
this._oSceneContext._iViewPagerIndex = 0;
......@@ -116,7 +116,7 @@ cc.Class({
//轮播图相关
initViewPager: function () {
var self=this;
var self = this;
this._pageView = cc.find('scrollContent/ViewPagerArea', this.node).getComponent(cc.PageView);
Network.ajax("GET", Common.TOPDRAW_API_SERVER + "main/main_viewpager.json", null, null,
function (strResponse) {
......@@ -281,10 +281,10 @@ cc.Class({
function (texture, iRequestId) {
if (strCellName == "topNavi") {
nodeNav.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, aTopNaviJson[i].width, aTopNaviJson[i].height));
if (i == 1 && 1 == this._oSceneContext._iCurrentLeftIndex && this._oSceneContext.focusPath != "scrollContent/TopNavi/topNavi1") {//恢复光标记忆不需要选中状态,将i先改为1,其他导航暂时不做光标记忆,有点复杂,后续考虑做。。。
nodeNav.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, aTopNaviJson[i].height * 2, aTopNaviJson[i].width, aTopNaviJson[i].height));
} else if (i == this._oSceneContext._iCurrentLeftIndex) {
if (i == this._oSceneContext._iCurrentLeftIndex && 1 != this._oSceneContext._iCurrentLeftIndex) {//恢复光标记忆不需要选中状态,将i先改为1,其他导航暂时不做光标记忆,有点复杂,后续考虑做。。。
nodeNav.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, aTopNaviJson[i].height, aTopNaviJson[i].width, aTopNaviJson[i].height));
} else if (i == this._oSceneContext._iCurrentLeftIndex) {
nodeNav.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, aTopNaviJson[i].height * 2, aTopNaviJson[i].width, aTopNaviJson[i].height));
}
} else {
nodeNav.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, aTopNaviJson[i].width, aTopNaviJson[i].height));
......@@ -1018,11 +1018,11 @@ cc.Class({
this._oSceneContext._iPageIndex--;
let height = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0; //520,750,1177,1463,1737,2119,2239
this.onScrollViewScrollStart();
this._scrollview.scrollToOffset(cc.v2(0, height), 0.5);
this._scrollview.scrollToOffset(cc.v2(0, height), 0.4);
// cc.log("滚动到:" + height);
this.scheduleOnce(function () {
this.keyDownDirection(Common.MOVE_DIRECTION_UP);
}, 0.4);
}, 0.3);
// setTimeout(function () {
// this.keyDownDirection(Common.MOVE_DIRECTION_UP);
// }.bind(this), 300);
......@@ -1082,12 +1082,12 @@ cc.Class({
//----------------------------------------------------------------------
let height = this._aBgHeight[this._oSceneContext._iPageIndex] || 0; //520,750,1177,1463,1737,2119,2239
this.onScrollViewScrollStart();
this._scrollview.scrollToOffset(cc.v2(0, height), 0.5);
this._scrollview.scrollToOffset(cc.v2(0, height), 0.4);
// cc.log("滚动到:"+height);
this._oSceneContext._iPageIndex++;
this.scheduleOnce(function () {
this.keyDownDirection(Common.MOVE_DIRECTION_DOWN);
}, 0.4);
}, 0.3);
// setTimeout(function () {
// this.keyDownDirection(Common.MOVE_DIRECTION_DOWN);
// }.bind(this), 300);
......
......@@ -14,11 +14,11 @@
"size": 74263,
"enable": true,
"name": "b2b1bb5f-a956-4930-9273-eb72920a9faa.png",
"fileUrl": "upload/image/category//icon_top1.png",
"fileUrl": "upload/image/category/icon_top1.png",
"id": 7509,
"type": 2,
"width": 236,
"height": 100
"width": 202,
"height": 94
}
]
},
......@@ -31,11 +31,11 @@
"size": 74263,
"enable": true,
"name": "b2b1bb5f-a956-4930-9273-eb72920a9faa.png",
"fileUrl": "upload/image/category//icon_top2.png",
"fileUrl": "upload/image/category/icon_top2.png",
"id": 7509,
"type": 2,
"width": 236,
"height": 100
"width": 202,
"height": 94
}
]
},
......@@ -48,11 +48,11 @@
"size": 74263,
"enable": true,
"name": "b2b1bb5f-a956-4930-9273-eb72920a9faa.png",
"fileUrl": "upload/image/category//icon_top3.png",
"fileUrl": "upload/image/category/icon_top3.png",
"id": 7509,
"type": 2,
"width": 236,
"height": 100
"width": 202,
"height": 94
}
]
},
......@@ -65,11 +65,11 @@
"size": 74263,
"enable": true,
"name": "b2b1bb5f-a956-4930-9273-eb72920a9faa.png",
"fileUrl": "upload/image/category//icon_top4.png",
"fileUrl": "upload/image/category/icon_top4.png",
"id": 7509,
"type": 2,
"width": 236,
"height": 100
"width": 202,
"height": 94
}
]
},
......@@ -82,11 +82,28 @@
"size": 74263,
"enable": true,
"name": "b2b1bb5f-a956-4930-9273-eb72920a9faa.png",
"fileUrl": "upload/image/category//icon_top5.png",
"fileUrl": "upload/image/category/icon_top5.png",
"id": 7509,
"type": 2,
"width": 236,
"height": 100
"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/category/icon_top6.png",
"id": 7509,
"type": 2,
"width": 202,
"height": 94
}
]
}
......
......@@ -125,37 +125,37 @@
{
"name": "Subject1",
"imageURL": "upload/image/main/block4_1.png",
"tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\"}}]}",
"tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\",\"currentIndex\":\"0\"}}]}",
"code": "promotionItem_e432ac2d-c1f3-4daehr4w5g4w5yh4w5yh"
},
{
"name": "Subject2",
"imageURL": "upload/image/main/block4_2.png",
"tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\"}}]}",
"tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\",\"currentIndex\":\"1\"}}]}",
"code": "promotionItem_f90b7ff3-1f36-401erhb54wyh4th"
},
{
"name": "Subject3",
"imageURL": "upload/image/main/block4_3.png",
"tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\"}}]}",
"tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\",\"currentIndex\":\"2\"}}]}",
"code": "promotionItem_e29b33e4-8954-4eerthy6rthg54er"
},
{
"name": "Subject4",
"imageURL": "upload/image/main/block4_4.png",
"tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\"}}]}",
"tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\",\"currentIndex\":\"3\"}}]}",
"code": "promotionItem_e29b33e4-8954-vwregv54thw6"
},
{
"name": "Subject5",
"imageURL": "upload/image/main/block4_5.png",
"tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\"}}]}",
"tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\",\"currentIndex\":\"4\"}}]}",
"code": "promotionItem_e29b33e4-8954-bq4wrjhwbt4t"
},
{
"name": "Subject6",
"imageURL": "upload/image/main/block4_6.png",
"tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\"}}]}",
"tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\",\"currentIndex\":\"5\"}}]}",
"code": "promotionItem_57aea4b3-7716-4we5j56trhgser2"
}
]
......