设置页面资源
This commit is contained in:
2025-09-10 18:12:26 +08:00
parent cb2b8e76ea
commit 24c2a946a3
64 changed files with 7534 additions and 1023 deletions
@@ -9,6 +9,7 @@ import { DataManager, DataId } from "../../data/DataManager";
import { GirlData } from "../../data/GirlData";
import { WalletData } from "../../data/WalletData";
import proto from "db://assets/Scripts/proto/proto.pb.js";
import LanguageUtils from "../../../Main/Common/LanguageUtils";
const { ccclass, property } = _decorator;
@ccclass("GirlListPopupPanel")
@@ -18,6 +19,9 @@ export class GirlListPopupPanel extends li_BaseView {
private category: number;
private girlId: number;
private girlName: Label;
private girlTag: Label;
base: GirlListItem;
openUIDataCT(data) {
this.category = data.category;
@@ -26,11 +30,22 @@ export class GirlListPopupPanel extends li_BaseView {
}
onLoadCT() {
Utils.parseNode(this.node, this._nodeTab);
this.girlName = this._nodeTab.Name.getComponent(Label);
this.girlTag = this._nodeTab.Tag.getComponent(Label);
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
// 价格
this.priceLabel = this._nodeTab.Price.getComponent(Label);
this.priceLabel.string = girlData.getGrilOriginalPrice(this.category.toString(), this.girlId).toString();
this.priceLabel.string = girlData
.getGrilOriginalPrice(this.category.toString(), this.girlId)
.toString();
this.registerListener();
this.girlName.string = LanguageUtils.getText(
girlData.getGrilName(this.category.toString(), this.girlId)
);
this.girlTag.string = LanguageUtils.getText(
girlData.getGrilTagKey(this.category.toString(), this.girlId)
);
}
registerListener() {
GButton.BandClick(this._nodeTab.BuyBtn, this.buyCharacter, this);
@@ -58,7 +73,7 @@ export class GirlListPopupPanel extends li_BaseView {
walletData.vipExpire = Number(resData.vipExpire);
// 刷新界面
this.base.refreshBuy(true);
this.close();
this.close();
}
}
}