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() {