From ed3d370de25d134f4a5df804785568be6543337f Mon Sep 17 00:00:00 2001 From: heyho Date: Wed, 4 Sep 2024 09:14:33 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E3=80=91=E6=96=B0=E5=A2=9E=E7=B3=BB=E7=BB=9F=E5=AD=97?= =?UTF-8?q?=E5=85=B8=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=20=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E5=AD=97=E5=85=B8=E7=B1=BB=E5=9E=8B=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=AD=97=E5=85=B8=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: heyho --- sheep/api/system/dict.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sheep/api/system/dict.js diff --git a/sheep/api/system/dict.js b/sheep/api/system/dict.js new file mode 100644 index 0000000..9ee4ca6 --- /dev/null +++ b/sheep/api/system/dict.js @@ -0,0 +1,16 @@ +import request from '@/sheep/request'; + +const DictApi = { + // 根据字典类型查询字典数据信息 + getDictDataListByType: (type) => { + return request({ + url: `/system/dict-data/type`, + method: 'GET', + params: { + type, + }, + }); + }, +}; + +export default DictApi; \ No newline at end of file From 9f33e44db097c9bb72f9a71489a1aaaf3b69fce3 Mon Sep 17 00:00:00 2001 From: heyho Date: Wed, 4 Sep 2024 09:22:18 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=AB=AF=E9=93=B6=E8=A1=8C=E5=8D=A1?= =?UTF-8?q?=E6=8F=90=E7=8E=B0=EF=BC=8C=E9=93=B6=E8=A1=8C=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E4=B8=8B=E6=8B=89=E9=80=89=E6=8B=A9=E3=80=82?= =?UTF-8?q?=20=E7=94=B1=E4=BA=8E=E5=90=8E=E7=AB=AF=E6=8E=A5=E6=94=B6?= =?UTF-8?q?=E7=9A=84=E6=98=AF=E9=93=B6=E8=A1=8C=E5=90=8D=E7=A7=B0=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E4=BC=9A=E7=94=B1=E9=85=8D=E7=BD=AE=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E8=A7=A3=E6=9E=90=EF=BC=8C=E6=89=80=E4=BB=A5?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=AB=AF=E9=93=B6=E8=A1=8C=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E6=98=AF=E4=B8=8D=E8=83=BD=E8=AE=A9=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E6=89=8B=E5=8A=A8=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E7=9A=84=EF=BC=8C=E9=9C=80=E8=A6=81=E6=9F=A5=E8=AF=A2=E5=90=8E?= =?UTF-8?q?=E7=AB=AF=E5=AD=97=E5=85=B8=E9=85=8D=E7=BD=AE=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=92=8C=E9=80=89=E6=8B=A9=E3=80=82=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E7=9A=84=E5=80=BC=E6=98=AF=E9=93=B6=E8=A1=8C=E5=AD=97?= =?UTF-8?q?=E5=85=B8=E5=AF=B9=E5=BA=94=E7=9A=84value=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: heyho --- pages/commission/withdraw.vue | 49 ++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/pages/commission/withdraw.vue b/pages/commission/withdraw.vue index 73f9690..f75e6ad 100644 --- a/pages/commission/withdraw.vue +++ b/pages/commission/withdraw.vue @@ -98,12 +98,17 @@ v-show="state.accountInfo.type === '2'" > - + + + + 开户地址 @@ -152,6 +157,7 @@ import { fen2yuan } from '@/sheep/hooks/useGoods'; import TradeConfigApi from '@/sheep/api/trade/config'; import BrokerageApi from '@/sheep/api/trade/brokerage'; + import DictApi from '@/sheep/api/system/dict'; const headerBg = sheep.$url.css('/static/img/shop/user/withdraw_bg.png'); const statusBarHeight = sheep.$platform.device.statusBarHeight * 2; @@ -176,6 +182,8 @@ frozenDays: 0, // 冻结天数 minPrice: 0, // 最低提现金额 withdrawTypes: [], // 提现方式 + bankList:[], //银行字典数据 + selectedBankName:"",//选中的银行名称 }); // 打开提现方式的弹窗 @@ -245,9 +253,36 @@ } } + //获取提现银行配置字典 + async function getDictDataListByType(){ + let { code, data } = await DictApi.getDictDataListByType('brokerage_bank_name'); + if (code !== 0) { + return; + } + if(data && data.length > 0) { + data.map(item=>{ + item.text = item.label; + }) + 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; + } + onBeforeMount(() => { getWithdrawRules(); - getBrokerageUser() + getBrokerageUser(); + getDictDataListByType();//获取银行配置字典 }) From 089191e95d08f5018331eedb5e72a2d8359b8007 Mon Sep 17 00:00:00 2001 From: heyho Date: Wed, 4 Sep 2024 09:31:55 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=AB=AF=E9=93=B6=E8=A1=8C=E5=8D=A1?= =?UTF-8?q?=E6=8F=90=E7=8E=B0=EF=BC=8C=E9=93=B6=E8=A1=8C=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E4=B8=8B=E6=8B=89=E9=80=89=E6=8B=A9=E3=80=82?= =?UTF-8?q?=20=E7=94=B1=E4=BA=8E=E5=90=8E=E7=AB=AF=E6=8E=A5=E6=94=B6?= =?UTF-8?q?=E7=9A=84=E6=98=AF=E9=93=B6=E8=A1=8C=E5=90=8D=E7=A7=B0=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E4=BC=9A=E7=94=B1=E9=85=8D=E7=BD=AE=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E8=A7=A3=E6=9E=90=EF=BC=8C=E6=89=80=E4=BB=A5?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=AB=AF=E9=93=B6=E8=A1=8C=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E6=98=AF=E4=B8=8D=E8=83=BD=E8=AE=A9=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E6=89=8B=E5=8A=A8=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E7=9A=84=EF=BC=8C=E9=9C=80=E8=A6=81=E6=9F=A5=E8=AF=A2=E5=90=8E?= =?UTF-8?q?=E7=AB=AF=E5=AD=97=E5=85=B8=E9=85=8D=E7=BD=AE=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=92=8C=E9=80=89=E6=8B=A9=E3=80=82=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E7=9A=84=E5=80=BC=E6=98=AF=E9=93=B6=E8=A1=8C=E5=AD=97?= =?UTF-8?q?=E5=85=B8=E5=AF=B9=E5=BA=94=E7=9A=84value=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: heyho --- pages/commission/withdraw.vue | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/pages/commission/withdraw.vue b/pages/commission/withdraw.vue index f75e6ad..7c72165 100644 --- a/pages/commission/withdraw.vue +++ b/pages/commission/withdraw.vue @@ -98,8 +98,14 @@ v-show="state.accountInfo.type === '2'" > - - + + + + 开户地址 @@ -182,19 +189,19 @@ frozenDays: 0, // 冻结天数 minPrice: 0, // 最低提现金额 withdrawTypes: [], // 提现方式 - bankList:[], //银行字典数据 - selectedBankName:"",//选中的银行名称 + bankList:[], //银行字典数据 + selectedBankName:"",//选中的银行名称 }); // 打开提现方式的弹窗 const onAccountSelect = (e) => { - state.accountSelect = e; + state.accountSelect = e; }; // 提交提现 const onConfirm = async () => { // 参数校验 - debugger; + //debugger; if ( !state.accountInfo.price || state.accountInfo.price > state.brokerageInfo.price || @@ -241,7 +248,7 @@ if (data) { state.minPrice = data.brokerageWithdrawMinPrice || 0; state.frozenDays = data.brokerageFrozenDays || 0; - state.withdrawTypes = data.brokerageWithdrawTypes; + state.withdrawTypes = data.brokerageWithdrawTypes; } } @@ -252,23 +259,19 @@ state.brokerageInfo = data; } } - + //获取提现银行配置字典 async function getDictDataListByType(){ let { code, data } = await DictApi.getDictDataListByType('brokerage_bank_name'); if (code !== 0) { return; } - if(data && data.length > 0) { - data.map(item=>{ - item.text = item.label; - }) + if(data && data.length > 0) { state.bankList = data; } } - - //银行下拉选择 - function bankChange(e){ + + function bankChange(e){ console.log(e); let value = e.target.value; state.accountInfo.bankName = value; @@ -282,7 +285,7 @@ onBeforeMount(() => { getWithdrawRules(); getBrokerageUser(); - getDictDataListByType();//获取银行配置字典 + getDictDataListByType();//获取银行字典数据 })