From 5a4ce9dd1c50b3a3dee3068fd00ee9440a45fe14 Mon Sep 17 00:00:00 2001 From: chen wei bo <1025839511@qq.com> Date: Mon, 13 Oct 2025 18:31:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E7=82=B9=E5=87=BBwe?= =?UTF-8?q?b3=E7=9A=84=E5=85=85=E5=80=BC=E6=A1=A3=E4=BD=8D=E5=A4=9A?= =?UTF-8?q?=E6=89=93=E5=BC=80=E4=BA=86=E4=B8=80=E4=B8=AA=E7=A9=BA=E7=99=BD?= =?UTF-8?q?=E7=BD=91=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/Scripts/chat18x/payment/PaymentService.ts | 1 + .../Scripts/chat18x/ui/panels/PurchasePanel.ts | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/assets/Scripts/chat18x/payment/PaymentService.ts b/assets/Scripts/chat18x/payment/PaymentService.ts index d9baac96..8a08d363 100644 --- a/assets/Scripts/chat18x/payment/PaymentService.ts +++ b/assets/Scripts/chat18x/payment/PaymentService.ts @@ -50,6 +50,7 @@ export class PaymentService { Utils.sendInnerMsg(InnerMsgCode.PayOrderCreateSucc, { orderId: orderId, payType: req.payType,goodId:req.goodId }); // 分发流程 + logger.log("选择支付分发流程:", payMethod); const flow = this.flowMap.get(payMethod); return flow?.run(orderId, payUrl, open) ?? null; } diff --git a/assets/Scripts/chat18x/ui/panels/PurchasePanel.ts b/assets/Scripts/chat18x/ui/panels/PurchasePanel.ts index bc982c02..8b882274 100644 --- a/assets/Scripts/chat18x/ui/panels/PurchasePanel.ts +++ b/assets/Scripts/chat18x/ui/panels/PurchasePanel.ts @@ -178,6 +178,20 @@ export class PurchasePanel extends li_BaseView { } } + // 获取支付方式 + getPaymentMethod(): PaymentMethod { + if (this.currentPayType === proto.cs.EnmPayType.EPT_Cash_INR) { + // 现金支付 + return PaymentMethod.CashPay; + } else if (this.currentPayType === proto.cs.EnmPayType.EPT_WEB3_USD) { + // Web3支付 + return PaymentMethod.Web3; + } else { + // Web3支付 + return PaymentMethod.Web3; + } + } + purchaseGood(id: number, networkType: proto.cs.EnmNetworkType) { const shopData = DataManager.I.getDataById(DataId.Shop); const isRechargeId = shopData.isRechargeId(id); @@ -187,7 +201,7 @@ export class PurchasePanel extends li_BaseView { id, this.currentPayType, networkType, - PaymentMethod.CashPay + this.getPaymentMethod() ); } //测试用