From e14dd66e2bb4a41ddd6bc97e78f97b4f9c135fd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8?= Date: Wed, 24 Jun 2026 14:18:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=A0=E9=81=93=E6=8E=A5=E5=8F=A3=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../withdraw/components/WithdrawDialog.vue | 35 +------------------ src/views/profile/business/index.vue | 4 +-- 2 files changed, 3 insertions(+), 36 deletions(-) diff --git a/src/views/capital/withdraw/components/WithdrawDialog.vue b/src/views/capital/withdraw/components/WithdrawDialog.vue index 2dd483a..e9472ab 100644 --- a/src/views/capital/withdraw/components/WithdrawDialog.vue +++ b/src/views/capital/withdraw/components/WithdrawDialog.vue @@ -139,7 +139,7 @@ import { ref, computed, watch } from 'vue' import { useI18n } from 'vue-i18n' import { ElMessage, type FormInstance, type FormRules } from 'element-plus' import Dialog from '@/components/common/Dialog.vue' -import { getWalletCapital, getWithdrawChannel, getAgentWithdrawChannel, agentWithdraw, withdraw } from '@/api/modules/capital/withdraw' +import { getWalletCapital, agentWithdraw, withdraw } from '@/api/modules/capital/withdraw' import { getStorage } from '@/utils/storage' const { t } = useI18n() @@ -182,11 +182,6 @@ interface WalletInfo { closing_profit: string } -interface ChannelItem { - id: number - name: string -} - interface CalculatedItem { type: string typeLabel: string @@ -354,9 +349,6 @@ const walletInfo = ref({ closing_profit: '0', }) -// 渠道列表 -const channelList = ref([]) - // 计算后的扣除明细 const calculatedData = ref([]) @@ -452,31 +444,6 @@ const initData = async () => { } catch (error) { console.error('获取钱包信息失败', error) } - - // 获取渠道列表 - try { - const api = isAgent.value ? getWithdrawChannel : getAgentWithdrawChannel - const res: any = await api() - if (res && Array.isArray(res)) { - channelList.value = res.map((item: any) => ({ - id: item.id, - name: item.name, - channel_code: item.channel_code || '', - })) - } else if (res?.data) { - channelList.value = res.data.map((item: any) => ({ - id: item.id, - name: item.name, - channel_code: item.channel_code || '', - })) - } - // 如果有默认渠道,设置当前渠道编码 - if (channelList.value.length > 0) { - currentChannelCode.value = channelList.value[0].channel_code || '' - } - } catch (error) { - console.error('获取渠道列表失败', error) - } } // 计算扣除明细 diff --git a/src/views/profile/business/index.vue b/src/views/profile/business/index.vue index eea381a..359eb54 100644 --- a/src/views/profile/business/index.vue +++ b/src/views/profile/business/index.vue @@ -370,7 +370,7 @@ import { updateCapital, editAgentBail, } from '@/api/modules/profile/business.ts' -import { getAgentWithdrawChannel, agentWithdraw } from '@/api/modules/capital/withdraw' +import { getWithdrawChannel, agentWithdraw } from '@/api/modules/capital/withdraw' const userStore = useUserStore() @@ -734,7 +734,7 @@ const withdrawChannelOptions = ref<{ label: string; value: number }[]>([]) // 获取取款渠道列表 const fetchWithdrawChannel = async () => { try { - const res = await getAgentWithdrawChannel() + const res = await getWithdrawChannel() withdrawChannelOptions.value = res.map((item: any) => ({ label: item.name, value: item.id,