From adde209c573c7659e57eb6406d228d0cbfabcf1e Mon Sep 17 00:00:00 2001 From: speakeloudest Date: Thu, 2 Jul 2026 10:06:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8F=90=E7=8E=B0=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E4=B8=AD=E6=8B=A6=E6=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UserCenter/components/UserInfo/index.vue | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/pages/UserCenter/components/UserInfo/index.vue b/src/pages/UserCenter/components/UserInfo/index.vue index ce57a8a..d4c10f7 100644 --- a/src/pages/UserCenter/components/UserInfo/index.vue +++ b/src/pages/UserCenter/components/UserInfo/index.vue @@ -42,7 +42,12 @@ $ {{ (userInfo.commission / 100 || 0).toFixed(2) }} - @@ -109,6 +114,7 @@ const inviteStats = ref({ history_count: 0, }) const isUserLoading = ref(true) +const isCheckingWithdrawal = ref(false) async function init() { // 1. 用户信息 & 设备列表 isUserLoading.value = true @@ -161,6 +167,29 @@ const referralText = computed(() => { return `超级合伙人 返佣比例${percentage}%` }) +async function handleWithdrawClick() { + if (isCheckingWithdrawal.value) return + + try { + isCheckingWithdrawal.value = true + const res: any = await request.get('/api/v1/public/user/withdrawal_log', { + page: 1, + size: 20, + }) + const hasPendingWithdrawal = (res?.list || []).some((item: any) => item.status === 0) + if (hasPendingWithdrawal) { + toast.info('已有提现申请审核中,请勿重复提交') + return + } + walletDialogRef.value?.show() + } catch (error) { + console.error('Check withdrawal logs error:', error) + toast.error('提现记录检查失败,请稍后重试') + } finally { + isCheckingWithdrawal.value = false + } +} + function copy(text: string) { navigator.clipboard.writeText(text).then(() => { toast.success('已复制到剪贴板')