From a8e68da0769b1375f46c9f41390e21a911447636 Mon Sep 17 00:00:00 2001 From: jingrow Date: Sun, 28 Dec 2025 23:36:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E9=A1=B5=E9=9D=A2=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E4=B8=AD=E6=96=87=E6=9B=BF=E6=8D=A2=E4=B8=BA=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E7=BF=BB=E8=AF=91=E7=9A=84=E8=8B=B1=E6=96=871?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/BuyPrepaidCreditsAlipay.vue | 18 +++---- .../src/components/BuyPrepaidCreditsForm.vue | 10 ++-- .../components/BuyPrepaidCreditsWeChatPay.vue | 29 +++++----- .../src/components/billing/BillingSummary.vue | 23 ++++---- .../components/billing/PrepaidCreditsForm.vue | 10 ++-- dashboard/src/pages/BillingInvoices.vue | 54 +++++++++---------- 6 files changed, 73 insertions(+), 71 deletions(-) diff --git a/dashboard/src/components/BuyPrepaidCreditsAlipay.vue b/dashboard/src/components/BuyPrepaidCreditsAlipay.vue index 37ea8e0..8ad43ed 100644 --- a/dashboard/src/components/BuyPrepaidCreditsAlipay.vue +++ b/dashboard/src/components/BuyPrepaidCreditsAlipay.vue @@ -11,7 +11,7 @@ :loading="$resources.createAlipayOrder.loading || loading" @click="processAlipayPayment" > - 使用支付宝支付 + {{ $t('Pay with Alipay') }} @@ -49,18 +49,18 @@ export default { }, validate() { if (this.amount <= 0) { - throw new DashboardError('支付金额必须大于0'); + throw new DashboardError(this.$t('Payment amount must be greater than 0')); } if (this.amount < this.minimumAmount) { - throw new DashboardError('金额低于最低要求金额'); + throw new DashboardError(this.$t('Amount is below the minimum required amount')); } }, onSuccess(response) { window.open(response.payment_url, '_blank'); - toast.success('支付页面已在新窗口打开'); + toast.success(this.$t('Payment page opened in new window')); - // 如果需要检查支付状态 + // Optional: check payment status // this.checkPaymentStatus(response.order_id); } }; @@ -71,7 +71,7 @@ export default { this.$resources.createAlipayOrder.submit(); }, - // 可选:检查支付状态的方法 + // Optional: method to check payment status checkPaymentStatus(orderId) { const checkInterval = setInterval(() => { this.$call('jcloud.api.billing.check_payment_status', { @@ -80,15 +80,15 @@ export default { }).then(result => { if (result && result.status === 'Success') { clearInterval(checkInterval); - toast.success('支付成功!账户已充值'); + toast.success(this.$t('Payment successful! Account has been recharged')); this.$emit('payment-success'); } }).catch(err => { - console.error('检查支付状态出错:', err); + console.error('Error checking payment status:', err); }); }, 3000); - // 5分钟后停止检查 + // Stop checking after 5 minutes setTimeout(() => { clearInterval(checkInterval); }, 300000); diff --git a/dashboard/src/components/BuyPrepaidCreditsForm.vue b/dashboard/src/components/BuyPrepaidCreditsForm.vue index 503aec6..878be7a 100644 --- a/dashboard/src/components/BuyPrepaidCreditsForm.vue +++ b/dashboard/src/components/BuyPrepaidCreditsForm.vue @@ -1,7 +1,7 @@