web3coin适配

This commit is contained in:
2025-09-18 22:27:02 +08:00
parent 93b7b79c31
commit 85c8b51316
15 changed files with 700 additions and 59 deletions
@@ -26,12 +26,12 @@ export class PurchasePanelItem extends Component {
GButton.BandClick(this.node, this.onClickThis, this);
}
public refresh(goodId: number) {
public refresh(type: number, goodId: number) {
this.goodId = goodId;
this.show();
this.show(type);
}
public show() {
public show(type: number) {
const shopData = DataManager.I.getDataById<ShopData>(DataId.Shop);
const count = shopData.getCountById(this.goodId);
this.count.string = count.toString();
@@ -39,7 +39,7 @@ export class PurchasePanelItem extends Component {
this.price.string = price.toString();
let path = "";
if (this.goodId > 2000) {
if (type == 1) {
// web3币
path += "ui/shop/coin/";
} //cash
@@ -52,6 +52,6 @@ export class PurchasePanelItem extends Component {
}
async onClickThis() {
this.baseView.setDiamondTag(this.goodId);
this.baseView.purchaseGood(this.goodId,this.baseView.getDefaultNetworkType());
}
}