协议调试:商城

This commit is contained in:
chen wei bo
2025-09-10 15:27:07 +08:00
parent c1471c1540
commit 00099f2860
6 changed files with 75 additions and 28 deletions
@@ -36,7 +36,7 @@ export class ThemePanel extends li_BaseView {
uid: Label;
itemInst: GirlListItem;
content: Node;
private vipLeftTime: Label;
recId: number;
recName: Label;
recSprite: Sprite;
@@ -50,6 +50,7 @@ export class ThemePanel extends li_BaseView {
this.uid = this._nodeTab.uid.getComponent(Label);
this.recName = this._nodeTab.characterNameText.getComponent(Label);
this.recSprite = this._nodeTab.recPicSlot.getComponent(Sprite);
this.vipLeftTime = this._nodeTab.vipText.getComponent(Label);
this.registerListener();
this.itemInst = this._nodeTab.ThemeItem.getComponent(ThemeItem);
@@ -63,6 +64,7 @@ export class ThemePanel extends li_BaseView {
async Show() {
//some temp data
this.refreshCoinNum();
this.refreshVipExpire();
const accountData = DataManager.I.getDataById<AccountData>(DataId.Account);
this.uid.string = "uid: " + accountData.accId;
this.recId = 1;
@@ -167,8 +169,10 @@ export class ThemePanel extends li_BaseView {
private refreshVipExpire() {
const walletData = DataManager.I.getDataById<WalletData>(DataId.Wallet);
const vipExpire = walletData.vipExpire;
// TODO
const leftTime = Utils.formatVipLeftTime(vipExpire);
this.vipLeftTime.string = LanguageUtils.getText(
"purchasepanel.vip_left"
).replace("${leftTime}", leftTime);
}
onDestroy(): void {