1.修改详情页
Showing
7 changed files
with
103 additions
and
45 deletions
... | @@ -189,7 +189,7 @@ | ... | @@ -189,7 +189,7 @@ |
189 | "array": [ | 189 | "array": [ |
190 | 0, | 190 | 0, |
191 | 0, | 191 | 0, |
192 | 271.0659484863281, | 192 | 250.28134155273438, |
193 | 0, | 193 | 0, |
194 | 0, | 194 | 0, |
195 | 0, | 195 | 0, |
... | @@ -802,7 +802,7 @@ | ... | @@ -802,7 +802,7 @@ |
802 | "_contentSize": { | 802 | "_contentSize": { |
803 | "__type__": "cc.Size", | 803 | "__type__": "cc.Size", |
804 | "width": 250, | 804 | "width": 250, |
805 | "height": 550 | 805 | "height": 565 |
806 | }, | 806 | }, |
807 | "_anchorPoint": { | 807 | "_anchorPoint": { |
808 | "__type__": "cc.Vec2", | 808 | "__type__": "cc.Vec2", | ... | ... |
This diff is collapsed.
Click to expand it.
... | @@ -27,7 +27,7 @@ cc.Class({ | ... | @@ -27,7 +27,7 @@ cc.Class({ |
27 | this._oInit = {}; | 27 | this._oInit = {}; |
28 | this._lastFocus = null; | 28 | this._lastFocus = null; |
29 | this._oSceneContext._iCurrentLeftIndex = 0; | 29 | this._oSceneContext._iCurrentLeftIndex = 0; |
30 | this._oSceneContext.focusPath = "TypeListArea/TypeListWrapper/TypeList/topNavi" + this._oSceneContext._iCurrentLeftIndex; | 30 | // this._oSceneContext.focusPath = "TypeListArea/TypeListWrapper/TypeList/topNavi" + this._oSceneContext._iCurrentLeftIndex; |
31 | this._bIsDataListMoving = false; | 31 | this._bIsDataListMoving = false; |
32 | this._bInitCategoryListSuccess = false; | 32 | this._bInitCategoryListSuccess = false; |
33 | 33 | ||
... | @@ -42,6 +42,14 @@ cc.Class({ | ... | @@ -42,6 +42,14 @@ cc.Class({ |
42 | this._cApplication.setBackStatus(false); | 42 | this._cApplication.setBackStatus(false); |
43 | } | 43 | } |
44 | 44 | ||
45 | let aSceneParameter = this._cApplication.getSceneParameter(); | ||
46 | cc.log("gameDetail->aSceneParameter..." + JSON.stringify(aSceneParameter)); | ||
47 | if (aSceneParameter.length) { | ||
48 | this._oSceneContext._iCurrentLeftIndex = aSceneParameter[aSceneParameter.length - 1].currentIndex || 0; | ||
49 | } else if (aSceneParameter) { | ||
50 | this._oSceneContext._iCurrentLeftIndex = aSceneParameter.currentIndex || 0; | ||
51 | } | ||
52 | |||
45 | this._nodeTypeListWrapper = cc.find("TypeListArea/TypeListWrapper", this.node); | 53 | this._nodeTypeListWrapper = cc.find("TypeListArea/TypeListWrapper", this.node); |
46 | this._nodeTypeList = cc.find("TypeList", this._nodeTypeListWrapper); | 54 | this._nodeTypeList = cc.find("TypeList", this._nodeTypeListWrapper); |
47 | this._nodeTypeList.addComponent(TVScrollParameter); | 55 | this._nodeTypeList.addComponent(TVScrollParameter); |
... | @@ -99,7 +107,7 @@ cc.Class({ | ... | @@ -99,7 +107,7 @@ cc.Class({ |
99 | function (texture, iRequestId) { | 107 | function (texture, iRequestId) { |
100 | node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, oProgram.image[0].width, oProgram.image[0].height)); | 108 | node.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, oProgram.image[0].width, oProgram.image[0].height)); |
101 | if (i == self._oSceneContext._iCurrentLeftIndex) { | 109 | if (i == self._oSceneContext._iCurrentLeftIndex) { |
102 | 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)); | 110 | 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)); |
103 | } | 111 | } |
104 | }, function () { }, this | 112 | }, function () { }, this |
105 | ); | 113 | ); |
... | @@ -142,7 +150,7 @@ cc.Class({ | ... | @@ -142,7 +150,7 @@ cc.Class({ |
142 | 150 | ||
143 | getSimulateRequest: function () { | 151 | getSimulateRequest: function () { |
144 | var self = this; | 152 | var self = this; |
145 | 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"]; | 153 | 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"]; |
146 | if (this._oInit[this._oSceneContext._iCurrentLeftIndex]) { //已经加载过数据直接取 | 154 | if (this._oInit[this._oSceneContext._iCurrentLeftIndex]) { //已经加载过数据直接取 |
147 | self.requestMediaList(1); | 155 | self.requestMediaList(1); |
148 | } else { | 156 | } else { |
... | @@ -174,7 +182,7 @@ cc.Class({ | ... | @@ -174,7 +182,7 @@ cc.Class({ |
174 | // let strAppId = this._oInit.aNavList[this._oSceneContext.iNaviIndex].appId; | 182 | // let strAppId = this._oInit.aNavList[this._oSceneContext.iNaviIndex].appId; |
175 | // switch (strAppId) { | 183 | // switch (strAppId) { |
176 | // case BusinessParameter.CARTOON_APPID: | 184 | // case BusinessParameter.CARTOON_APPID: |
177 | // this._oSceneContext.focusPath = this._oSceneContext.focusPath || "SongList/DataContainerMask/DataContainer/ListCell0/SongTitleContainer"; | 185 | this._oSceneContext.focusPath = this._oSceneContext.focusPath || "CategoryList/DataContainerMask/DataContainer/CategoryListCell0"; |
178 | this._strSongListCellComponentName = "pfbCategoryListCell"; | 186 | this._strSongListCellComponentName = "pfbCategoryListCell"; |
179 | this._iBeginPositionX = -350; | 187 | this._iBeginPositionX = -350; |
180 | this._iBeginPositionY = 196; | 188 | this._iBeginPositionY = 196; |
... | @@ -317,6 +325,12 @@ cc.Class({ | ... | @@ -317,6 +325,12 @@ cc.Class({ |
317 | this._cFocus.hide(); | 325 | this._cFocus.hide(); |
318 | } | 326 | } |
319 | 327 | ||
328 | if (0 == nodeInitFocus.getName().indexOf('CategoryListCell')) { | ||
329 | nodeInitFocus.getChildByName("Normal").active = false; | ||
330 | nodeInitFocus.getChildByName("Name").active = true; | ||
331 | nodeInitFocus.getComponent(ListCell).setUIWithFocus(); | ||
332 | } | ||
333 | |||
320 | //处理焦点位于下方问题 | 334 | //处理焦点位于下方问题 |
321 | if (this._oSceneContext.typeListY) { | 335 | if (this._oSceneContext.typeListY) { |
322 | this._nodeTypeList.y = this._oSceneContext.typeListY; | 336 | this._nodeTypeList.y = this._oSceneContext.typeListY; |
... | @@ -377,7 +391,7 @@ cc.Class({ | ... | @@ -377,7 +391,7 @@ cc.Class({ |
377 | onKeyUp: function (event) { | 391 | onKeyUp: function (event) { |
378 | // cc.log(this._lastFocus.node.name + " down->抬起。。。" + this._fiCurrentFocus.node.name); | 392 | // cc.log(this._lastFocus.node.name + " down->抬起。。。" + this._fiCurrentFocus.node.name); |
379 | cc.log("抬起:" + event.keyCode); | 393 | cc.log("抬起:" + event.keyCode); |
380 | if (0 == this._lastFocus.node.getName().indexOf('topNavi') | 394 | if (this._lastFocus != null && 0 == this._lastFocus.node.getName().indexOf('topNavi') |
381 | && 0 == this._fiCurrentFocus.node.getName().indexOf('topNavi') | 395 | && 0 == this._fiCurrentFocus.node.getName().indexOf('topNavi') |
382 | && event.keyCode != (Common.ANDROID_KEY.left || cc.macro.KEY.left)) { | 396 | && event.keyCode != (Common.ANDROID_KEY.left || cc.macro.KEY.left)) { |
383 | this.scheduleOnce(function () { | 397 | this.scheduleOnce(function () { | ... | ... |
... | @@ -73,6 +73,7 @@ cc.Class({ | ... | @@ -73,6 +73,7 @@ cc.Class({ |
73 | cc.find("ButtonOpen", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 264, 100)); | 73 | cc.find("ButtonOpen", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 264, 100)); |
74 | // cc.find("ButtonVip", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 572, 72)); | 74 | // cc.find("ButtonVip", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 572, 72)); |
75 | cc.find("FullView", this.node).zIndex = 100; | 75 | cc.find("FullView", this.node).zIndex = 100; |
76 | cc.find("FullDesc", this.node).zIndex = 100; | ||
76 | 77 | ||
77 | this._nodeTypeListWrapper = cc.find("TypeListArea/TypeListWrapper", this.node); | 78 | this._nodeTypeListWrapper = cc.find("TypeListArea/TypeListWrapper", this.node); |
78 | this._nodeTypeList = cc.find("TypeList", this._nodeTypeListWrapper); | 79 | this._nodeTypeList = cc.find("TypeList", this._nodeTypeListWrapper); |
... | @@ -279,10 +280,14 @@ cc.Class({ | ... | @@ -279,10 +280,14 @@ cc.Class({ |
279 | cc.find("Desc/LabelVersion", this.node).getComponent(cc.Label).string = oJSONResult.resultSet[0].versions; | 280 | cc.find("Desc/LabelVersion", this.node).getComponent(cc.Label).string = oJSONResult.resultSet[0].versions; |
280 | cc.find("Desc/LabelSize", this.node).getComponent(cc.Label).string = oJSONResult.resultSet[0].size; | 281 | cc.find("Desc/LabelSize", this.node).getComponent(cc.Label).string = oJSONResult.resultSet[0].size; |
281 | cc.find("Desc/LabelTime", this.node).getComponent(cc.Label).string = oJSONResult.resultSet[0].updateTime; | 282 | cc.find("Desc/LabelTime", this.node).getComponent(cc.Label).string = oJSONResult.resultSet[0].updateTime; |
283 | //==========放到大屏显示问题 | ||
284 | cc.find("FullDesc/Title", this.node).getComponent(cc.Label).string = oJSONResult.resultSet[0].name; | ||
285 | cc.find("FullDesc/Desc", this.node).getComponent(cc.Label).string = oJSONResult.resultSet[0].description; | ||
286 | //==========end | ||
282 | //这里给描述做拦截,防止字数多超出栏目 | 287 | //这里给描述做拦截,防止字数多超出栏目 |
283 | var description = oJSONResult.resultSet[0].description; | 288 | var description = oJSONResult.resultSet[0].description; |
284 | if (description.length > 110) { | 289 | if (description.length > 80) { |
285 | description = description.substring(0, 110) + "..."; | 290 | description = description.substring(0, 80) + "..."; |
286 | } | 291 | } |
287 | cc.find("Desc/LabelDesc", this.node).getComponent(cc.Label).string = description; | 292 | cc.find("Desc/LabelDesc", this.node).getComponent(cc.Label).string = description; |
288 | //搞标签 | 293 | //搞标签 |
... | @@ -341,9 +346,17 @@ cc.Class({ | ... | @@ -341,9 +346,17 @@ cc.Class({ |
341 | initFocus: function () { | 346 | initFocus: function () { |
342 | this._aFocusTargets[1] = []; | 347 | this._aFocusTargets[1] = []; |
343 | 348 | ||
344 | // let fiPic = cc.find('Pic', this.node).addComponent(FocusInfo); // | 349 | let fiPic = cc.find('Pic', this.node).addComponent(FocusInfo); // |
345 | // fiPic.init('', true, null, null, 1.0); | 350 | if (this._oSceneContext._downloadUrl && this._oSceneContext._downloadUrl != "undefined") { |
346 | // this._aFocusTargets[0]['pic'] = cc.find('Pic', this.node); | 351 | 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); |
352 | } else { | ||
353 | 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); | ||
354 | } | ||
355 | this._aFocusTargets[0]['pic'] = cc.find('Pic', this.node); | ||
356 | |||
357 | let fiDesc = cc.find('Desc/LabelDesc', this.node).addComponent(FocusInfo); // | ||
358 | fiDesc.init('', true, null, null, 1.0); | ||
359 | this._aFocusTargets[0]['desc'] = cc.find('Desc/LabelDesc', this.node); | ||
347 | 360 | ||
348 | let fiOpen = cc.find('ButtonOpen', this.node).addComponent(FocusInfo); // | 361 | let fiOpen = cc.find('ButtonOpen', this.node).addComponent(FocusInfo); // |
349 | if (this._oSceneContext._downloadUrl && this._oSceneContext._downloadUrl != "undefined") { | 362 | if (this._oSceneContext._downloadUrl && this._oSceneContext._downloadUrl != "undefined") { |
... | @@ -416,6 +429,7 @@ cc.Class({ | ... | @@ -416,6 +429,7 @@ cc.Class({ |
416 | var fiFocusTarget = null; | 429 | var fiFocusTarget = null; |
417 | var fiCurrentFocus = this._fiCurrentFocus; | 430 | var fiCurrentFocus = this._fiCurrentFocus; |
418 | cc.find("FullView", this.node).active = false; | 431 | cc.find("FullView", this.node).active = false; |
432 | cc.find("FullDesc", this.node).active = false; | ||
419 | switch (event.keyCode) { | 433 | switch (event.keyCode) { |
420 | case cc.macro.KEY.up: | 434 | case cc.macro.KEY.up: |
421 | case Common.ANDROID_KEY.up: | 435 | case Common.ANDROID_KEY.up: |
... | @@ -445,9 +459,11 @@ cc.Class({ | ... | @@ -445,9 +459,11 @@ cc.Class({ |
445 | cc.loader.loadRes(icon, cc.Texture2D, function (err, texture) { | 459 | cc.loader.loadRes(icon, cc.Texture2D, function (err, texture) { |
446 | self._fiCurrentFocus.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 56, self._fiCurrentFocus.node.width, 56)); | 460 | self._fiCurrentFocus.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 56, self._fiCurrentFocus.node.width, 56)); |
447 | }); | 461 | }); |
448 | } else if (0 == this._fiCurrentFocus.node.name.indexOf('Pic')) { | 462 | } else if (0 == this._fiCurrentFocus.node.name.indexOf('TypeListCell')) { |
449 | cc.find("FullView", this.node).active = true; | 463 | cc.find("FullView", this.node).active = true; |
450 | } else if (0 == this._fiCurrentFocus.node.name.indexOf('ButtonOpen')) { | 464 | } else if (0 == this._fiCurrentFocus.node.name.indexOf('LabelDesc')) { |
465 | cc.find("FullDesc", this.node).active = true; | ||
466 | } else if (0 == this._fiCurrentFocus.node.name.indexOf('ButtonOpen') || 0 == this._fiCurrentFocus.node.name.indexOf('Pic')) { | ||
451 | // this.commonSimpleTip("是否拿到数据: " + this._bInitExistApk); | 467 | // this.commonSimpleTip("是否拿到数据: " + this._bInitExistApk); |
452 | if (!this._bInitExistApk) { //还未拿到判断数据 | 468 | if (!this._bInitExistApk) { //还未拿到判断数据 |
453 | return; | 469 | return; |
... | @@ -530,7 +546,7 @@ cc.Class({ | ... | @@ -530,7 +546,7 @@ cc.Class({ |
530 | }, | 546 | }, |
531 | 547 | ||
532 | onAfterFocusChange: function (event) { | 548 | onAfterFocusChange: function (event) { |
533 | 549 | var self = this; | |
534 | let fiTo = event.detail.to; | 550 | let fiTo = event.detail.to; |
535 | let fiFrom = event.detail.from; | 551 | let fiFrom = event.detail.from; |
536 | 552 | ||
... | @@ -555,6 +571,17 @@ cc.Class({ | ... | @@ -555,6 +571,17 @@ cc.Class({ |
555 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 72, 572, 72)); | 571 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 72, 572, 72)); |
556 | }); | 572 | }); |
557 | } | 573 | } |
574 | |||
575 | if (0 == fiTo.node.getName().indexOf('TypeListCell')) { | ||
576 | let iIndex = fiTo.node.name.replace("TypeListCell", ''); | ||
577 | if (this._oInit.aListImage[iIndex]) { | ||
578 | Network.loadImageInNativeRuntime(Common.TOPDRAW_IMAGE_SERVER + this._oInit.aListImage[iIndex].fileUrl, null, | ||
579 | function (texture) { | ||
580 | cc.find("FullView", self.node).getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture); | ||
581 | }, function () { }, this | ||
582 | ); | ||
583 | } | ||
584 | } | ||
558 | }, | 585 | }, |
559 | 586 | ||
560 | }); | 587 | }); | ... | ... |
... | @@ -75,7 +75,7 @@ cc.Class({ | ... | @@ -75,7 +75,7 @@ cc.Class({ |
75 | this._bInitCategoryListSuccess = false; | 75 | this._bInitCategoryListSuccess = false; |
76 | this._bInitRecommendDataSuccess = false; | 76 | this._bInitRecommendDataSuccess = false; |
77 | this._scrollview = this.node.getComponent(cc.ScrollView); | 77 | this._scrollview = this.node.getComponent(cc.ScrollView); |
78 | this._oSceneContext.focusPath = "scrollContent/TopNavi/topNavi1"; | 78 | this._oSceneContext.focusPath = "scrollContent/RecommendLayout/ViewPager/Carousel0"; |
79 | this._oSceneContext._iPageIndex = 1; | 79 | this._oSceneContext._iPageIndex = 1; |
80 | this._oSceneContext._iCurrentLeftIndex = 1; | 80 | this._oSceneContext._iCurrentLeftIndex = 1; |
81 | this._oSceneContext._iViewPagerIndex = 0; | 81 | this._oSceneContext._iViewPagerIndex = 0; |
... | @@ -116,7 +116,7 @@ cc.Class({ | ... | @@ -116,7 +116,7 @@ cc.Class({ |
116 | 116 | ||
117 | //轮播图相关 | 117 | //轮播图相关 |
118 | initViewPager: function () { | 118 | initViewPager: function () { |
119 | var self=this; | 119 | var self = this; |
120 | this._pageView = cc.find('scrollContent/ViewPagerArea', this.node).getComponent(cc.PageView); | 120 | this._pageView = cc.find('scrollContent/ViewPagerArea', this.node).getComponent(cc.PageView); |
121 | Network.ajax("GET", Common.TOPDRAW_API_SERVER + "main/main_viewpager.json", null, null, | 121 | Network.ajax("GET", Common.TOPDRAW_API_SERVER + "main/main_viewpager.json", null, null, |
122 | function (strResponse) { | 122 | function (strResponse) { |
... | @@ -281,10 +281,10 @@ cc.Class({ | ... | @@ -281,10 +281,10 @@ cc.Class({ |
281 | function (texture, iRequestId) { | 281 | function (texture, iRequestId) { |
282 | if (strCellName == "topNavi") { | 282 | if (strCellName == "topNavi") { |
283 | nodeNav.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, aTopNaviJson[i].width, aTopNaviJson[i].height)); | 283 | nodeNav.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, aTopNaviJson[i].width, aTopNaviJson[i].height)); |
284 | if (i == 1 && 1 == this._oSceneContext._iCurrentLeftIndex && this._oSceneContext.focusPath != "scrollContent/TopNavi/topNavi1") {//恢复光标记忆不需要选中状态,将i先改为1,其他导航暂时不做光标记忆,有点复杂,后续考虑做。。。 | 284 | if (i == this._oSceneContext._iCurrentLeftIndex && 1 != this._oSceneContext._iCurrentLeftIndex) {//恢复光标记忆不需要选中状态,将i先改为1,其他导航暂时不做光标记忆,有点复杂,后续考虑做。。。 |
285 | nodeNav.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, aTopNaviJson[i].height * 2, aTopNaviJson[i].width, aTopNaviJson[i].height)); | ||
286 | } else if (i == this._oSceneContext._iCurrentLeftIndex) { | ||
287 | nodeNav.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, aTopNaviJson[i].height, aTopNaviJson[i].width, aTopNaviJson[i].height)); | 285 | nodeNav.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, aTopNaviJson[i].height, aTopNaviJson[i].width, aTopNaviJson[i].height)); |
286 | } else if (i == this._oSceneContext._iCurrentLeftIndex) { | ||
287 | nodeNav.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, aTopNaviJson[i].height * 2, aTopNaviJson[i].width, aTopNaviJson[i].height)); | ||
288 | } | 288 | } |
289 | } else { | 289 | } else { |
290 | nodeNav.getChildByName("Pic").getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, aTopNaviJson[i].width, aTopNaviJson[i].height)); | 290 | 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({ | ... | @@ -1018,11 +1018,11 @@ cc.Class({ |
1018 | this._oSceneContext._iPageIndex--; | 1018 | this._oSceneContext._iPageIndex--; |
1019 | let height = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0; //520,750,1177,1463,1737,2119,2239 | 1019 | let height = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0; //520,750,1177,1463,1737,2119,2239 |
1020 | this.onScrollViewScrollStart(); | 1020 | this.onScrollViewScrollStart(); |
1021 | this._scrollview.scrollToOffset(cc.v2(0, height), 0.5); | 1021 | this._scrollview.scrollToOffset(cc.v2(0, height), 0.4); |
1022 | // cc.log("滚动到:" + height); | 1022 | // cc.log("滚动到:" + height); |
1023 | this.scheduleOnce(function () { | 1023 | this.scheduleOnce(function () { |
1024 | this.keyDownDirection(Common.MOVE_DIRECTION_UP); | 1024 | this.keyDownDirection(Common.MOVE_DIRECTION_UP); |
1025 | }, 0.4); | 1025 | }, 0.3); |
1026 | // setTimeout(function () { | 1026 | // setTimeout(function () { |
1027 | // this.keyDownDirection(Common.MOVE_DIRECTION_UP); | 1027 | // this.keyDownDirection(Common.MOVE_DIRECTION_UP); |
1028 | // }.bind(this), 300); | 1028 | // }.bind(this), 300); |
... | @@ -1082,12 +1082,12 @@ cc.Class({ | ... | @@ -1082,12 +1082,12 @@ cc.Class({ |
1082 | //---------------------------------------------------------------------- | 1082 | //---------------------------------------------------------------------- |
1083 | let height = this._aBgHeight[this._oSceneContext._iPageIndex] || 0; //520,750,1177,1463,1737,2119,2239 | 1083 | let height = this._aBgHeight[this._oSceneContext._iPageIndex] || 0; //520,750,1177,1463,1737,2119,2239 |
1084 | this.onScrollViewScrollStart(); | 1084 | this.onScrollViewScrollStart(); |
1085 | this._scrollview.scrollToOffset(cc.v2(0, height), 0.5); | 1085 | this._scrollview.scrollToOffset(cc.v2(0, height), 0.4); |
1086 | // cc.log("滚动到:"+height); | 1086 | // cc.log("滚动到:"+height); |
1087 | this._oSceneContext._iPageIndex++; | 1087 | this._oSceneContext._iPageIndex++; |
1088 | this.scheduleOnce(function () { | 1088 | this.scheduleOnce(function () { |
1089 | this.keyDownDirection(Common.MOVE_DIRECTION_DOWN); | 1089 | this.keyDownDirection(Common.MOVE_DIRECTION_DOWN); |
1090 | }, 0.4); | 1090 | }, 0.3); |
1091 | // setTimeout(function () { | 1091 | // setTimeout(function () { |
1092 | // this.keyDownDirection(Common.MOVE_DIRECTION_DOWN); | 1092 | // this.keyDownDirection(Common.MOVE_DIRECTION_DOWN); |
1093 | // }.bind(this), 300); | 1093 | // }.bind(this), 300); | ... | ... |
... | @@ -14,11 +14,11 @@ | ... | @@ -14,11 +14,11 @@ |
14 | "size": 74263, | 14 | "size": 74263, |
15 | "enable": true, | 15 | "enable": true, |
16 | "name": "b2b1bb5f-a956-4930-9273-eb72920a9faa.png", | 16 | "name": "b2b1bb5f-a956-4930-9273-eb72920a9faa.png", |
17 | "fileUrl": "upload/image/category//icon_top1.png", | 17 | "fileUrl": "upload/image/category/icon_top1.png", |
18 | "id": 7509, | 18 | "id": 7509, |
19 | "type": 2, | 19 | "type": 2, |
20 | "width": 236, | 20 | "width": 202, |
21 | "height": 100 | 21 | "height": 94 |
22 | } | 22 | } |
23 | ] | 23 | ] |
24 | }, | 24 | }, |
... | @@ -31,11 +31,11 @@ | ... | @@ -31,11 +31,11 @@ |
31 | "size": 74263, | 31 | "size": 74263, |
32 | "enable": true, | 32 | "enable": true, |
33 | "name": "b2b1bb5f-a956-4930-9273-eb72920a9faa.png", | 33 | "name": "b2b1bb5f-a956-4930-9273-eb72920a9faa.png", |
34 | "fileUrl": "upload/image/category//icon_top2.png", | 34 | "fileUrl": "upload/image/category/icon_top2.png", |
35 | "id": 7509, | 35 | "id": 7509, |
36 | "type": 2, | 36 | "type": 2, |
37 | "width": 236, | 37 | "width": 202, |
38 | "height": 100 | 38 | "height": 94 |
39 | } | 39 | } |
40 | ] | 40 | ] |
41 | }, | 41 | }, |
... | @@ -48,11 +48,11 @@ | ... | @@ -48,11 +48,11 @@ |
48 | "size": 74263, | 48 | "size": 74263, |
49 | "enable": true, | 49 | "enable": true, |
50 | "name": "b2b1bb5f-a956-4930-9273-eb72920a9faa.png", | 50 | "name": "b2b1bb5f-a956-4930-9273-eb72920a9faa.png", |
51 | "fileUrl": "upload/image/category//icon_top3.png", | 51 | "fileUrl": "upload/image/category/icon_top3.png", |
52 | "id": 7509, | 52 | "id": 7509, |
53 | "type": 2, | 53 | "type": 2, |
54 | "width": 236, | 54 | "width": 202, |
55 | "height": 100 | 55 | "height": 94 |
56 | } | 56 | } |
57 | ] | 57 | ] |
58 | }, | 58 | }, |
... | @@ -65,11 +65,11 @@ | ... | @@ -65,11 +65,11 @@ |
65 | "size": 74263, | 65 | "size": 74263, |
66 | "enable": true, | 66 | "enable": true, |
67 | "name": "b2b1bb5f-a956-4930-9273-eb72920a9faa.png", | 67 | "name": "b2b1bb5f-a956-4930-9273-eb72920a9faa.png", |
68 | "fileUrl": "upload/image/category//icon_top4.png", | 68 | "fileUrl": "upload/image/category/icon_top4.png", |
69 | "id": 7509, | 69 | "id": 7509, |
70 | "type": 2, | 70 | "type": 2, |
71 | "width": 236, | 71 | "width": 202, |
72 | "height": 100 | 72 | "height": 94 |
73 | } | 73 | } |
74 | ] | 74 | ] |
75 | }, | 75 | }, |
... | @@ -82,11 +82,28 @@ | ... | @@ -82,11 +82,28 @@ |
82 | "size": 74263, | 82 | "size": 74263, |
83 | "enable": true, | 83 | "enable": true, |
84 | "name": "b2b1bb5f-a956-4930-9273-eb72920a9faa.png", | 84 | "name": "b2b1bb5f-a956-4930-9273-eb72920a9faa.png", |
85 | "fileUrl": "upload/image/category//icon_top5.png", | 85 | "fileUrl": "upload/image/category/icon_top5.png", |
86 | "id": 7509, | 86 | "id": 7509, |
87 | "type": 2, | 87 | "type": 2, |
88 | "width": 236, | 88 | "width": 202, |
89 | "height": 100 | 89 | "height": 94 |
90 | } | ||
91 | ] | ||
92 | }, | ||
93 | { | ||
94 | "name": "巅峰对决", | ||
95 | "image": [ | ||
96 | { | ||
97 | "extension": ".png", | ||
98 | "code": "image_e9fea105-0412-4600-a0f1-f606a003c63f", | ||
99 | "size": 74263, | ||
100 | "enable": true, | ||
101 | "name": "b2b1bb5f-a956-4930-9273-eb72920a9faa.png", | ||
102 | "fileUrl": "upload/image/category/icon_top6.png", | ||
103 | "id": 7509, | ||
104 | "type": 2, | ||
105 | "width": 202, | ||
106 | "height": 94 | ||
90 | } | 107 | } |
91 | ] | 108 | ] |
92 | } | 109 | } | ... | ... |
... | @@ -125,37 +125,37 @@ | ... | @@ -125,37 +125,37 @@ |
125 | { | 125 | { |
126 | "name": "Subject1", | 126 | "name": "Subject1", |
127 | "imageURL": "upload/image/main/block4_1.png", | 127 | "imageURL": "upload/image/main/block4_1.png", |
128 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\"}}]}", | 128 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\",\"currentIndex\":\"0\"}}]}", |
129 | "code": "promotionItem_e432ac2d-c1f3-4daehr4w5g4w5yh4w5yh" | 129 | "code": "promotionItem_e432ac2d-c1f3-4daehr4w5g4w5yh4w5yh" |
130 | }, | 130 | }, |
131 | { | 131 | { |
132 | "name": "Subject2", | 132 | "name": "Subject2", |
133 | "imageURL": "upload/image/main/block4_2.png", | 133 | "imageURL": "upload/image/main/block4_2.png", |
134 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\"}}]}", | 134 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\",\"currentIndex\":\"1\"}}]}", |
135 | "code": "promotionItem_f90b7ff3-1f36-401erhb54wyh4th" | 135 | "code": "promotionItem_f90b7ff3-1f36-401erhb54wyh4th" |
136 | }, | 136 | }, |
137 | { | 137 | { |
138 | "name": "Subject3", | 138 | "name": "Subject3", |
139 | "imageURL": "upload/image/main/block4_3.png", | 139 | "imageURL": "upload/image/main/block4_3.png", |
140 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\"}}]}", | 140 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\",\"currentIndex\":\"2\"}}]}", |
141 | "code": "promotionItem_e29b33e4-8954-4eerthy6rthg54er" | 141 | "code": "promotionItem_e29b33e4-8954-4eerthy6rthg54er" |
142 | }, | 142 | }, |
143 | { | 143 | { |
144 | "name": "Subject4", | 144 | "name": "Subject4", |
145 | "imageURL": "upload/image/main/block4_4.png", | 145 | "imageURL": "upload/image/main/block4_4.png", |
146 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\"}}]}", | 146 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\",\"currentIndex\":\"3\"}}]}", |
147 | "code": "promotionItem_e29b33e4-8954-vwregv54thw6" | 147 | "code": "promotionItem_e29b33e4-8954-vwregv54thw6" |
148 | }, | 148 | }, |
149 | { | 149 | { |
150 | "name": "Subject5", | 150 | "name": "Subject5", |
151 | "imageURL": "upload/image/main/block4_5.png", | 151 | "imageURL": "upload/image/main/block4_5.png", |
152 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\"}}]}", | 152 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\",\"currentIndex\":\"4\"}}]}", |
153 | "code": "promotionItem_e29b33e4-8954-bq4wrjhwbt4t" | 153 | "code": "promotionItem_e29b33e4-8954-bq4wrjhwbt4t" |
154 | }, | 154 | }, |
155 | { | 155 | { |
156 | "name": "Subject6", | 156 | "name": "Subject6", |
157 | "imageURL": "upload/image/main/block4_6.png", | 157 | "imageURL": "upload/image/main/block4_6.png", |
158 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\"}}]}", | 158 | "tvlink": "{\"click\":[{\"action\":\"ChangeScene\",\"parameters\":{\"sceneName\":\"sceneGameCategory\",\"currentIndex\":\"5\"}}]}", |
159 | "code": "promotionItem_57aea4b3-7716-4we5j56trhgser2" | 159 | "code": "promotionItem_57aea4b3-7716-4we5j56trhgser2" |
160 | } | 160 | } |
161 | ] | 161 | ] | ... | ... |
-
Please register or sign in to post a comment