From 8e89df09345f9d7057a88bc50fae9cb84c398fee Mon Sep 17 00:00:00 2001 From: jingrow Date: Wed, 14 Jan 2026 15:45:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=85=E5=80=BC=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E5=88=A0=E9=99=A4=E5=86=97=E4=BD=99=E7=9A=84?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboard/src/components/BuyPrepaidCreditsAlipay.vue | 7 +++++-- dashboard/src/components/BuyPrepaidCreditsWeChatPay.vue | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dashboard/src/components/BuyPrepaidCreditsAlipay.vue b/dashboard/src/components/BuyPrepaidCreditsAlipay.vue index 8ad43ed..2409dec 100644 --- a/dashboard/src/components/BuyPrepaidCreditsAlipay.vue +++ b/dashboard/src/components/BuyPrepaidCreditsAlipay.vue @@ -68,7 +68,10 @@ export default { }, methods: { processAlipayPayment() { - this.$resources.createAlipayOrder.submit(); + this.$resources.createAlipayOrder.submit().catch(err => { + // Prevent "Uncaught (in promise)" error in console + // The error is already displayed in the UI via the ErrorMessage component + }); }, // Optional: method to check payment status @@ -84,7 +87,7 @@ export default { this.$emit('payment-success'); } }).catch(err => { - console.error('Error checking payment status:', err); + // Error checking payment status }); }, 3000); diff --git a/dashboard/src/components/BuyPrepaidCreditsWeChatPay.vue b/dashboard/src/components/BuyPrepaidCreditsWeChatPay.vue index ca4d575..d4cff1e 100644 --- a/dashboard/src/components/BuyPrepaidCreditsWeChatPay.vue +++ b/dashboard/src/components/BuyPrepaidCreditsWeChatPay.vue @@ -101,7 +101,6 @@ export default { } }, onSuccess(response) { - console.log('WeChat Pay response:', response); this.orderId = response.order_id; this.qrCodeUrl = response.qr_code_url; this.qrCodeImage = response.qr_code_image; @@ -131,7 +130,10 @@ export default { }, methods: { processWeChatPayment() { - this.$resources.createWeChatPayOrder.submit(); + this.$resources.createWeChatPayOrder.submit().catch(err => { + // Prevent "Uncaught (in promise)" error in console + // The error is already displayed in the UI via the ErrorMessage component + }); }, startPaymentCheck() {