This commit is contained in:
2025-09-22 14:13:18 +08:00
parent ec35bf4e87
commit 26019a0080
5 changed files with 298 additions and 97 deletions
@@ -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;