From acfb4c3c8d6d5ab7b55b0009cbc3eb0a5f0649ab Mon Sep 17 00:00:00 2001 From: Sun_sun <469361609@qq.com> Date: Tue, 9 Sep 2025 10:36:34 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=20=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=B8=AD=E5=BF=83-=E8=87=AA=E6=84=BF=E5=A7=94=E6=89=98?= =?UTF-8?q?=E5=87=BA=E5=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/MyProfile.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/views/MyProfile.vue b/src/views/MyProfile.vue index 0198929..b681fa9 100644 --- a/src/views/MyProfile.vue +++ b/src/views/MyProfile.vue @@ -209,6 +209,17 @@ export default { // 处理默认自动匹配状态变化 const handleDistributeChange = async (value) => { try { + // 判断融豆状态,为0提示,其余正常 + if (accountInfo.value.balance==0){ + ElMessageBox.alert( + '请获取融豆后,可开通此服务', '',{ + confirmButtonText: 'OK', + } + ) + accountInfo.value.is_distribute = !value; + return + } + // 检查是否为第一次勾选 const isFirstTimeCheck = localStorage.getItem('hasCheckedDistribute') !== 'true'; @@ -258,7 +269,6 @@ export default { const response = await api.put(`/user/${userStore.user.id}/distribute`, { is_distribute: value }); - if (response.data.success) { ElMessage.success('默认自动匹配状态更新成功'); // 如果是关闭状态,不需要标记为已勾选过 @@ -268,7 +278,7 @@ export default { } else { // 如果更新失败,恢复原状态 accountInfo.value.is_distribute = !value; - ElMessage.error(response.data.message || '默认自动匹配状态更新失败'); + ElMessage.error(response.data.message); } } catch (error) { if (error === 'cancel') {