fix
设置页面资源
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user