Commit 72753af8 authored by haiyoucuv's avatar haiyoucuv

整理一下代码

parent 421cdeba
......@@ -82,7 +82,7 @@ export class RankScene extends Scene {
if (success) {
/** 我的排名 - 更新 */
this.myRnak.getChildByName("MyRankIndex").getComponent(Label).string = `${this.rankIndexFormat(myRank)}`;
this.myRnak.getChildByName("MyCredits").getComponent(Label).string = `${myRankScore > 99999 ? "99999+" : myRankScore}`;
this.myRnak.getChildByName("MyCredits").getComponent(Label).string = `${myRankScore > 99999999 ? "99999999+" : myRankScore}`;
this.myRnak.getChildByName("MyName").getComponent(Label).string = `${strFormat(myNickName || "", 12)}(我)`;
/** 排行榜渲染 */
this.rankRender(rankInfo);
......@@ -103,7 +103,14 @@ export class RankScene extends Scene {
for (let i = 0; i < prizeInfo.length; i++) {
const node = instantiate(this.prizeItem);
node.getChildByName("PrizeName").getComponent(Label).string = strFormat(prizeInfo[i]?.prizeName, 12);
node.getChildByName("RankIndex").getComponent(Label).string = `第${prizeInfo[i]?.prizeRank}`
let prizeRank = prizeInfo[i]?.prizeRank;
const spRank = prizeRank.split("-");
if (spRank[0] == spRank[1]) {
prizeRank = spRank[0];
}
node.getChildByName("RankIndex").getComponent(Label).string = `第${prizeRank}名`
node.getChildByName("PrizeImg").getComponent(Sprite).spriteFrame = prizeInfo[i]?.prizeImg;
this.prizeBox.addChild(node);
}
......
......@@ -100,7 +100,5 @@ export class RecordScene extends Scene {
changeScene(HomeScene);
}
update(deltaTime: number) {
}
}
......@@ -39,7 +39,7 @@
<script src="//yun.duiba.com.cn/polaris/SVGA.Lite.v2.1.1.d3a67cbc13c591c53c6f87ab34c57ce387010374.js" crossorigin="anonymous"></script>
<script src="//yun.duiba.com.cn/aurora/assets/2403d1edf2acd15b179306b6ddaa5f0967d78a8f.js"></script>
<link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719196284801/style.css"/>
<link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719209622562/style.css"/>
<style>
.sui-captcha {
......@@ -94,17 +94,17 @@
</div>
<!-- Polyfills bundle. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719196284801/src/polyfills.bundle.js" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719209622562/src/polyfills.bundle.js" charset="utf-8"></script>
<!-- SystemJS support. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719196284801/src/system.bundle.js" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719209622562/src/system.bundle.js" charset="utf-8"></script>
<!-- Import map -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719196284801/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1719209622562/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>
<script>
System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1719196284801/index.js').catch(function (err) {
System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1719209622562/index.js').catch(function (err) {
console.error(err);
})
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment