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('已复制到剪贴板')