web3coin适配
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user