1.修改分类页
Showing
11 changed files
with
114 additions
and
78 deletions
| ... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
| 17 | "__id__": 2 | 17 | "__id__": 2 |
| 18 | } | 18 | } |
| 19 | ], | 19 | ], |
| 20 | "_active": true, | 20 | "_active": false, |
| 21 | "_components": [], | 21 | "_components": [], |
| 22 | "_prefab": null, | 22 | "_prefab": null, |
| 23 | "_opacity": 255, | 23 | "_opacity": 255, |
| ... | @@ -189,7 +189,7 @@ | ... | @@ -189,7 +189,7 @@ |
| 189 | "array": [ | 189 | "array": [ |
| 190 | 0, | 190 | 0, |
| 191 | 0, | 191 | 0, |
| 192 | 265.0037841796875, | 192 | 271.0659484863281, |
| 193 | 0, | 193 | 0, |
| 194 | 0, | 194 | 0, |
| 195 | 0, | 195 | 0, |
| ... | @@ -643,7 +643,7 @@ | ... | @@ -643,7 +643,7 @@ |
| 643 | "__type__": "TypedArray", | 643 | "__type__": "TypedArray", |
| 644 | "ctor": "Float32Array", | 644 | "ctor": "Float32Array", |
| 645 | "array": [ | 645 | "array": [ |
| 646 | -485, | 646 | -505, |
| 647 | -43, | 647 | -43, |
| 648 | 0, | 648 | 0, |
| 649 | 0, | 649 | 0, |
| ... | @@ -951,7 +951,7 @@ | ... | @@ -951,7 +951,7 @@ |
| 951 | "alignMode": 2, | 951 | "alignMode": 2, |
| 952 | "_target": null, | 952 | "_target": null, |
| 953 | "_alignFlags": 9, | 953 | "_alignFlags": 9, |
| 954 | "_left": 30, | 954 | "_left": 10, |
| 955 | "_right": 0, | 955 | "_right": 0, |
| 956 | "_top": 128, | 956 | "_top": 128, |
| 957 | "_bottom": 0, | 957 | "_bottom": 0, |
| ... | @@ -999,7 +999,7 @@ | ... | @@ -999,7 +999,7 @@ |
| 999 | }, | 999 | }, |
| 1000 | "_contentSize": { | 1000 | "_contentSize": { |
| 1001 | "__type__": "cc.Size", | 1001 | "__type__": "cc.Size", |
| 1002 | "width": 900, | 1002 | "width": 1000, |
| 1003 | "height": 650 | 1003 | "height": 650 |
| 1004 | }, | 1004 | }, |
| 1005 | "_anchorPoint": { | 1005 | "_anchorPoint": { |
| ... | @@ -1023,7 +1023,7 @@ | ... | @@ -1023,7 +1023,7 @@ |
| 1023 | "__type__": "TypedArray", | 1023 | "__type__": "TypedArray", |
| 1024 | "ctor": "Float32Array", | 1024 | "ctor": "Float32Array", |
| 1025 | "array": [ | 1025 | "array": [ |
| 1026 | 148.5, | 1026 | 90, |
| 1027 | -35, | 1027 | -35, |
| 1028 | 0, | 1028 | 0, |
| 1029 | 0, | 1029 | 0, |
| ... | @@ -1077,7 +1077,7 @@ | ... | @@ -1077,7 +1077,7 @@ |
| 1077 | }, | 1077 | }, |
| 1078 | "_contentSize": { | 1078 | "_contentSize": { |
| 1079 | "__type__": "cc.Size", | 1079 | "__type__": "cc.Size", |
| 1080 | "width": 900, | 1080 | "width": 1020, |
| 1081 | "height": 650 | 1081 | "height": 650 |
| 1082 | }, | 1082 | }, |
| 1083 | "_anchorPoint": { | 1083 | "_anchorPoint": { |
| ... | @@ -1147,7 +1147,7 @@ | ... | @@ -1147,7 +1147,7 @@ |
| 1147 | }, | 1147 | }, |
| 1148 | "_contentSize": { | 1148 | "_contentSize": { |
| 1149 | "__type__": "cc.Size", | 1149 | "__type__": "cc.Size", |
| 1150 | "width": 900, | 1150 | "width": 1000, |
| 1151 | "height": 650 | 1151 | "height": 650 |
| 1152 | }, | 1152 | }, |
| 1153 | "_anchorPoint": { | 1153 | "_anchorPoint": { |
| ... | @@ -2114,7 +2114,7 @@ | ... | @@ -2114,7 +2114,7 @@ |
| 2114 | "alignMode": 1, | 2114 | "alignMode": 1, |
| 2115 | "_target": null, | 2115 | "_target": null, |
| 2116 | "_alignFlags": 12, | 2116 | "_alignFlags": 12, |
| 2117 | "_left": 338.5, | 2117 | "_left": 230, |
| 2118 | "_right": 0, | 2118 | "_right": 0, |
| 2119 | "_top": 119, | 2119 | "_top": 119, |
| 2120 | "_bottom": 0, | 2120 | "_bottom": 0, | ... | ... |
| ... | @@ -57,7 +57,7 @@ | ... | @@ -57,7 +57,7 @@ |
| 57 | "_is3DNode": true, | 57 | "_is3DNode": true, |
| 58 | "_groupIndex": 0, | 58 | "_groupIndex": 0, |
| 59 | "groupIndex": 0, | 59 | "groupIndex": 0, |
| 60 | "autoReleaseAssets": true, | 60 | "autoReleaseAssets": false, |
| 61 | "_id": "77eede39-2337-45ac-ba31-eb6e433ff217" | 61 | "_id": "77eede39-2337-45ac-ba31-eb6e433ff217" |
| 62 | }, | 62 | }, |
| 63 | { | 63 | { |
| ... | @@ -207,7 +207,7 @@ | ... | @@ -207,7 +207,7 @@ |
| 207 | "array": [ | 207 | "array": [ |
| 208 | 0, | 208 | 0, |
| 209 | 0, | 209 | 0, |
| 210 | 265.0037841796875, | 210 | 271.0659484863281, |
| 211 | 0, | 211 | 0, |
| 212 | 0, | 212 | 0, |
| 213 | 0, | 213 | 0, |
| ... | @@ -602,7 +602,7 @@ | ... | @@ -602,7 +602,7 @@ |
| 602 | }, | 602 | }, |
| 603 | "_contentSize": { | 603 | "_contentSize": { |
| 604 | "__type__": "cc.Size", | 604 | "__type__": "cc.Size", |
| 605 | "width": 216, | 605 | "width": 0, |
| 606 | "height": 63 | 606 | "height": 63 |
| 607 | }, | 607 | }, |
| 608 | "_anchorPoint": { | 608 | "_anchorPoint": { |
| ... | @@ -614,7 +614,7 @@ | ... | @@ -614,7 +614,7 @@ |
| 614 | "__type__": "TypedArray", | 614 | "__type__": "TypedArray", |
| 615 | "ctor": "Float32Array", | 615 | "ctor": "Float32Array", |
| 616 | "array": [ | 616 | "array": [ |
| 617 | 120, | 617 | 12, |
| 618 | 272.5, | 618 | 272.5, |
| 619 | 0, | 619 | 0, |
| 620 | 0, | 620 | 0, |
| ... | @@ -1345,7 +1345,7 @@ | ... | @@ -1345,7 +1345,7 @@ |
| 1345 | "__type__": "TypedArray", | 1345 | "__type__": "TypedArray", |
| 1346 | "ctor": "Float32Array", | 1346 | "ctor": "Float32Array", |
| 1347 | "array": [ | 1347 | "array": [ |
| 1348 | -78, | 1348 | 30, |
| 1349 | -36.400001525878906, | 1349 | -36.400001525878906, |
| 1350 | 0, | 1350 | 0, |
| 1351 | 0, | 1351 | 0, |
| ... | @@ -1469,7 +1469,7 @@ | ... | @@ -1469,7 +1469,7 @@ |
| 1469 | "__type__": "TypedArray", | 1469 | "__type__": "TypedArray", |
| 1470 | "ctor": "Float32Array", | 1470 | "ctor": "Float32Array", |
| 1471 | "array": [ | 1471 | "array": [ |
| 1472 | 54, | 1472 | 162, |
| 1473 | -36.400001525878906, | 1473 | -36.400001525878906, |
| 1474 | 0, | 1474 | 0, |
| 1475 | 0, | 1475 | 0, |
| ... | @@ -1593,7 +1593,7 @@ | ... | @@ -1593,7 +1593,7 @@ |
| 1593 | "__type__": "TypedArray", | 1593 | "__type__": "TypedArray", |
| 1594 | "ctor": "Float32Array", | 1594 | "ctor": "Float32Array", |
| 1595 | "array": [ | 1595 | "array": [ |
| 1596 | 243, | 1596 | 351, |
| 1597 | -36.400001525878906, | 1597 | -36.400001525878906, |
| 1598 | 0, | 1598 | 0, |
| 1599 | 0, | 1599 | 0, |
| ... | @@ -1691,8 +1691,8 @@ | ... | @@ -1691,8 +1691,8 @@ |
| 1691 | } | 1691 | } |
| 1692 | ], | 1692 | ], |
| 1693 | "_useOriginalSize": false, | 1693 | "_useOriginalSize": false, |
| 1694 | "_string": "疯狂赛车手手", | 1694 | "_string": "", |
| 1695 | "_N$string": "疯狂赛车手手", | 1695 | "_N$string": "", |
| 1696 | "_fontSize": 36, | 1696 | "_fontSize": 36, |
| 1697 | "_lineHeight": 50, | 1697 | "_lineHeight": 50, |
| 1698 | "_enableWrapText": true, | 1698 | "_enableWrapText": true, |
| ... | @@ -2137,7 +2137,7 @@ | ... | @@ -2137,7 +2137,7 @@ |
| 2137 | "_contentSize": { | 2137 | "_contentSize": { |
| 2138 | "__type__": "cc.Size", | 2138 | "__type__": "cc.Size", |
| 2139 | "width": 564, | 2139 | "width": 564, |
| 2140 | "height": 60 | 2140 | "height": 120 |
| 2141 | }, | 2141 | }, |
| 2142 | "_anchorPoint": { | 2142 | "_anchorPoint": { |
| 2143 | "__type__": "cc.Vec2", | 2143 | "__type__": "cc.Vec2", |
| ... | @@ -2149,7 +2149,7 @@ | ... | @@ -2149,7 +2149,7 @@ |
| 2149 | "ctor": "Float32Array", | 2149 | "ctor": "Float32Array", |
| 2150 | "array": [ | 2150 | "array": [ |
| 2151 | 294, | 2151 | 294, |
| 2152 | 191, | 2152 | 161, |
| 2153 | 0, | 2153 | 0, |
| 2154 | 0, | 2154 | 0, |
| 2155 | 0, | 2155 | 0, |
| ... | @@ -2260,8 +2260,8 @@ | ... | @@ -2260,8 +2260,8 @@ |
| 2260 | }, | 2260 | }, |
| 2261 | "_contentSize": { | 2261 | "_contentSize": { |
| 2262 | "__type__": "cc.Size", | 2262 | "__type__": "cc.Size", |
| 2263 | "width": 200, | 2263 | "width": 264, |
| 2264 | "height": 52 | 2264 | "height": 100 |
| 2265 | }, | 2265 | }, |
| 2266 | "_anchorPoint": { | 2266 | "_anchorPoint": { |
| 2267 | "__type__": "cc.Vec2", | 2267 | "__type__": "cc.Vec2", |
| ... | @@ -2272,8 +2272,8 @@ | ... | @@ -2272,8 +2272,8 @@ |
| 2272 | "__type__": "TypedArray", | 2272 | "__type__": "TypedArray", |
| 2273 | "ctor": "Float32Array", | 2273 | "ctor": "Float32Array", |
| 2274 | "array": [ | 2274 | "array": [ |
| 2275 | 112, | 2275 | 144, |
| 2276 | 13, | 2276 | 10, |
| 2277 | 0, | 2277 | 0, |
| 2278 | 0, | 2278 | 0, |
| 2279 | 0, | 2279 | 0, |
| ... | @@ -2313,7 +2313,7 @@ | ... | @@ -2313,7 +2313,7 @@ |
| 2313 | "_srcBlendFactor": 770, | 2313 | "_srcBlendFactor": 770, |
| 2314 | "_dstBlendFactor": 771, | 2314 | "_dstBlendFactor": 771, |
| 2315 | "_spriteFrame": { | 2315 | "_spriteFrame": { |
| 2316 | "__uuid__": "2c3552e2-5961-4541-ab46-068aeabbf034" | 2316 | "__uuid__": "74d68834-c4a7-44a8-b9e0-2fa2693ba5e4" |
| 2317 | }, | 2317 | }, |
| 2318 | "_type": 0, | 2318 | "_type": 0, |
| 2319 | "_sizeMode": 0, | 2319 | "_sizeMode": 0, |
| ... | @@ -2342,7 +2342,7 @@ | ... | @@ -2342,7 +2342,7 @@ |
| 2342 | "_alignFlags": 9, | 2342 | "_alignFlags": 9, |
| 2343 | "_left": 652, | 2343 | "_left": 652, |
| 2344 | "_right": 0, | 2344 | "_right": 0, |
| 2345 | "_top": 321, | 2345 | "_top": 300, |
| 2346 | "_bottom": 0, | 2346 | "_bottom": 0, |
| 2347 | "_verticalCenter": 0, | 2347 | "_verticalCenter": 0, |
| 2348 | "_horizontalCenter": 0, | 2348 | "_horizontalCenter": 0, |
| ... | @@ -2458,7 +2458,7 @@ | ... | @@ -2458,7 +2458,7 @@ |
| 2458 | "__id__": 2 | 2458 | "__id__": 2 |
| 2459 | }, | 2459 | }, |
| 2460 | "_children": [], | 2460 | "_children": [], |
| 2461 | "_active": true, | 2461 | "_active": false, |
| 2462 | "_components": [ | 2462 | "_components": [ |
| 2463 | { | 2463 | { |
| 2464 | "__id__": 56 | 2464 | "__id__": 56 |
| ... | @@ -2530,9 +2530,7 @@ | ... | @@ -2530,9 +2530,7 @@ |
| 2530 | ], | 2530 | ], |
| 2531 | "_srcBlendFactor": 770, | 2531 | "_srcBlendFactor": 770, |
| 2532 | "_dstBlendFactor": 771, | 2532 | "_dstBlendFactor": 771, |
| 2533 | "_spriteFrame": { | 2533 | "_spriteFrame": null, |
| 2534 | "__uuid__": "431c5199-fa09-462c-8892-21eb3d0e0b89" | ||
| 2535 | }, | ||
| 2536 | "_type": 0, | 2534 | "_type": 0, |
| 2537 | "_sizeMode": 0, | 2535 | "_sizeMode": 0, |
| 2538 | "_fillType": 0, | 2536 | "_fillType": 0, |
| ... | @@ -2576,7 +2574,7 @@ | ... | @@ -2576,7 +2574,7 @@ |
| 2576 | }, | 2574 | }, |
| 2577 | { | 2575 | { |
| 2578 | "__type__": "cc.Node", | 2576 | "__type__": "cc.Node", |
| 2579 | "_name": "New Label", | 2577 | "_name": "NewLabel", |
| 2580 | "_objFlags": 0, | 2578 | "_objFlags": 0, |
| 2581 | "_parent": { | 2579 | "_parent": { |
| 2582 | "__id__": 2 | 2580 | "__id__": 2 | ... | ... |
| ... | @@ -906,7 +906,7 @@ | ... | @@ -906,7 +906,7 @@ |
| 906 | "__id__": 35 | 906 | "__id__": 35 |
| 907 | } | 907 | } |
| 908 | ], | 908 | ], |
| 909 | "_active": true, | 909 | "_active": false, |
| 910 | "_components": [ | 910 | "_components": [ |
| 911 | { | 911 | { |
| 912 | "__id__": 40 | 912 | "__id__": 40 |
| ... | @@ -2054,7 +2054,7 @@ | ... | @@ -2054,7 +2054,7 @@ |
| 2054 | "__id__": 8 | 2054 | "__id__": 8 |
| 2055 | }, | 2055 | }, |
| 2056 | "_children": [], | 2056 | "_children": [], |
| 2057 | "_active": true, | 2057 | "_active": false, |
| 2058 | "_components": [ | 2058 | "_components": [ |
| 2059 | { | 2059 | { |
| 2060 | "__id__": 46 | 2060 | "__id__": 46 | ... | ... |
| ... | @@ -175,12 +175,12 @@ cc.Class({ | ... | @@ -175,12 +175,12 @@ cc.Class({ |
| 175 | // case BusinessParameter.CARTOON_APPID: | 175 | // case BusinessParameter.CARTOON_APPID: |
| 176 | // this._oSceneContext.focusPath = this._oSceneContext.focusPath || "SongList/DataContainerMask/DataContainer/ListCell0/SongTitleContainer"; | 176 | // this._oSceneContext.focusPath = this._oSceneContext.focusPath || "SongList/DataContainerMask/DataContainer/ListCell0/SongTitleContainer"; |
| 177 | this._strSongListCellComponentName = "pfbCategoryListCell"; | 177 | this._strSongListCellComponentName = "pfbCategoryListCell"; |
| 178 | this._iBeginPositionX = -289.5; | 178 | this._iBeginPositionX = -350; |
| 179 | this._iBeginPositionY = 196; | 179 | this._iBeginPositionY = 196; |
| 180 | this._iShowCellRows = 3; | 180 | this._iShowCellRows = 3; |
| 181 | this._iAlphaCellRows = 0; | 181 | this._iAlphaCellRows = 0; |
| 182 | this._iHiddenCellRows = 3; | 182 | this._iHiddenCellRows = 3; |
| 183 | this._iCellCountEachRow = 3; | 183 | this._iCellCountEachRow = 4; |
| 184 | this._fCellMarginTop = 0; | 184 | this._fCellMarginTop = 0; |
| 185 | this._fCellMarginRight = 24; | 185 | this._fCellMarginRight = 24; |
| 186 | this._fCellMarginBottom = 16; | 186 | this._fCellMarginBottom = 16; | ... | ... |
| ... | @@ -70,8 +70,8 @@ cc.Class({ | ... | @@ -70,8 +70,8 @@ cc.Class({ |
| 70 | this._nodeTypeList.addComponent(TVScrollParameter); | 70 | this._nodeTypeList.addComponent(TVScrollParameter); |
| 71 | 71 | ||
| 72 | // cc.find("Desc/Collect", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 172, 56)); | 72 | // cc.find("Desc/Collect", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 172, 56)); |
| 73 | cc.find("ButtonOpen", this.node).getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, 0, 278, 72)); | 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 | 76 | ||
| 77 | this._nodeTypeListWrapper = cc.find("TypeListArea/TypeListWrapper", this.node); | 77 | this._nodeTypeListWrapper = cc.find("TypeListArea/TypeListWrapper", this.node); |
| ... | @@ -281,8 +281,8 @@ cc.Class({ | ... | @@ -281,8 +281,8 @@ cc.Class({ |
| 281 | cc.find("Desc/LabelTime", this.node).getComponent(cc.Label).string = oJSONResult.resultSet[0].updateTime; | 281 | cc.find("Desc/LabelTime", this.node).getComponent(cc.Label).string = oJSONResult.resultSet[0].updateTime; |
| 282 | //这里给描述做拦截,防止字数多超出栏目 | 282 | //这里给描述做拦截,防止字数多超出栏目 |
| 283 | var description = oJSONResult.resultSet[0].description; | 283 | var description = oJSONResult.resultSet[0].description; |
| 284 | if (description.length > 55) { | 284 | if (description.length > 110) { |
| 285 | description = description.substring(0, 55) + "..."; | 285 | description = description.substring(0, 110) + "..."; |
| 286 | } | 286 | } |
| 287 | cc.find("Desc/LabelDesc", this.node).getComponent(cc.Label).string = description; | 287 | cc.find("Desc/LabelDesc", this.node).getComponent(cc.Label).string = description; |
| 288 | //搞标签 | 288 | //搞标签 |
| ... | @@ -369,7 +369,7 @@ cc.Class({ | ... | @@ -369,7 +369,7 @@ cc.Class({ |
| 369 | if (0 == nodeInitFocus.name.indexOf('Button')) { | 369 | if (0 == nodeInitFocus.name.indexOf('Button')) { |
| 370 | this._cFocus.hide(); | 370 | this._cFocus.hide(); |
| 371 | cc.loader.loadRes("GameDetail/icon_button_open", cc.Texture2D, function (err, texture) { | 371 | cc.loader.loadRes("GameDetail/icon_button_open", cc.Texture2D, function (err, texture) { |
| 372 | nodeInitFocus.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 72, 278, 72)); | 372 | nodeInitFocus.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 100, 264, 100)); |
| 373 | }); | 373 | }); |
| 374 | } | 374 | } |
| 375 | 375 | ||
| ... | @@ -510,7 +510,7 @@ cc.Class({ | ... | @@ -510,7 +510,7 @@ cc.Class({ |
| 510 | 510 | ||
| 511 | if (0 == fiFrom.node.getName().indexOf('ButtonOpen')) { | 511 | if (0 == fiFrom.node.getName().indexOf('ButtonOpen')) { |
| 512 | cc.loader.loadRes("GameDetail/icon_button_open", cc.Texture2D, function (err, texture) { | 512 | cc.loader.loadRes("GameDetail/icon_button_open", cc.Texture2D, function (err, texture) { |
| 513 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 278, 72)); | 513 | fiFrom.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 0, 264, 100)); |
| 514 | }); | 514 | }); |
| 515 | } | 515 | } |
| 516 | 516 | ||
| ... | @@ -545,7 +545,7 @@ cc.Class({ | ... | @@ -545,7 +545,7 @@ cc.Class({ |
| 545 | if (0 == fiTo.node.getName().indexOf('ButtonOpen')) { | 545 | if (0 == fiTo.node.getName().indexOf('ButtonOpen')) { |
| 546 | // fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height)); | 546 | // fiTo.node.getComponent(cc.Sprite).spriteFrame.setRect(cc.rect(0, fiTo.node.height, fiTo.node.width, fiTo.node.height)); |
| 547 | cc.loader.loadRes("GameDetail/icon_button_open", cc.Texture2D, function (err, texture) { | 547 | cc.loader.loadRes("GameDetail/icon_button_open", cc.Texture2D, function (err, texture) { |
| 548 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 72, 278, 72)); | 548 | fiTo.node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture, cc.rect(0, 100, 264, 100)); |
| 549 | }); | 549 | }); |
| 550 | } | 550 | } |
| 551 | 551 | ... | ... |
| ... | @@ -37,6 +37,9 @@ cc.Class({ | ... | @@ -37,6 +37,9 @@ cc.Class({ |
| 37 | 37 | ||
| 38 | cc.log("gameLoading包名:" + this._oSceneContext._downloadUrl); | 38 | cc.log("gameLoading包名:" + this._oSceneContext._downloadUrl); |
| 39 | 39 | ||
| 40 | if (!cc.sys.isNative) { | ||
| 41 | return; | ||
| 42 | } | ||
| 40 | if (this._oSceneContext._downloadUrl && this._oSceneContext._downloadUrl != "undefined") { //如果有下载地址就启动奥比游戏 | 43 | if (this._oSceneContext._downloadUrl && this._oSceneContext._downloadUrl != "undefined") { //如果有下载地址就启动奥比游戏 |
| 41 | jsb.reflection.callStaticMethod("com/topdraw/melody/TopdrawSDKWrapper", "startOBiGame", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", this._oSceneContext._downloadUrl, this._oSceneContext._packageName, this._oSceneContext._className, "updateProgress"); | 44 | jsb.reflection.callStaticMethod("com/topdraw/melody/TopdrawSDKWrapper", "startOBiGame", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", this._oSceneContext._downloadUrl, this._oSceneContext._packageName, this._oSceneContext._className, "updateProgress"); |
| 42 | } else { | 45 | } else { |
| ... | @@ -51,7 +54,6 @@ cc.Class({ | ... | @@ -51,7 +54,6 @@ cc.Class({ |
| 51 | let nodeBar = cc.find("ProgressBar/bar", this.node); | 54 | let nodeBar = cc.find("ProgressBar/bar", this.node); |
| 52 | nodeBar.width = strProgress / 100 * progressBarWidth; | 55 | nodeBar.width = strProgress / 100 * progressBarWidth; |
| 53 | 56 | ||
| 54 | // this._downloadUrl && this._downloadUrl != "undefined" && | ||
| 55 | if (strProgress == "100") { | 57 | if (strProgress == "100") { |
| 56 | this._bIsFocusInit = true; | 58 | this._bIsFocusInit = true; |
| 57 | this.backAScene(); | 59 | this.backAScene(); | ... | ... |
| ... | @@ -208,9 +208,20 @@ cc.Class({ | ... | @@ -208,9 +208,20 @@ cc.Class({ |
| 208 | 208 | ||
| 209 | self.getTopNaviRequest("topNavi"); | 209 | self.getTopNaviRequest("topNavi"); |
| 210 | self.getTopNaviRequest("topCell"); | 210 | self.getTopNaviRequest("topCell"); |
| 211 | |||
| 212 | self.getRecommendModelRequest(); | 211 | self.getRecommendModelRequest(); |
| 213 | self.getRightRecommendRequest(); // | 212 | |
| 213 | //在这里选择是初始化首页瀑布流还是初始化其他导航的列表数据 | ||
| 214 | if (this._oSceneContext._iCurrentLeftIndex == 1) { | ||
| 215 | cc.log("初始化瀑布流"); | ||
| 216 | self.getRightRecommendRequestData(); | ||
| 217 | cc.find("scrollContent/ViewPagerArea", this.node).active = true; | ||
| 218 | cc.find("scrollContent/BlockShadow", this.node).active = true; | ||
| 219 | } else { | ||
| 220 | this.getSimulateRequest(); | ||
| 221 | cc.find("scrollContent/ViewPagerArea", this.node).active = false; | ||
| 222 | cc.find("scrollContent/BlockShadow", this.node).active = false; | ||
| 223 | } | ||
| 224 | |||
| 214 | } catch (error) { | 225 | } catch (error) { |
| 215 | cc.log("Business Exception:Get getMainLayoutJsonRequest..." + error); | 226 | cc.log("Business Exception:Get getMainLayoutJsonRequest..." + error); |
| 216 | } | 227 | } |
| ... | @@ -361,16 +372,35 @@ cc.Class({ | ... | @@ -361,16 +372,35 @@ cc.Class({ |
| 361 | } | 372 | } |
| 362 | }, | 373 | }, |
| 363 | 374 | ||
| 375 | getRightRecommendRequestData: function () { | ||
| 376 | if (this._oInit.main_recommend) { | ||
| 377 | this.getRightRecommendRequest(); | ||
| 378 | return; | ||
| 379 | } | ||
| 380 | Network.ajax("GET", Common.TOPDRAW_API_SERVER + "main/main_recommend.json", null, null, | ||
| 381 | function (strResponse) { | ||
| 382 | try { | ||
| 383 | this._oInit.main_recommend = strResponse; | ||
| 384 | this.getRightRecommendRequest(); | ||
| 385 | } catch (error) { | ||
| 386 | cc.log("Business Exception:Get getRightRecommendRequest..." + error); | ||
| 387 | } | ||
| 388 | }, | ||
| 389 | function (strResponse) { | ||
| 390 | cc.log("Business Error:Get getRightRecommendRequest..." + strResponse); | ||
| 391 | }, this, "uuid"); | ||
| 392 | }, | ||
| 393 | |||
| 364 | //渲染推荐框架 | 394 | //渲染推荐框架 |
| 365 | getRightRecommendRequest: function () { | 395 | getRightRecommendRequest: function () { |
| 366 | var self = this; | 396 | var self = this; |
| 367 | var rightNodeLayout = this.targetAry[1].target; | 397 | var rightNodeLayout = this.targetAry[1].target; |
| 368 | Network.ajax("GET", Common.TOPDRAW_API_SERVER + "main/main_recommend.json", null, null, | 398 | // Network.ajax("GET", Common.TOPDRAW_API_SERVER + "main/main_recommend.json", null, null, |
| 369 | function (strResponse) { | 399 | // function (strResponse) { |
| 370 | try { | 400 | try { |
| 371 | // var arrModules = waterfall_model.waterfall; //拿到模拟数据 | 401 | // var arrModules = waterfall_model.waterfall; //拿到模拟数据 |
| 372 | // var arrModules = this.test_json.json; | 402 | // var arrModules = this.test_json.json; |
| 373 | var arrModules = JSON.parse(strResponse); | 403 | var arrModules = JSON.parse(this._oInit.main_recommend); |
| 374 | var bgHeight = 0; | 404 | var bgHeight = 0; |
| 375 | this._aBgHeight = []; | 405 | this._aBgHeight = []; |
| 376 | this._aBgHeight.push(0); | 406 | this._aBgHeight.push(0); |
| ... | @@ -596,20 +626,20 @@ cc.Class({ | ... | @@ -596,20 +626,20 @@ cc.Class({ |
| 596 | } catch (error) { | 626 | } catch (error) { |
| 597 | cc.log("Business Exception:Get getRightRecommendRequest..." + error); | 627 | cc.log("Business Exception:Get getRightRecommendRequest..." + error); |
| 598 | } | 628 | } |
| 599 | }, | 629 | // }, |
| 600 | function (strResponse) { | 630 | // function (strResponse) { |
| 601 | cc.log("Business Error:Get getRightRecommendRequest..." + strResponse); | 631 | // cc.log("Business Error:Get getRightRecommendRequest..." + strResponse); |
| 602 | }, this, "uuid"); | 632 | // }, this, "uuid"); |
| 603 | }, | 633 | }, |
| 604 | 634 | ||
| 605 | recoverFocusPath: function () { | 635 | recoverFocusPath: function () { |
| 606 | if (this._oSceneContext._iCurrentLeftIndex == 1) { | 636 | if (this._oSceneContext._iCurrentLeftIndex == 1) { |
| 607 | if (this._oSceneContext._iPageIndex == 1) { | 637 | if (this._oSceneContext._iPageIndex == 1) { |
| 608 | this.scheduleOnce(()=>{ | 638 | this.scheduleOnce(() => { |
| 609 | let fiFocusTarget = cc.find(this._oSceneContext.focusPath, this.node).getComponent(FocusInfo); | 639 | let fiFocusTarget = cc.find(this._oSceneContext.focusPath, this.node).getComponent(FocusInfo); |
| 610 | this._cFocus.flyFocus(this._fiCurrentFocus, fiFocusTarget, Common.MOVE_DIRECTION_DOWN, null, null); | 640 | this._cFocus.flyFocus(this._fiCurrentFocus, fiFocusTarget, Common.MOVE_DIRECTION_DOWN, null, null); |
| 611 | return; | 641 | return; |
| 612 | },0) | 642 | }, 0) |
| 613 | } | 643 | } |
| 614 | let height = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0; //-1,打补丁:解决回退回来页面对不上的bug | 644 | let height = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0; //-1,打补丁:解决回退回来页面对不上的bug |
| 615 | this.onScrollViewScrollStart(); | 645 | this.onScrollViewScrollStart(); |
| ... | @@ -978,6 +1008,7 @@ cc.Class({ | ... | @@ -978,6 +1008,7 @@ cc.Class({ |
| 978 | iTargetTopUp = fiFocusTarget.node.getParent().getComponent(cc.Widget).top; | 1008 | iTargetTopUp = fiFocusTarget.node.getParent().getComponent(cc.Widget).top; |
| 979 | } | 1009 | } |
| 980 | // cc.log("目标节点: "+fiCurrentFocus.node.name); | 1010 | // cc.log("目标节点: "+fiCurrentFocus.node.name); |
| 1011 | if (this._aBgHeight && this._aBgHeight.length > 0) { | ||
| 981 | let iCurrentFloorBottomUp = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0;//当前楼层底部高度 | 1012 | let iCurrentFloorBottomUp = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0;//当前楼层底部高度 |
| 982 | // cc.log(iCurrentFloorBottomUp + "目标节点的高度:" + iTargetTopUp); | 1013 | // cc.log(iCurrentFloorBottomUp + "目标节点的高度:" + iTargetTopUp); |
| 983 | if (this._bIsScrollViewMoving) { | 1014 | if (this._bIsScrollViewMoving) { |
| ... | @@ -1007,6 +1038,7 @@ cc.Class({ | ... | @@ -1007,6 +1038,7 @@ cc.Class({ |
| 1007 | return; | 1038 | return; |
| 1008 | } | 1039 | } |
| 1009 | } | 1040 | } |
| 1041 | } | ||
| 1010 | this.keyDownDirection(Common.MOVE_DIRECTION_UP); | 1042 | this.keyDownDirection(Common.MOVE_DIRECTION_UP); |
| 1011 | break; | 1043 | break; |
| 1012 | case cc.macro.KEY.right: | 1044 | case cc.macro.KEY.right: |
| ... | @@ -1041,6 +1073,7 @@ cc.Class({ | ... | @@ -1041,6 +1073,7 @@ cc.Class({ |
| 1041 | } else if (fiFocusTarget.node.getParent().getComponent(cc.Widget)) { | 1073 | } else if (fiFocusTarget.node.getParent().getComponent(cc.Widget)) { |
| 1042 | iTargetTop = fiFocusTarget.node.getParent().getComponent(cc.Widget).top; | 1074 | iTargetTop = fiFocusTarget.node.getParent().getComponent(cc.Widget).top; |
| 1043 | } | 1075 | } |
| 1076 | if (this._aBgHeight && this._aBgHeight.length > 0) { | ||
| 1044 | let iCurrentFloorBottom = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0;//当前楼层底部高度 | 1077 | let iCurrentFloorBottom = this._aBgHeight[this._oSceneContext._iPageIndex - 1] || 0;//当前楼层底部高度 |
| 1045 | // cc.log(iCurrentFloorBottom + "目标节点的高度:" + iTargetTop + "::" + this._oSceneContext._iPageIndex); | 1078 | // cc.log(iCurrentFloorBottom + "目标节点的高度:" + iTargetTop + "::" + this._oSceneContext._iPageIndex); |
| 1046 | if (this._bIsScrollViewMoving) { | 1079 | if (this._bIsScrollViewMoving) { |
| ... | @@ -1070,6 +1103,7 @@ cc.Class({ | ... | @@ -1070,6 +1103,7 @@ cc.Class({ |
| 1070 | return; | 1103 | return; |
| 1071 | } | 1104 | } |
| 1072 | } | 1105 | } |
| 1106 | } | ||
| 1073 | this.keyDownDirection(Common.MOVE_DIRECTION_DOWN); | 1107 | this.keyDownDirection(Common.MOVE_DIRECTION_DOWN); |
| 1074 | break; | 1108 | break; |
| 1075 | case cc.macro.KEY.left: | 1109 | case cc.macro.KEY.left: |
| ... | @@ -1277,14 +1311,16 @@ cc.Class({ | ... | @@ -1277,14 +1311,16 @@ cc.Class({ |
| 1277 | 1311 | ||
| 1278 | this._oSceneContext._iCurrentLeftIndex = iIndex; | 1312 | this._oSceneContext._iCurrentLeftIndex = iIndex; |
| 1279 | this.scheduleOnce(function () { | 1313 | this.scheduleOnce(function () { |
| 1280 | // this.requestMediaList(1); //重新渲染CategoryList | ||
| 1281 | this.getSimulateRequest(); | 1314 | this.getSimulateRequest(); |
| 1282 | }, 0); | 1315 | }, 0); |
| 1283 | // this.renderCategoryList(1); | ||
| 1284 | 1316 | ||
| 1285 | var rightNodeLayout = this.targetAry[1].target; | 1317 | var rightNodeLayout = this.targetAry[1].target; |
| 1286 | 1318 | ||
| 1287 | if (iIndex == 1) { | 1319 | if (iIndex == 1) { |
| 1320 | this.scheduleOnce(function () { | ||
| 1321 | // this.getRightRecommendRequestData(); | ||
| 1322 | }, 0); | ||
| 1323 | |||
| 1288 | cc.find("scrollContent/ViewPagerArea", this.node).active = true; | 1324 | cc.find("scrollContent/ViewPagerArea", this.node).active = true; |
| 1289 | cc.find("scrollContent/BlockShadow", this.node).active = true; | 1325 | cc.find("scrollContent/BlockShadow", this.node).active = true; |
| 1290 | // cc.find("scrollContent/CategoryListRecommendLayout", this.node).active = false; | 1326 | // cc.find("scrollContent/CategoryListRecommendLayout", this.node).active = false; |
| ... | @@ -1513,11 +1549,11 @@ cc.Class({ | ... | @@ -1513,11 +1549,11 @@ cc.Class({ |
| 1513 | // this.panel.byteProgress.progress = 0; | 1549 | // this.panel.byteProgress.progress = 0; |
| 1514 | 1550 | ||
| 1515 | this._bAbleHotUpdate = true; | 1551 | this._bAbleHotUpdate = true; |
| 1516 | this._iSceneStatus = 1; //焦点框跳转层级 | 1552 | // this._iSceneStatus = 1; //焦点框跳转层级 |
| 1517 | cc.find("update", this.node).active = true; //显示出来更新面板 | 1553 | // cc.find("update", this.node).active = true; //显示出来更新面板 |
| 1518 | this._cFocus.show(); | 1554 | // this._cFocus.show(); |
| 1519 | let fiHotUpdateBtn = cc.find('update/update_panel/update_btn', this.node).getComponent(FocusInfo); //热更新按钮 | 1555 | // let fiHotUpdateBtn = cc.find('update/update_panel/update_btn', this.node).getComponent(FocusInfo); //热更新按钮 |
| 1520 | this._cFocus.flyFocus(this._fiCurrentFocus, fiHotUpdateBtn, Common.MOVE_DIRECTION_RIGHT, null, null); | 1556 | // this._cFocus.flyFocus(this._fiCurrentFocus, fiHotUpdateBtn, Common.MOVE_DIRECTION_RIGHT, null, null); |
| 1521 | 1557 | ||
| 1522 | break; | 1558 | break; |
| 1523 | default: | 1559 | default: |
| ... | @@ -1528,9 +1564,9 @@ cc.Class({ | ... | @@ -1528,9 +1564,9 @@ cc.Class({ |
| 1528 | this._checkListener = null; | 1564 | this._checkListener = null; |
| 1529 | this._updating = false; | 1565 | this._updating = false; |
| 1530 | 1566 | ||
| 1531 | // if (this._bAbleHotUpdate) { | 1567 | if (this._bAbleHotUpdate) { |
| 1532 | // this.hotUpdate(); //放在这里可以静默升级 | 1568 | this.hotUpdate(); //放在这里可以静默升级 |
| 1533 | // } | 1569 | } |
| 1534 | }, | 1570 | }, |
| 1535 | 1571 | ||
| 1536 | hotUpdate: function () { | 1572 | hotUpdate: function () { | ... | ... |
| ... | @@ -49,8 +49,8 @@ | ... | @@ -49,8 +49,8 @@ |
| 49 | }, | 49 | }, |
| 50 | "_contentSize": { | 50 | "_contentSize": { |
| 51 | "__type__": "cc.Size", | 51 | "__type__": "cc.Size", |
| 52 | "width": 270, | 52 | "width": 221, |
| 53 | "height": 192 | 53 | "height": 176 |
| 54 | }, | 54 | }, |
| 55 | "_anchorPoint": { | 55 | "_anchorPoint": { |
| 56 | "__type__": "cc.Vec2", | 56 | "__type__": "cc.Vec2", |
| ... | @@ -128,8 +128,8 @@ | ... | @@ -128,8 +128,8 @@ |
| 128 | }, | 128 | }, |
| 129 | "_contentSize": { | 129 | "_contentSize": { |
| 130 | "__type__": "cc.Size", | 130 | "__type__": "cc.Size", |
| 131 | "width": 270, | 131 | "width": 221, |
| 132 | "height": 152 | 132 | "height": 136 |
| 133 | }, | 133 | }, |
| 134 | "_anchorPoint": { | 134 | "_anchorPoint": { |
| 135 | "__type__": "cc.Vec2", | 135 | "__type__": "cc.Vec2", |
| ... | @@ -812,7 +812,7 @@ | ... | @@ -812,7 +812,7 @@ |
| 812 | }, | 812 | }, |
| 813 | "_contentSize": { | 813 | "_contentSize": { |
| 814 | "__type__": "cc.Size", | 814 | "__type__": "cc.Size", |
| 815 | "width": 270, | 815 | "width": 221, |
| 816 | "height": 40 | 816 | "height": 40 |
| 817 | }, | 817 | }, |
| 818 | "_anchorPoint": { | 818 | "_anchorPoint": { |
| ... | @@ -825,7 +825,7 @@ | ... | @@ -825,7 +825,7 @@ |
| 825 | "ctor": "Float32Array", | 825 | "ctor": "Float32Array", |
| 826 | "array": [ | 826 | "array": [ |
| 827 | 0, | 827 | 0, |
| 828 | -76, | 828 | -68, |
| 829 | 0, | 829 | 0, |
| 830 | 0, | 830 | 0, |
| 831 | 0, | 831 | 0, |
| ... | @@ -876,7 +876,7 @@ | ... | @@ -876,7 +876,7 @@ |
| 876 | }, | 876 | }, |
| 877 | "_contentSize": { | 877 | "_contentSize": { |
| 878 | "__type__": "cc.Size", | 878 | "__type__": "cc.Size", |
| 879 | "width": 270, | 879 | "width": 221, |
| 880 | "height": 40 | 880 | "height": 40 |
| 881 | }, | 881 | }, |
| 882 | "_anchorPoint": { | 882 | "_anchorPoint": { |
| ... | @@ -998,7 +998,7 @@ | ... | @@ -998,7 +998,7 @@ |
| 998 | "__type__": "TypedArray", | 998 | "__type__": "TypedArray", |
| 999 | "ctor": "Float32Array", | 999 | "ctor": "Float32Array", |
| 1000 | "array": [ | 1000 | "array": [ |
| 1001 | -125, | 1001 | -100.5, |
| 1002 | 0, | 1002 | 0, |
| 1003 | 0, | 1003 | 0, |
| 1004 | 0, | 1004 | 0, |
| ... | @@ -1165,7 +1165,7 @@ | ... | @@ -1165,7 +1165,7 @@ |
| 1165 | }, | 1165 | }, |
| 1166 | "_contentSize": { | 1166 | "_contentSize": { |
| 1167 | "__type__": "cc.Size", | 1167 | "__type__": "cc.Size", |
| 1168 | "width": 270, | 1168 | "width": 221, |
| 1169 | "height": 40 | 1169 | "height": 40 |
| 1170 | }, | 1170 | }, |
| 1171 | "_anchorPoint": { | 1171 | "_anchorPoint": { |
| ... | @@ -1241,7 +1241,7 @@ | ... | @@ -1241,7 +1241,7 @@ |
| 1241 | }, | 1241 | }, |
| 1242 | "_contentSize": { | 1242 | "_contentSize": { |
| 1243 | "__type__": "cc.Size", | 1243 | "__type__": "cc.Size", |
| 1244 | "width": 270, | 1244 | "width": 221, |
| 1245 | "height": 40 | 1245 | "height": 40 |
| 1246 | }, | 1246 | }, |
| 1247 | "_anchorPoint": { | 1247 | "_anchorPoint": { |
| ... | @@ -1590,7 +1590,7 @@ | ... | @@ -1590,7 +1590,7 @@ |
| 1590 | }, | 1590 | }, |
| 1591 | "_contentSize": { | 1591 | "_contentSize": { |
| 1592 | "__type__": "cc.Size", | 1592 | "__type__": "cc.Size", |
| 1593 | "width": 250, | 1593 | "width": 200, |
| 1594 | "height": 40 | 1594 | "height": 40 |
| 1595 | }, | 1595 | }, |
| 1596 | "_anchorPoint": { | 1596 | "_anchorPoint": { |
| ... | @@ -1669,7 +1669,7 @@ | ... | @@ -1669,7 +1669,7 @@ |
| 1669 | }, | 1669 | }, |
| 1670 | "_contentSize": { | 1670 | "_contentSize": { |
| 1671 | "__type__": "cc.Size", | 1671 | "__type__": "cc.Size", |
| 1672 | "width": 250, | 1672 | "width": 200, |
| 1673 | "height": 40 | 1673 | "height": 40 |
| 1674 | }, | 1674 | }, |
| 1675 | "_anchorPoint": { | 1675 | "_anchorPoint": { |
| ... | @@ -2123,7 +2123,7 @@ | ... | @@ -2123,7 +2123,7 @@ |
| 2123 | }, | 2123 | }, |
| 2124 | "_contentSize": { | 2124 | "_contentSize": { |
| 2125 | "__type__": "cc.Size", | 2125 | "__type__": "cc.Size", |
| 2126 | "width": 250, | 2126 | "width": 200, |
| 2127 | "height": 40 | 2127 | "height": 40 |
| 2128 | }, | 2128 | }, |
| 2129 | "_anchorPoint": { | 2129 | "_anchorPoint": { | ... | ... |
| ... | @@ -173,7 +173,7 @@ public class TopdrawSDKWrapper { | ... | @@ -173,7 +173,7 @@ public class TopdrawSDKWrapper { |
| 173 | _activity.startActivity(intent); | 173 | _activity.startActivity(intent); |
| 174 | pluginLoaded = false; | 174 | pluginLoaded = false; |
| 175 | 175 | ||
| 176 | _activity.runOnUiThread(new Runnable() { //直接加载游戏,传回去进度是100 | 176 | _activity.runOnUiThread(new Runnable() { |
| 177 | @Override | 177 | @Override |
| 178 | public void run() { | 178 | public void run() { |
| 179 | singleColorView.setVisibility(View.VISIBLE); //展示单色背景,解决透明度问题 | 179 | singleColorView.setVisibility(View.VISIBLE); //展示单色背景,解决透明度问题 | ... | ... |
-
Please register or sign in to post a comment