update 展示效果
This commit is contained in:
@@ -14,6 +14,7 @@ import { PaymentService } from "db://assets/Scripts/chat18x/payment/PaymentServi
|
||||
import proto from "db://assets/Scripts/proto/proto.pb.js";
|
||||
import { NavigationManager, PanelType } from "../../manager/NavigationManager";
|
||||
import { Web3PopPanel } from "./Web3PopPanel";
|
||||
import { TipsPanel } from "./TipsPanel";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -280,11 +281,16 @@ export class PurchasePanel extends li_BaseView {
|
||||
let status = res.status;
|
||||
if (status === -1) {
|
||||
console.log("支付失败!!!,错误码:", res.retCode);
|
||||
|
||||
const key = "error_code_" + res.retCode;
|
||||
TipsPanel.show(LanguageUtils.getText(key));
|
||||
} else if (status === 0) {
|
||||
console.log("支付成功!!!");
|
||||
const walletData = DataManager.I.getDataById<WalletData>(DataId.Wallet);
|
||||
walletData.balance = Number(res.balance);
|
||||
walletData.vipExpire = Number(res.vipExpire);
|
||||
|
||||
TipsPanel.show(LanguageUtils.getText("payment.succeed"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user