From 312c61d3fa20c8f1303ba3aca777da98590c6bc0 Mon Sep 17 00:00:00 2001 From: zhl Date: Fri, 7 Aug 2020 20:44:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E6=8E=92=E8=A1=8C=E6=A6=9C=E6=8D=A2?= =?UTF-8?q?=E6=88=90=E4=BB=8Eapk=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/prefab/nodeOver.prefab | 53 ++-- assets/prefab/pbRank.prefab | 233 +++++++++++------- .../texture/comppreload/default_avatar.png | Bin 0 -> 792 bytes assets/scene/Main.fire | 65 ++--- assets/scriptes/UIRankBattle.js | 2 +- assets/scriptes/cc/service/jcrank.js | 108 +++++--- assets/scriptes/layer/gameScene.js | 8 +- assets/scriptes/pbRank.js | 5 +- assets/scriptes/prefab/UIRank.js | 1 - library/uuid-to-mtime.json | 97 ++++---- 10 files changed, 351 insertions(+), 221 deletions(-) create mode 100644 assets/resources/texture/comppreload/default_avatar.png diff --git a/assets/prefab/nodeOver.prefab b/assets/prefab/nodeOver.prefab index f6dd8be..4a7edd8 100644 --- a/assets/prefab/nodeOver.prefab +++ b/assets/prefab/nodeOver.prefab @@ -851,7 +851,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 230.08, + "width": 308.16, "height": 92.72 }, "_anchorPoint": { @@ -899,8 +899,8 @@ } ], "_useOriginalSize": false, - "_string": "Current score:", - "_N$string": "Current score:", + "_string": "label.current_score", + "_N$string": "label.current_score", "_fontSize": 36, "_lineHeight": 72, "_enableWrapText": true, @@ -1885,10 +1885,16 @@ "__id__": 54 }, "_enabled": true, - "_materials": [], + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], "_srcBlendFactor": 770, "_dstBlendFactor": 771, - "_spriteFrame": null, + "_spriteFrame": { + "__uuid__": "13c2d59c-6122-4dee-a0ce-50695e563838" + }, "_type": 0, "_sizeMode": 0, "_fillType": 0, @@ -2456,7 +2462,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 23.13, + "width": 60, "height": 49.88 }, "_anchorPoint": { @@ -2516,7 +2522,7 @@ "_N$horizontalAlign": 1, "_N$verticalAlign": 1, "_N$fontFamily": "Arial", - "_N$overflow": 0, + "_N$overflow": 2, "_N$cacheMode": 0, "_id": "" }, @@ -2590,6 +2596,7 @@ "__id__": 46 }, "tipTag": false, + "default_avatar": "texture/comppreload/default_avatar", "_id": "" }, { @@ -3099,10 +3106,16 @@ "__id__": 89 }, "_enabled": true, - "_materials": [], + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], "_srcBlendFactor": 770, "_dstBlendFactor": 771, - "_spriteFrame": null, + "_spriteFrame": { + "__uuid__": "13c2d59c-6122-4dee-a0ce-50695e563838" + }, "_type": 0, "_sizeMode": 0, "_fillType": 0, @@ -3670,7 +3683,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 23.13, + "width": 60, "height": 49.88 }, "_anchorPoint": { @@ -3730,7 +3743,7 @@ "_N$horizontalAlign": 1, "_N$verticalAlign": 1, "_N$fontFamily": "Arial", - "_N$overflow": 0, + "_N$overflow": 2, "_N$cacheMode": 0, "_id": "" }, @@ -3804,6 +3817,7 @@ "__id__": 81 }, "tipTag": false, + "default_avatar": "texture/comppreload/default_avatar", "_id": "" }, { @@ -4313,10 +4327,16 @@ "__id__": 124 }, "_enabled": true, - "_materials": [], + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], "_srcBlendFactor": 770, "_dstBlendFactor": 771, - "_spriteFrame": null, + "_spriteFrame": { + "__uuid__": "13c2d59c-6122-4dee-a0ce-50695e563838" + }, "_type": 0, "_sizeMode": 0, "_fillType": 0, @@ -4884,7 +4904,7 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 23.13, + "width": 60, "height": 49.88 }, "_anchorPoint": { @@ -4944,7 +4964,7 @@ "_N$horizontalAlign": 1, "_N$verticalAlign": 1, "_N$fontFamily": "Arial", - "_N$overflow": 0, + "_N$overflow": 2, "_N$cacheMode": 0, "_id": "" }, @@ -5018,6 +5038,7 @@ "__id__": 116 }, "tipTag": false, + "default_avatar": "texture/comppreload/default_avatar", "_id": "" }, { @@ -5635,7 +5656,7 @@ "_srcBlendFactor": 770, "_dstBlendFactor": 771, "_spriteFrame": { - "__uuid__": "91be20ae-2782-48fa-abdb-1169eaf8813d" + "__uuid__": "cf3c4f04-2110-46f0-adbb-d7fe3f8b6743" }, "_type": 1, "_sizeMode": 0, diff --git a/assets/prefab/pbRank.prefab b/assets/prefab/pbRank.prefab index f41682c..8f6919b 100644 --- a/assets/prefab/pbRank.prefab +++ b/assets/prefab/pbRank.prefab @@ -8,7 +8,8 @@ "__id__": 1 }, "optimizationPolicy": 0, - "asyncLoadAssets": false + "asyncLoadAssets": false, + "readonly": false }, { "__type__": "cc.Node", @@ -78,18 +79,19 @@ "y": 1, "z": 1 }, - "_rotationX": 0, - "_rotationY": 0, - "_skewX": 0, - "_skewY": 0, - "groupIndex": 0, - "_id": "", "_eulerAngles": { "__type__": "cc.Vec3", "x": 0, "y": 0, "z": 0 - } + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "groupIndex": 0, + "_rotationX": 0, + "_rotationY": 0, + "_id": "" }, { "__type__": "cc.Node", @@ -139,18 +141,19 @@ "y": 1, "z": 1 }, - "_rotationX": 0, - "_rotationY": 0, - "_skewX": 0, - "_skewY": 0, - "groupIndex": 0, - "_id": "", "_eulerAngles": { "__type__": "cc.Vec3", "x": 0, "y": 0, "z": 0 - } + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "groupIndex": 0, + "_rotationX": 0, + "_rotationY": 0, + "_id": "" }, { "__type__": "cc.Sprite", @@ -160,6 +163,11 @@ "__id__": 2 }, "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], "_srcBlendFactor": 770, "_dstBlendFactor": 771, "_spriteFrame": { @@ -176,7 +184,6 @@ "_fillStart": 0, "_fillRange": 0, "_isTrimmedMode": true, - "_state": 0, "_atlas": null, "_id": "" }, @@ -239,18 +246,19 @@ "y": 1, "z": 1 }, - "_rotationX": 0, - "_rotationY": 0, - "_skewX": 0, - "_skewY": 0, - "groupIndex": 0, - "_id": "", "_eulerAngles": { "__type__": "cc.Vec3", "x": 0, "y": 0, "z": 0 - } + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "groupIndex": 0, + "_rotationX": 0, + "_rotationY": 0, + "_id": "" }, { "__type__": "cc.Sprite", @@ -260,6 +268,11 @@ "__id__": 5 }, "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], "_srcBlendFactor": 770, "_dstBlendFactor": 771, "_spriteFrame": { @@ -276,7 +289,6 @@ "_fillStart": 0, "_fillRange": 0, "_isTrimmedMode": true, - "_state": 0, "_atlas": null, "_id": "" }, @@ -343,18 +355,19 @@ "y": 1, "z": 1 }, - "_rotationX": 0, - "_rotationY": 0, - "_skewX": 0, - "_skewY": 0, - "groupIndex": 0, - "_id": "", "_eulerAngles": { "__type__": "cc.Vec3", "x": 0, "y": 0, "z": 0 - } + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "groupIndex": 0, + "_rotationX": 0, + "_rotationY": 0, + "_id": "" }, { "__type__": "cc.Node", @@ -408,18 +421,19 @@ "y": 1, "z": 1 }, - "_rotationX": 0, - "_rotationY": 0, - "_skewX": 0, - "_skewY": 0, - "groupIndex": 0, - "_id": "", "_eulerAngles": { "__type__": "cc.Vec3", "x": 0, "y": 0, "z": 0 - } + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "groupIndex": 0, + "_rotationX": 0, + "_rotationY": 0, + "_id": "" }, { "__type__": "cc.Node", @@ -469,18 +483,19 @@ "y": 1, "z": 1 }, - "_rotationX": 0, - "_rotationY": 0, - "_skewX": 0, - "_skewY": 0, - "groupIndex": 0, - "_id": "", "_eulerAngles": { "__type__": "cc.Vec3", "x": 0, "y": 0, "z": 0 - } + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "groupIndex": 0, + "_rotationX": 0, + "_rotationY": 0, + "_id": "" }, { "__type__": "cc.Sprite", @@ -490,9 +505,16 @@ "__id__": 10 }, "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], "_srcBlendFactor": 770, "_dstBlendFactor": 771, - "_spriteFrame": null, + "_spriteFrame": { + "__uuid__": "13c2d59c-6122-4dee-a0ce-50695e563838" + }, "_type": 0, "_sizeMode": 0, "_fillType": 0, @@ -504,7 +526,6 @@ "_fillStart": 0, "_fillRange": 0, "_isTrimmedMode": true, - "_state": 0, "_atlas": null, "_id": "" }, @@ -527,6 +548,11 @@ "__id__": 9 }, "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], "_spriteFrame": null, "_type": 1, "_segments": 64, @@ -553,6 +579,11 @@ "__id__": 8 }, "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], "_srcBlendFactor": 770, "_dstBlendFactor": 771, "_spriteFrame": { @@ -569,7 +600,6 @@ "_fillStart": 0, "_fillRange": 0, "_isTrimmedMode": true, - "_state": 0, "_atlas": null, "_id": "" }, @@ -632,18 +662,19 @@ "y": 1, "z": 1 }, - "_rotationX": 0, - "_rotationY": 0, - "_skewX": 0, - "_skewY": 0, - "groupIndex": 0, - "_id": "", "_eulerAngles": { "__type__": "cc.Vec3", "x": 0, "y": 0, "z": 0 - } + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "groupIndex": 0, + "_rotationX": 0, + "_rotationY": 0, + "_id": "" }, { "__type__": "cc.Label", @@ -653,6 +684,11 @@ "__id__": 17 }, "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], "_useOriginalSize": false, "_string": "名字七个字玩家", "_N$string": "名字七个字玩家", @@ -733,18 +769,19 @@ "y": 1, "z": 1 }, - "_rotationX": 0, - "_rotationY": 0, - "_skewX": 0, - "_skewY": 0, - "groupIndex": 0, - "_id": "", "_eulerAngles": { "__type__": "cc.Vec3", "x": 0, "y": 0, "z": 0 - } + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "groupIndex": 0, + "_rotationX": 0, + "_rotationY": 0, + "_id": "" }, { "__type__": "cc.Node", @@ -778,7 +815,7 @@ "_contentSize": { "__type__": "cc.Size", "width": 102.11, - "height": 38 + "height": 49.88 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -797,18 +834,19 @@ "y": 1, "z": 1 }, - "_rotationX": 0, - "_rotationY": 0, - "_skewX": 0, - "_skewY": 0, - "groupIndex": 0, - "_id": "", "_eulerAngles": { "__type__": "cc.Vec3", "x": 0, "y": 0, "z": 0 - } + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "groupIndex": 0, + "_rotationX": 0, + "_rotationY": 0, + "_id": "" }, { "__type__": "cc.Label", @@ -818,6 +856,11 @@ "__id__": 21 }, "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], "_useOriginalSize": false, "_string": "121722", "_N$string": "121722", @@ -872,6 +915,11 @@ "__id__": 20 }, "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], "_srcBlendFactor": 770, "_dstBlendFactor": 771, "_spriteFrame": { @@ -888,7 +936,6 @@ "_fillStart": 0, "_fillRange": 0, "_isTrimmedMode": true, - "_state": 0, "_atlas": null, "_id": "" }, @@ -951,18 +998,19 @@ "y": 1, "z": 1 }, - "_rotationX": 0, - "_rotationY": 0, - "_skewX": 0, - "_skewY": 0, - "groupIndex": 0, - "_id": "", "_eulerAngles": { "__type__": "cc.Vec3", "x": 0, "y": 0, "z": 0 - } + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "groupIndex": 0, + "_rotationX": 0, + "_rotationY": 0, + "_id": "" }, { "__type__": "cc.Sprite", @@ -972,6 +1020,7 @@ "__id__": 27 }, "_enabled": true, + "_materials": [], "_srcBlendFactor": 770, "_dstBlendFactor": 771, "_spriteFrame": { @@ -988,7 +1037,6 @@ "_fillStart": 0, "_fillRange": 0, "_isTrimmedMode": true, - "_state": 0, "_atlas": null, "_id": "" }, @@ -1034,8 +1082,8 @@ }, "_contentSize": { "__type__": "cc.Size", - "width": 23.13, - "height": 38 + "width": 60, + "height": 49.88 }, "_anchorPoint": { "__type__": "cc.Vec2", @@ -1054,18 +1102,19 @@ "y": 1, "z": 1 }, - "_rotationX": 0, - "_rotationY": 0, - "_skewX": 0, - "_skewY": 0, - "groupIndex": 0, - "_id": "", "_eulerAngles": { "__type__": "cc.Vec3", "x": 0, "y": 0, "z": 0 - } + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "groupIndex": 0, + "_rotationX": 0, + "_rotationY": 0, + "_id": "" }, { "__type__": "cc.Label", @@ -1075,6 +1124,11 @@ "__id__": 30 }, "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], "_useOriginalSize": false, "_string": "4", "_N$string": "4", @@ -1088,7 +1142,7 @@ "_N$horizontalAlign": 1, "_N$verticalAlign": 1, "_N$fontFamily": "Arial", - "_N$overflow": 0, + "_N$overflow": 2, "_N$cacheMode": 0, "_id": "" }, @@ -1162,6 +1216,7 @@ "__id__": 2 }, "tipTag": false, + "default_avatar": "texture/comppreload/default_avatar", "_id": "" }, { diff --git a/assets/resources/texture/comppreload/default_avatar.png b/assets/resources/texture/comppreload/default_avatar.png new file mode 100644 index 0000000000000000000000000000000000000000..48f47f09859355beaed79ca39282b76fe970c55c GIT binary patch literal 792 zcmV+z1LypSP)Px%!bwCyR9M5sSG^IYIt-*P1xhp{rEb6lPy$8J0xi%2 zF$K_pDFKBm8$9xHvlf10H<210v^yx8vp=R3IIS~ zr93^Yn*dmR3$zicYNfys5OjMz-CWjc5CHIrVTIFSZ~y??4So?~p@mit2*=ud+n0|% z?kkl1_%+DXSZWw{H&%lH0J_6Kn-fLD>Pnv&=uFB}V@x*nvKj;c>J|W4FR=_)15~T% zRbrs4fm4J0hX0tKI{^1F@sb1(N_QMl(_Yu-ALwEP&@d{?4)txG!336F{9~7!pAL1Q?%=$TFn5Z?b^!AUzc< z_jxcMpHGEMitz*hEgOqn0o2WbOo*9G>m_(P0b=X$Y^p|m+D6XGnpxE%0FypQZrFO28zWeC|@1Q49OEu<{N?D<0_x}P2}ihR-nxzk+? z#&1iRNqp@{RY{s|oTjmFlvItau8sJPz=Z049q3EPY^tWJYN{sG#0NveT=+g^fBJr# zJ4eLKOyt^AO6EGb&+6gw<~dgsJ^hSGrDFfj%i@QC$1em&QB@Bb#*;FuCk2(1Nf!@f z{6?_Hu>H5W`5OUhIuTIw@%>%f)!(JyNW$j9@ReX|vGJ$6@E3BkW_KcR0n4|w^_M?! W=0G}FgMaG)0000 { // httpclient.httpPost(url, this.jsonToKeyVal(data), (restext) => { @@ -88,31 +100,10 @@ module.exports = { * @title {string} 段位 * */ updateRank(score, successcb, failcb, title) { - if(!this.url){ - failcb && failcb(0, -1234, 'not inited!'); - return; - } - this.nickname = this.nickname || cc.jc.nickName; - if(!this.nickname && !this.avatar_url) { - failcb && failcb(0, -1234, 'not login!'); - return; - } - const url = `${this.url}/rank/update` - let data = {gameId: this.gameid, - channelId: this.channelid, - accountId: this.owner.accountID, - score: score, - nickname: this.nickname, - avatar: this.avatar_url, - needType: 1, - }; - httpclient.httpPost(url, this.jsonToKeyVal(data), (restext) => { - // httpclient.httpPost(url, this.jsonToKeyVal(data), (restext) => { - let obj + if (cc.sys.isNative && cc.sys.os === cc.sys.OS_ANDROID && cc.jc.useLocal) { + let data = jsb.reflection.callStaticMethod('com/jc/jcfw/JcSDK', 'updateRank', '(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;', this.owner.accountID, this.nickname, score); try { - obj = httpclient.JSON_parse(restext); - } catch (err) {} - if(obj && obj.errcode === 0){ + let obj = JSON.parse(data); let datas = []; if (obj.preRecord) { obj.preRecord.rank += 1; @@ -129,15 +120,64 @@ module.exports = { datas.push(obj.nextRecord); } successcb && successcb(datas); - }else{ - console.log('[reqRankList]failed!'+ obj ? obj.errcode : '' +":"+ obj ? obj.errmsg : ''); - failcb && failcb(0, obj ? obj.errcode : -1235, obj ? obj.errmsg : ''); - } - }, (errcode, errmsg) => { - console.log('[updateRank]failed!'+errcode+":"+errmsg); - failcb && failcb(errcode, 0, errmsg); - }); + } catch (err) { + console.log('parse json error'); + failcb && failcb(errcode, 0, errmsg); + } + } else { + if(!this.url){ + failcb && failcb(0, -1234, 'not inited!'); + return; + } + this.nickname = this.nickname || cc.jc.nickName; + if(!this.nickname && !this.avatar_url) { + failcb && failcb(0, -1234, 'not login!'); + return; + } + const url = `${this.url}/rank/update` + let data = {gameId: this.gameid, + channelId: this.channelid, + accountId: this.owner.accountID, + score: score, + nickname: this.nickname, + avatar: this.avatar_url, + needType: 1, + }; + httpclient.httpPost(url, this.jsonToKeyVal(data), (restext) => { + // httpclient.httpPost(url, this.jsonToKeyVal(data), (restext) => { + let obj + try { + obj = httpclient.JSON_parse(restext); + } catch (err) {} + if(obj && obj.errcode === 0){ + let datas = []; + if (obj.preRecord) { + obj.preRecord.rank += 1; + datas.push(obj.preRecord); + } + datas.push({ + score: obj.userScore, + rank: obj.userRank + 1, + avatar: this.avatar_url, + nickname: this.nickname, + }) + if (obj.nextRecord) { + obj.nextRecord.rank += 1; + datas.push(obj.nextRecord); + } + successcb && successcb(datas); + }else{ + console.log('[reqRankList]failed!'+ obj ? obj.errcode : '' +":"+ obj ? obj.errmsg : ''); + failcb && failcb(0, obj ? obj.errcode : -1235, obj ? obj.errmsg : ''); + } + + }, (errcode, errmsg) => { + console.log('[updateRank]failed!'+errcode+":"+errmsg); + failcb && failcb(errcode, 0, errmsg); + }); + } + }, /* * 挑战列表 diff --git a/assets/scriptes/layer/gameScene.js b/assets/scriptes/layer/gameScene.js index 411686b..568fbfa 100644 --- a/assets/scriptes/layer/gameScene.js +++ b/assets/scriptes/layer/gameScene.js @@ -235,8 +235,8 @@ cc.Class({ this.updateItemBtnState(); this.panel.level = this.level; this.panel.startGame(); - this.battleRankNd = this.battleRank.getComponent('battleRank'); - this.battleRankNd.init(this, this.score, this.level); + // this.battleRankNd = this.battleRank.getComponent('battleRank'); + // this.battleRankNd.init(this, this.score, this.level); this.comboProgressComp = this.comboProgress.getComponent('comboProgress'); this.comboProgressComp.init(this); if (!Global.getHelpStatus(6) && !this.slideHelp) { @@ -440,7 +440,7 @@ cc.Class({ addScore(score) { this.score += score; - (this.battleRankNd) && (this.battleRankNd.updateSelf(this.score)); + // (this.battleRankNd) && (this.battleRankNd.updateSelf(this.score)); Global.saveData.score = this.score; Global.save(); this.updateLevelInfo(); @@ -633,7 +633,7 @@ cc.Class({ if (cc.sys.platform === cc.sys.WECHAT_GAME || cc.jc.channelID === cc.jc.channel.TEST || cc.jc.channelID === cc.jc.channel.ANDROID) { if (cc.jc.channelID === cc.jc.channel.TT || cc.jc.channelID === cc.jc.channel.TEST || cc.jc.channelID === cc.jc.channel.ANDROID) { cc.jc.rank.updateRank(self.score, function (datas) { - console.log('[jcrank] update score success', datas); + console.log('[jcrank] update score success', JSON.stringify(datas)); comp.showRank(datas); }, function () { console.log('[jcrank] update score error'); diff --git a/assets/scriptes/pbRank.js b/assets/scriptes/pbRank.js index 08e355d..bc6a542 100644 --- a/assets/scriptes/pbRank.js +++ b/assets/scriptes/pbRank.js @@ -33,6 +33,7 @@ cc.Class({ type: cc.Node }, tipTag: false, + default_avatar: 'texture/comppreload/default_avatar.png', }, // LIFE-CYCLE CALLBACKS: @@ -60,12 +61,14 @@ cc.Class({ (this.sp_more) && (this.sp_more.active = true); this.lb_rank.node.active = true; } + let avatar = data.url || data.avatar || self.default_avatar; + console.log('show avatar: ', avatar); if ((cc.jc.channelID === cc.jc.channel.TT || cc.jc.channelID === cc.jc.channel.TEST || cc.jc.channelID === cc.jc.channel.QQ_MINI || cc.jc.channelID === cc.jc.channel.ANDROID || cc.jc.channelID === cc.jc.channel.WECHAT) && (data.url || data.avatar)) { try { - fileUtil.loadImage(data.url || data.avatar, self.sp_head); + fileUtil.loadImage(avatar, self.sp_head); } catch (e) { console.log(e); } diff --git a/assets/scriptes/prefab/UIRank.js b/assets/scriptes/prefab/UIRank.js index 7ed91b8..e1afbf3 100644 --- a/assets/scriptes/prefab/UIRank.js +++ b/assets/scriptes/prefab/UIRank.js @@ -48,7 +48,6 @@ cc.Class({ this.nd_Score.removeAllChildren(); var self = this; cc.jc.rank.reqRankList(function (records, userRank, userScore) { - console.log(records, userRank); for(let i = 0; i< records.length; i++ ) { var rd = records[i]; rd.rank = i + 1; diff --git a/library/uuid-to-mtime.json b/library/uuid-to-mtime.json index 6825bb6..f5a7cea 100644 --- a/library/uuid-to-mtime.json +++ b/library/uuid-to-mtime.json @@ -890,8 +890,8 @@ "relativePath": "prefab/oneAwardItem.prefab" }, "9657563b-14ba-4c1f-bc72-e015b75a2cc8": { - "asset": 1594617426864, - "meta": 1594617496075, + "asset": 1596803605173, + "meta": 1596803605183, "relativePath": "prefab/pbRank.prefab" }, "c9de3a10-051d-46a7-9c08-91377f20daea": { @@ -1725,7 +1725,7 @@ "relativePath": "scriptes/adjustsize.js" }, "5cd8ec2c-bd77-4d11-a3b8-1150a5083111": { - "asset": 1594617427450, + "asset": 1596771250393, "meta": 1561987023015, "relativePath": "scriptes/cc" }, @@ -1985,7 +1985,7 @@ "relativePath": "scriptes/prefab/trader/traderBtn.js" }, "119a2cdd-a51a-464c-9347-7281ee0eafd9": { - "asset": 1565769779212, + "asset": 1596771250335, "meta": 1565338098060, "relativePath": "scriptes/st_module" }, @@ -2254,11 +2254,6 @@ "meta": 1594617513215, "relativePath": "scriptes/st_module/script/wxcustomer/customerUtil_m.js" }, - "4602f58d-e215-4285-99a1-547c1784df39": { - "asset": 1566474595356, - "meta": 1594617513232, - "relativePath": "scriptes/UIRankBattle.js" - }, "24100bcf-ca6f-4f59-9a32-95a3d6ae1a70": { "asset": 1563193575066, "meta": 1594617513294, @@ -5255,8 +5250,8 @@ "relativePath": "texture/main/comp2/bg_npc2.png" }, "3d1aa8f0-f6a6-4d58-8b67-0eab06a87508": { - "asset": 1594617426854, - "meta": 1594617496047, + "asset": 1596803557768, + "meta": 1596803557779, "relativePath": "prefab/nodeOver.prefab" }, "e3d32bd3-3e24-4417-aa8b-53edcad6d036": { @@ -5315,8 +5310,8 @@ "relativePath": "scriptes/cc/service/jcadsharectrl.js" }, "6810d8b2-8a37-47af-94b4-21d4f29e21f0": { - "asset": 1570867506545, - "meta": 1594617511611, + "asset": 1596771515937, + "meta": 1596786266035, "relativePath": "scriptes/st_module/script/goods/goodspanel_m.js" }, "808df4c5-6c30-4f12-bc84-1ae0c2f34375": { @@ -5990,7 +5985,7 @@ "relativePath": "scriptes/cc/utils/strutils.js" }, "f5404b65-4d23-4ee5-aa3d-5f84400f12f4": { - "asset": 1594617427590, + "asset": 1596771250302, "meta": 1572340460707, "relativePath": "scriptes/matchvs" }, @@ -6095,8 +6090,8 @@ "relativePath": "texture/main/comp2/txt_start.png" }, "57fa73c8-be97-40c0-b762-59b88e3d768a": { - "asset": 1594617427438, - "meta": 1594617499545, + "asset": 1596803589108, + "meta": 1596803589124, "relativePath": "scene/Main.fire" }, "99ad4704-165a-4f80-85bd-0a2207a2dea0": { @@ -7780,8 +7775,8 @@ "relativePath": "texture/main/comp2/circle_big_bar.png" }, "5e38c347-c929-46e7-8f50-e28ef3dae730": { - "asset": 1573728398034, - "meta": 1594617505705, + "asset": 1596771931784, + "meta": 1596786265934, "relativePath": "scriptes/gameCookie.js" }, "885a4d37-eda5-46d8-b1b7-66d3c2442370": { @@ -8424,11 +8419,6 @@ "meta": 1594617510248, "relativePath": "scriptes/prefab/nodeStageResult.js" }, - "45fd1b70-72d9-49b0-87e9-212460f78e21": { - "asset": 1594211916630, - "meta": 1594617511147, - "relativePath": "scriptes/prefab/UIRank.js" - }, "43490d3e-d482-4613-9815-5963bc013934": { "asset": 1594261174270, "meta": 1594617499745, @@ -8439,11 +8429,6 @@ "meta": 1594617510178, "relativePath": "scriptes/prefab/nodeOver.js" }, - "5306e714-1e54-442f-93f5-1e457561ab6c": { - "asset": 1594267792213, - "meta": 1594617509004, - "relativePath": "scriptes/pbRank.js" - }, "8cc65593-ab3a-4f84-b657-efedf8d8bcfb": { "asset": 1594276776504, "meta": 1594617496183, @@ -8544,11 +8529,6 @@ "meta": 1594279925724, "relativePath": "texture/tw" }, - "56cc7cf9-c72f-42aa-927c-f967b251fb36": { - "asset": 1594282312855, - "meta": 1594617503984, - "relativePath": "scriptes/cc/service/jcrank.js" - }, "b5f212cb-0103-4834-85e6-f4537648b804": { "asset": 1594187398688, "meta": 1594617513489, @@ -9585,8 +9565,8 @@ "relativePath": "texture/tw/btn_offline_triple.png" }, "f034b4cc-6485-4290-8a26-4265781bacac": { - "asset": 1594371571661, - "meta": 1594617496260, + "asset": 1596771756164, + "meta": 1596786265019, "relativePath": "resources/i18n/zh.js" }, "30708166-d2e5-4f25-9c3d-623af6a99161": { @@ -9610,13 +9590,13 @@ "relativePath": "resources/GameConfig_en.json" }, "c975c23e-ce95-489c-a224-9dc8999ea05b": { - "asset": 1594375651308, - "meta": 1594617496238, + "asset": 1596771839948, + "meta": 1596786264823, "relativePath": "resources/i18n/en.js" }, "04923a8c-68bb-4f01-a1fd-2b7d1ec4f12c": { - "asset": 1594375664955, - "meta": 1594617496258, + "asset": 1596771777841, + "meta": 1596786264852, "relativePath": "resources/i18n/tw.js" }, "9563c868-6d9b-4ba6-b532-434ea007eff4": { @@ -9744,11 +9724,6 @@ "meta": 1595473457608, "relativePath": "scriptes/cc/service/jclogin.js" }, - "1ed0d4ab-dac6-4920-9283-bc219b3f3326": { - "asset": 1596090882696, - "meta": 1596090894568, - "relativePath": "scriptes/layer/gameScene.js" - }, "9768430a-8f3a-4d3c-94f2-017ca540a1a9": { "asset": 1596623554792, "meta": 1596623562699, @@ -9765,13 +9740,43 @@ "relativePath": "scriptes/cc/service/jccloud.js" }, "21355da7-b032-4ad7-b8c8-24ded34ef720": { - "asset": 1596719239369, - "meta": 1596719245153, + "asset": 1596771377123, + "meta": 1596786265118, "relativePath": "scriptes/cc/platform/plat_android.js" }, "c8a21efa-9a26-459c-8758-c09dd1ed8371": { "asset": 1596719411506, "meta": 1596719415599, "relativePath": "scriptes/cc/jcfw.js" + }, + "f17477fd-c29f-464d-9fbd-cdb2a9b41a86": { + "asset": 1596786664962, + "meta": 1596786877304, + "relativePath": "resources/texture/comppreload/default_avatar.png" + }, + "45fd1b70-72d9-49b0-87e9-212460f78e21": { + "asset": 1596787069959, + "meta": 1596787077938, + "relativePath": "scriptes/prefab/UIRank.js" + }, + "1ed0d4ab-dac6-4920-9283-bc219b3f3326": { + "asset": 1596800081139, + "meta": 1596800086823, + "relativePath": "scriptes/layer/gameScene.js" + }, + "5306e714-1e54-442f-93f5-1e457561ab6c": { + "asset": 1596802094409, + "meta": 1596802096213, + "relativePath": "scriptes/pbRank.js" + }, + "4602f58d-e215-4285-99a1-547c1784df39": { + "asset": 1596803353307, + "meta": 1596803356006, + "relativePath": "scriptes/UIRankBattle.js" + }, + "56cc7cf9-c72f-42aa-927c-f967b251fb36": { + "asset": 1596803488852, + "meta": 1596803491887, + "relativePath": "scriptes/cc/service/jcrank.js" } } \ No newline at end of file