diff --git a/src/views/RechargeAgency/index.vue b/src/views/RechargeAgency/index.vue index 546b19e..b7d2663 100644 --- a/src/views/RechargeAgency/index.vue +++ b/src/views/RechargeAgency/index.vue @@ -327,6 +327,7 @@ import { getSelectedUser } from '@/utils/coinSellerStore.js' import { showError, showSuccess } from '@/utils/toast.js' import { usePageInitializationWithConfig } from '@/utils/pageConfig.js' import { handleAvatarImageError } from '@/utils/image/imageHandler.js' +import { useDebounce, useThrottle } from '@/utils/useDebounce' import { checkFreightDealer, @@ -564,7 +565,7 @@ const searchUser = () => { } // 立即充值 -const rechargeNow = async () => { +const rechargeNow = useThrottle(async () => { if (!canRecharge.value || isRecharging.value) return const amount = parseFloat(rechargeAmount.value) @@ -614,7 +615,7 @@ const rechargeNow = async () => { } finally { isRecharging.value = false } -} +}, 2000) const { userInfo } = usePageInitializationWithConfig('COIN_SELLER', { onDataLoaded: (data) => {