From 3484c23c93d9d902ce0100c575f89fcb6ba4a823 Mon Sep 17 00:00:00 2001 From: TJH Date: Wed, 10 Dec 2025 11:55:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../prefabs/History/history_detail.prefab | 14 +++++++++-- assets/Game/scripts/game/HistoryDetail.ts | 25 +++++++------------ assets/Loading/scripts/comm.ts | 2 +- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/assets/Game/prefabs/History/history_detail.prefab b/assets/Game/prefabs/History/history_detail.prefab index fa4354f..547d9b5 100644 --- a/assets/Game/prefabs/History/history_detail.prefab +++ b/assets/Game/prefabs/History/history_detail.prefab @@ -15457,11 +15457,11 @@ "__expectedType__": "cc.SpriteFrame" }, { - "__uuid__": "9c1122fd-f575-462a-abfb-b5accf539a1e@f9941", + "__uuid__": "0f50a895-d708-4b4f-9730-14bce4f22988@f9941", "__expectedType__": "cc.SpriteFrame" }, { - "__uuid__": "0f50a895-d708-4b4f-9730-14bce4f22988@f9941", + "__uuid__": "9c1122fd-f575-462a-abfb-b5accf539a1e@f9941", "__expectedType__": "cc.SpriteFrame" }, { @@ -15469,6 +15469,16 @@ "__expectedType__": "cc.SpriteFrame" } ], + "multiLabelFont": [ + { + "__uuid__": "de8836c9-9686-4097-9caa-cf0b6749fd1d", + "__expectedType__": "cc.BitmapFont" + }, + { + "__uuid__": "4c85edc1-086f-4072-99cb-fed19017dbf6", + "__expectedType__": "cc.BitmapFont" + } + ], "_id": "" }, { diff --git a/assets/Game/scripts/game/HistoryDetail.ts b/assets/Game/scripts/game/HistoryDetail.ts index 701a90a..f0903f1 100644 --- a/assets/Game/scripts/game/HistoryDetail.ts +++ b/assets/Game/scripts/game/HistoryDetail.ts @@ -1,4 +1,4 @@ -import { _decorator, assetManager, AssetManager, Button, Color, Component, instantiate, JsonAsset, Label, Layout, Node, resources, ScrollView, sp, Sprite, SpriteAtlas, SpriteFrame, tween, UITransform, Vec3 } from 'cc'; +import { _decorator, assetManager, AssetManager, Button, Color, Component, Font, instantiate, JsonAsset, Label, Layout, Node, resources, ScrollView, sp, Sprite, SpriteAtlas, SpriteFrame, tween, UITransform, Vec3 } from 'cc'; import { ScrollControl } from './ScrollControl'; import { fixNum, getTimezoneOffsetString, getTranslate, hideAllChildren, isBrahmic, updateLang, waitNextFrame } from './Tools'; const { ccclass, property } = _decorator; @@ -44,6 +44,9 @@ export class HistoryDetail extends Component { @property([SpriteFrame]) multiFrame = new Array; + @property([Font]) + multiLabelFont = new Array; + dict = null data: any = null @@ -398,26 +401,16 @@ export class HistoryDetail extends Component { multiValue.push(multiValue[3] + 2) for (let i = 0; i < multiValue.length; i++) { showMultiNode.getChildByName('bg').children[i].getChildByName('multi').getComponent(Label).string = 'x' + multiValue[i] + showMultiNode.getChildByName('bg').children[i].getChildByName('multi').getComponent(Label).font = this.multiLabelFont[0] showMultiNode.getChildByName('bg').children[i].getChildByName('multi').setPosition(0, 0, 0) - - switch (true) { - case multiValue[i] <= 4: - showMultiNode.getChildByName('bg').children[i].getComponent(Sprite).spriteFrame = this.multiFrame[0] - break - case multiValue[i] <= 8 && multiValue[i] > 4: - showMultiNode.getChildByName('bg').children[i].getComponent(Sprite).spriteFrame = this.multiFrame[1] - break - case multiValue[i] <= 16 && multiValue[i] > 8: - showMultiNode.getChildByName('bg').children[i].getComponent(Sprite).spriteFrame = this.multiFrame[2] - break - case multiValue[i] > 16: - showMultiNode.getChildByName('bg').children[i].getComponent(Sprite).spriteFrame = this.multiFrame[3] - break - } + showMultiNode.getChildByName('bg').children[i].getComponent(Sprite).spriteFrame = multiValue[i] >= 4 ? this.multiFrame[1] : this.multiFrame[0] } + if (pan.WinInfo && pan.WinInfo.MultPos) { for (let key in pan.WinInfo.MultPos) { showMultiNode.getChildByName('bg').children[key].getChildByName('multi').setPosition(0, 110, 0) + showMultiNode.getChildByName('bg').children[key].getChildByName('multi').getComponent(Label).font = this.multiLabelFont[1] + showMultiNode.getChildByName('bg').children[key].getComponent(Sprite).spriteFrame = pan.WinInfo.MultPos[key] >= 4 ? this.multiFrame[4] : this.multiFrame[3] } } diff --git a/assets/Loading/scripts/comm.ts b/assets/Loading/scripts/comm.ts index 61c0daf..7583d47 100644 --- a/assets/Loading/scripts/comm.ts +++ b/assets/Loading/scripts/comm.ts @@ -7,7 +7,7 @@ import { PREVIEW } from "cc/env" const gameId = "rp_11001"; // let apiaddr = "https://rpgames-api.rpfafafahkdev.com"; let apiaddr = ""; -let token = "eyJQIjoxMDA5NDksIkUiOjE3NjUyODkzMTIsIlMiOjk5NywiRCI6InJwXzExMDAxIn0.Km1fhP5KOjl2oHB3yh83tyMGIjI91N4Wa--asEXGhOE"; +let token = "eyJQIjoxMDA5NDksIkUiOjE3NjUzNzQyMzIsIlMiOjk5OSwiRCI6InJwXzExMDAxIn0.cxCgEKYKk9sjtfENxTe-25taZsc3pM_hnRKV6c1rbeg"; let language = "en"