【修复】小程序端银行卡提现,银行名称改为下拉选择。

由于后端接收的是银行名称参数会由配置字典进行解析,所以小程序端银行名称是不能让用户输入框手动输入的,需要查询后端字典配置进行显示和选择。提交的值是银行字典对应的value。

Signed-off-by: heyho <heywsk@qq.com>
pull/92/head
heyho 2024-09-04 09:31:55 +00:00 committed by Gitee
parent 9f33e44db0
commit 089191e95d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 19 additions and 16 deletions

View File

@ -98,8 +98,14 @@
v-show="state.accountInfo.type === '2'"
>
<view class="unit" />
<!--银入输入改为下拉-->
<picker @change="bankChange" :value="state.accountInfo.bankName" :range="state.bankList" range-key="label" style="width:100%">
<!-- <uni-easyinput
:inputBorder="false"
class="ss-flex-1 ss-p-l-10"
v-model="state.accountInfo.bankName"
placeholder="请输入提现银行"
/> -->
<!--银行改为下拉选择-->
<picker @change="bankChange" :value="state.accountInfo.bankName" :range="state.bankList" range-key="label" style="width:100%">
<uni-easyinput
:inputBorder="false"
:value="state.selectedBankName"
@ -109,6 +115,7 @@
:styles="{disableColor:'#fff',borderColor:'#fff',color:'#333!important'}"
/>
</picker>
</view>
<!-- 开户地址 -->
<view class="card-title" v-show="state.accountInfo.type === '2'"></view>
@ -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();//
})
</script>