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

pull/91/MERGE
YunaiV 2024-09-05 20:08:48 +08:00
parent 1cfd974fed
commit 81cd02bbee
3 changed files with 49 additions and 59 deletions

View File

@ -15,7 +15,10 @@
<view class="num-title">可提现金额</view>
<view class="wallet-num">{{ fen2yuan(state.brokerageInfo.brokeragePrice) }}</view>
</view>
<button class="ss-reset-button log-btn" @tap="sheep.$router.go('/pages/commission/wallet', { type: 2 })">
<button
class="ss-reset-button log-btn"
@tap="sheep.$router.go('/pages/commission/wallet', { type: 2 })"
>
提现记录
</button>
</view>
@ -98,24 +101,23 @@
v-show="state.accountInfo.type === '2'"
>
<view class="unit" />
<!-- <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"
placeholder="请选择银行"
suffixIcon="right"
disabled
:styles="{disableColor:'#fff',borderColor:'#fff',color:'#333!important'}"
/>
</picker>
<!--银行改为下拉选择-->
<picker
@change="bankChange"
:value="state.bankListSelectedIndex"
:range="state.bankList"
range-key="label"
style="width: 100%"
>
<uni-easyinput
:inputBorder="false"
:value="state.accountInfo.bankName"
placeholder="请选择银行"
suffixIcon="right"
disabled
:styles="{ disableColor: '#fff', borderColor: '#fff', color: '#333!important' }"
/>
</picker>
</view>
<!-- 开户地址 -->
<view class="card-title" v-show="state.accountInfo.type === '2'"></view>
@ -189,8 +191,8 @@
frozenDays: 0, //
minPrice: 0, //
withdrawTypes: [], //
bankList:[], //
selectedBankName:"",//
bankList: [], //
bankListSelectedIndex: '', // bankList index
});
//
@ -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 = {};
}
},
});
};
@ -260,33 +262,29 @@
}
}
//
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(); //
});
</script>
<style lang="scss" scoped>

View File

@ -2,14 +2,6 @@ import request from '@/sheep/request';
// 拼团 API
const CombinationApi = {
// 获得拼团活动列表
getCombinationActivityList: (count) => {
return request({
url: '/promotion/combination-activity/list',
method: 'GET',
params: { count },
});
},
// 获得拼团活动分页
getCombinationActivityPage: (params) => {

View File

@ -6,9 +6,9 @@ const DictApi = {
return request({
url: `/system/dict-data/type`,
method: 'GET',
params: {
type,
},
params: {
type,
},
});
},
};