update
This commit is contained in:
@@ -26,25 +26,29 @@ export class PurchasePanelItem extends Component {
|
||||
GButton.BandClick(this.node, this.onClickThis, this);
|
||||
}
|
||||
|
||||
// 0:cash 1:web3
|
||||
public refresh(type: number, goodId: number) {
|
||||
this.goodId = goodId;
|
||||
this.show(type);
|
||||
}
|
||||
|
||||
// 0:cash 1:web3
|
||||
public show(type: number) {
|
||||
const shopData = DataManager.I.getDataById<ShopData>(DataId.Shop);
|
||||
const count = shopData.getCountById(this.goodId);
|
||||
this.count.string = count.toString();
|
||||
const price = shopData.getOriginalPriceById(this.goodId);
|
||||
this.price.string = "$" + price.toString();
|
||||
|
||||
let path = "";
|
||||
if (type == 1) {
|
||||
// web3币
|
||||
path += "ui/shop/coin/";
|
||||
const price = shopData.getOriginalUsdPriceById(this.goodId);
|
||||
this.price.string = price.toString();
|
||||
} //cash
|
||||
else {
|
||||
path += "ui/shop/cash/";
|
||||
const price = shopData.getOriginalPriceById(this.goodId);
|
||||
this.price.string = "₹" + price.toString();
|
||||
}
|
||||
path += this.goodId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user