This commit is contained in:
2025-09-19 00:50:31 +08:00
parent de0c97fc05
commit ad0e80ecda
3 changed files with 203 additions and 153 deletions
@@ -29,7 +29,8 @@ export class PurchasePanel extends li_BaseView {
private currentPayType: proto.cs.EnmPayType =
proto.cs.EnmPayType.EPT_Cash_INR;
private defaultNetworkType: proto.cs.EnmNetworkType.ENT_TRON;
private defaultNetworkType: proto.cs.EnmNetworkType =
proto.cs.EnmNetworkType.ENT_TRON;
public web3PopPanel: Web3PopPanel;
@property([PurchasePanelItem])
public items: PurchasePanelItem[] = [];
@@ -53,9 +54,11 @@ export class PurchasePanel extends li_BaseView {
Utils.addInnerEL(InnerMsgCode.VipExpireChange, this, () => {
this.onVipExpireChange();
});
Utils.addInnerEL(InnerMsgCode.PayOrderCreateSucc, this, (data) => {
this.createOrRefreshWeb3PayPanel(data);
});
Utils.addInnerEL(
InnerMsgCode.PayOrderCreateSucc,
this,
this.createOrRefreshWeb3PayPanel
);
for (let index = 0; index < this.items.length; index++) {
const element = this.items[index];
@@ -171,11 +174,11 @@ export class PurchasePanel extends li_BaseView {
}
createOrRefreshWeb3PayPanel(param: any) {
const data = {
let data = {
orderId: param.orderId,
payType: param.payType,
goodId: param.goodId,
networkType: this.defaultNetworkType,
networkType: this.getDefaultNetworkType(),
base: this,
};
@@ -189,6 +192,7 @@ export class PurchasePanel extends li_BaseView {
data
);
else {
data.networkType = undefined;
this.web3PopPanel.refreshData(data);
this.web3PopPanel.refreshView();
}