update
This commit is contained in:
@@ -33,6 +33,7 @@ export class PopupGirlDetailPanel extends li_BaseView {
|
||||
private resId: number;
|
||||
private type: proto.cs.EnmResType;
|
||||
private base: DetailImageItem | ImagePopup;
|
||||
private balanceCount: Label;
|
||||
|
||||
private desc: Label;
|
||||
|
||||
@@ -56,6 +57,8 @@ export class PopupGirlDetailPanel extends li_BaseView {
|
||||
this.uitransform = this._nodeTab.Img_Frame.getComponent(UITransform);
|
||||
this.img = this._nodeTab.img.getComponent(Sprite);
|
||||
let descText = LanguageUtils.getText("popupgirldetailpanel.content");
|
||||
this.balanceCount = this._nodeTab.balanceCount.getComponent(Label);
|
||||
this.refreshCoinNum();
|
||||
|
||||
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
|
||||
// 价格
|
||||
@@ -95,7 +98,7 @@ export class PopupGirlDetailPanel extends li_BaseView {
|
||||
// 加载远程资源
|
||||
const envData = DataManager.I.getDataById<EnvData>(DataId.Env);
|
||||
const path = url + "_thumbnail_blur";
|
||||
let newPath = envData.cdn + "/" + "Girls/" + path + ".jpg";
|
||||
let newPath = envData.cdn + "/" + "Girls/" + path + ".jpg";
|
||||
ResManager.I.changeRemoteSpriteFrame(this.img, newPath, () => {
|
||||
this.scaleToFillItem();
|
||||
});
|
||||
@@ -147,7 +150,12 @@ export class PopupGirlDetailPanel extends li_BaseView {
|
||||
TipsPanel.show("Insufficient balance, need to purchase");
|
||||
}
|
||||
}
|
||||
|
||||
// 刷新余额
|
||||
private refreshCoinNum() {
|
||||
const walletData = DataManager.I.getDataById<WalletData>(DataId.Wallet);
|
||||
const balance = walletData.getOriginalBalance();
|
||||
this.balanceCount.string = balance.toString();
|
||||
}
|
||||
scaleToFillItem() {
|
||||
if (!this.img || !this.img.spriteFrame) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user