From 5264795e89943d791e48071656ab23b0998db460 Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Wed, 15 Apr 2026 20:43:27 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E9=87=91=E5=B8=81=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2):=20=E5=81=9A=E4=B8=A4=E7=A7=8D=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E7=9A=84=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/RechargeAgency/index.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/views/RechargeAgency/index.vue b/src/views/RechargeAgency/index.vue index f4d9915..47cb268 100644 --- a/src/views/RechargeAgency/index.vue +++ b/src/views/RechargeAgency/index.vue @@ -653,8 +653,8 @@ const rechargeNow = useThrottle(async () => { if (!canRecharge.value || isRecharging.value) return const amount = rechargeDollarAmount.value - const quantity = rechargeCoinsNeeded.value - if (amount <= 0) { + const quantity = hasRechargeRatio.value ? rechargeCoinsNeeded.value : rechargeDollarAmount.value + if (quantity <= 0) { showError(t('please_enter_valid_amount')) return } @@ -676,12 +676,12 @@ const rechargeNow = useThrottle(async () => { const rechargeData = hasRechargeRatio.value ? { acceptUserId: acceptUserId, - quantity: amount, - amount: quantity, + quantity: quantity, + amount: amount, } : { acceptUserId: acceptUserId, - quantity: amount, + quantity: quantity, } const response = await freightRecharge(rechargeData) @@ -694,7 +694,7 @@ const rechargeNow = useThrottle(async () => { showSuccess( t('transfer_coin_success', { - amount: hasRechargeRatio.value ? quantity : amount, + amount: quantity, name: selectedUser.value.name, }), ) @@ -704,7 +704,7 @@ const rechargeNow = useThrottle(async () => { } else { showError( t('transfer_coin_failed', { - amount: hasRechargeRatio.value ? quantity : amount, + amount: quantity, }), ) } @@ -713,7 +713,7 @@ const rechargeNow = useThrottle(async () => { showError( error.response.errorMsg || t('transfer_coin_failed', { - amount: hasRechargeRatio.value ? quantity : amount, + amount: quantity, }), ) } finally {