diff --git a/src/views/AgencyCenter/index.vue b/src/views/AgencyCenter/index.vue index adf87eb..dc7b92d 100644 --- a/src/views/AgencyCenter/index.vue +++ b/src/views/AgencyCenter/index.vue @@ -360,7 +360,8 @@ - + @@ -454,6 +455,7 @@ import { getUserIdentity, getBankCardList, // 获取正在使用的银行卡 getWithdrawInfoList, // 获取申请提现信息 + apiGetWithdrawEnabled, // 获取提现权限 } from '@/api/wallet.js' import GeneralHeader from '@/components/GeneralHeader.vue' @@ -466,6 +468,7 @@ const router = useRouter() // 监听语言变化并设置文档方向 locale.value && setDocumentDirection(locale.value) +const withdrawEnabled = ref(false) // 提现权限 const maskLayerShow = ref(false) // 弹窗遮罩层显示状态 const totalSalary = ref('0') //历史收入 @@ -795,6 +798,19 @@ const getWithdrawInfoListData = async () => { } } +// 获取提现权限 +const getWithdrawEnabled = async () => { + try { + const resWithdrawEnabled = await apiGetWithdrawEnabled() + if (resWithdrawEnabled.body && resWithdrawEnabled.status) { + withdrawEnabled.value = resWithdrawEnabled.body + } + } catch (error) { + console.error('获取提现信息列表失败:', error) + showError(error.response?.errorMsg) + } +} + const { userInfo, salaryInfo, taskInfo } = usePageInitializationWithConfig('AGENCY_CENTER', { needsTeamInfo: true, forceRefresh: true, // 强制刷新 @@ -808,6 +824,7 @@ const { userInfo, salaryInfo, taskInfo } = usePageInitializationWithConfig('AGEN onMounted(() => { getBankCards() // 获取正在使用的银行卡 getWithdrawInfoListData() // 获取提现信息列表 + getWithdrawEnabled() // 获取提现权限 underlineStyle.value // 触发计算属性更新 diff --git a/src/views/HostCenter/index.vue b/src/views/HostCenter/index.vue index a41ba31..f4ad3f3 100644 --- a/src/views/HostCenter/index.vue +++ b/src/views/HostCenter/index.vue @@ -179,7 +179,7 @@ > -