From 81cd02bbee3fae59aa0ee6a988cc19cfec264fd7 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 5 Sep 2024 20:08:48 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E7=AB=AF=E9=93=B6=E8=A1=8C=E5=8D=A1=E6=8F=90?= =?UTF-8?q?=E7=8E=B0=EF=BC=8C=E9=93=B6=E8=A1=8C=E5=90=8D=E7=A7=B0=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E4=B8=8B=E6=8B=89=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/commission/withdraw.vue | 92 +++++++++++++++--------------- sheep/api/promotion/combination.js | 8 --- sheep/api/system/dict.js | 8 +-- 3 files changed, 49 insertions(+), 59 deletions(-) diff --git a/pages/commission/withdraw.vue b/pages/commission/withdraw.vue index 7c721654..4ce3ad40 100644 --- a/pages/commission/withdraw.vue +++ b/pages/commission/withdraw.vue @@ -15,7 +15,10 @@ 可提现金额(元) {{ fen2yuan(state.brokerageInfo.brokeragePrice) }} - @@ -98,24 +101,23 @@ v-show="state.accountInfo.type === '2'" > - - - - - - + + + + 开户地址 @@ -189,13 +191,13 @@ frozenDays: 0, // 冻结天数 minPrice: 0, // 最低提现金额 withdrawTypes: [], // 提现方式 - bankList:[], //银行字典数据 - selectedBankName:"",//选中的银行名称 + bankList: [], // 银行字典数据 + bankListSelectedIndex: '', // 选中银行 bankList 的 index }); // 打开提现方式的弹窗 const onAccountSelect = (e) => { - state.accountSelect = e; + state.accountSelect = e; }; // 提交提现 @@ -230,12 +232,12 @@ confirmText: '查看记录', success: (res) => { if (res.confirm) { - sheep.$router.go('/pages/commission/wallet', { type: 2 }) + sheep.$router.go('/pages/commission/wallet', { type: 2 }); return; } getBrokerageUser(); state.accountInfo = {}; - } + }, }); }; @@ -248,7 +250,7 @@ if (data) { state.minPrice = data.brokerageWithdrawMinPrice || 0; state.frozenDays = data.brokerageFrozenDays || 0; - state.withdrawTypes = data.brokerageWithdrawTypes; + state.withdrawTypes = data.brokerageWithdrawTypes; } } @@ -259,34 +261,30 @@ state.brokerageInfo = data; } } - - //获取提现银行配置字典 - async function getDictDataListByType(){ - let { code, data } = await DictApi.getDictDataListByType('brokerage_bank_name'); - if (code !== 0) { - return; - } - if(data && data.length > 0) { - state.bankList = data; - } + + // 获取提现银行配置字典 + async function getDictDataListByType() { + let { code, data } = await DictApi.getDictDataListByType('brokerage_bank_name'); + if (code !== 0) { + return; + } + if (data && data.length > 0) { + state.bankList = data; + } } - - function bankChange(e){ - console.log(e); - let value = e.target.value; - state.accountInfo.bankName = value; - let curr = state.bankList?.filter(item=>{ - return item.value == value - })[0]; - console.log(curr); - state.selectedBankName = curr.label; + + // 银行选择 + function bankChange(e) { + const value = e.detail.value; + state.bankListSelectedIndex = value; + state.accountInfo.bankName = state.bankList[value].label; } onBeforeMount(() => { getWithdrawRules(); getBrokerageUser(); - getDictDataListByType();//获取银行字典数据 - }) + getDictDataListByType(); //获取银行字典数据 + });