协议调试

This commit is contained in:
chen wei bo
2025-09-09 20:33:49 +08:00
parent b74bfb7051
commit e5767d5303
6 changed files with 57 additions and 30 deletions
@@ -188,7 +188,7 @@ export class GirlDetailPanel extends li_BaseView {
bindVideoToggle() {
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
let ids = girlData.getAllGrilVideoId(this.category.toString(), this.id);
let ids = girlData.getAllDisplayGrilVideoId(this.category.toString(), this.id);
this.refreshImgs(2, this.category, this.id, ids);
}
@@ -8,11 +8,12 @@ const { ccclass, property } = _decorator;
@ccclass("PopupGirlDetailPanel")
export class PopupGirlDetailPanel extends li_BaseView {
private _nodeTab: any = {};
private category: number;
private girlId: number;
private resId: number;
private base: DetailImageItem;
openUIDataCT(data) {
this.category = data.category;
this.resId = data.resId;
this.girlId = data.girlId;
this.base = data.base;
+31 -4
View File
@@ -22,6 +22,8 @@ import { GirlService } from "db://assets/Scripts/chat18x/network/services/GirlSe
import { DataManager, DataId } from "../../data/DataManager";
import { ThemeData } from "../../data/ThemeData";
import { GirlData } from "../../data/GirlData";
import { WalletData } from "../../data/WalletData";
import { AccountData } from "../../data/AccountData";
import proto from 'db://assets/Scripts/proto/proto.pb.js';
const { ccclass, property } = _decorator;
@@ -31,6 +33,7 @@ export class ThemePanel extends li_BaseView {
private _nodeTab: any = {};
coinNum: Label;
uid: Label;
itemInst: GirlListItem;
content: Node;
@@ -44,6 +47,7 @@ export class ThemePanel extends li_BaseView {
Utils.parseNode(this.node, this._nodeTab);
this.coinNum = this._nodeTab.coinNum.getComponent(Label);
this.uid = this._nodeTab.uid.getComponent(Label);
this.recName = this._nodeTab.characterNameText.getComponent(Label);
this.recSprite = this._nodeTab.recPicSlot.getComponent(Sprite);
@@ -58,7 +62,9 @@ export class ThemePanel extends li_BaseView {
rectNameKey: string;
async Show() {
//some temp data
this.coinNum.string = (50.0).toString();
this.refreshCoinNum();
const accountData = DataManager.I.getDataById<AccountData>(DataId.Account);
this.uid.string = "uid: " + accountData.accId;
this.recId = 1;
if (this.cache) {
for (let i = this.cache.length - 1; i >= 0; i--) {
@@ -127,10 +133,10 @@ export class ThemePanel extends li_BaseView {
this.recName.string = LanguageUtils.getText(this.rectNameKey);
});
Utils.addInnerEL(InnerMsgCode.BalanceChange, this, () => {
});
this.refreshCoinNum();
});
Utils.addInnerEL(InnerMsgCode.VipExpireChange, this, () => {
this.refreshVipExpire();
});
}
@@ -150,9 +156,30 @@ export class ThemePanel extends li_BaseView {
console.log("打开信箱");
}
// 刷新余额
private refreshCoinNum() {
const walletData = DataManager.I.getDataById<WalletData>(DataId.Wallet);
const balance = walletData.getOriginalBalance();
this.coinNum.string = balance.toString();
}
// 刷新 vip失效时间戳
private refreshVipExpire() {
const walletData = DataManager.I.getDataById<WalletData>(DataId.Wallet);
const vipExpire = walletData.vipExpire;
// TODO
}
onDestroy(): void {
Utils.removeInnerEL(InnerMsgCode.LanguageChange, this, () => {
this.recName.string = LanguageUtils.getText(this.rectNameKey);
});
Utils.removeInnerEL(InnerMsgCode.BalanceChange, this, () => {
});
Utils.removeInnerEL(InnerMsgCode.VipExpireChange, this, () => {
});
}
}