优化:提现 - 只有一个提现打款方式时,默认选中

This commit is contained in:
wuhui_zzw 2023-12-04 14:08:13 +08:00
parent e7295879bc
commit 64f344ea51
3 changed files with 15 additions and 4 deletions

View File

@ -243,7 +243,7 @@ export default {
this.actual_amount = "0.00";
this.getData(); // 初始化数据
// this.getWithdrawType(); // 获取提现方式
this.getWithdrawType(false); // 获取提现方式
this.customizeIncome();
this.dynamicTxt();
@ -430,7 +430,6 @@ export default {
if(key){
this.show1 = true;
}
console.log(response);
this.pay_typeList = response.data;
this.initWithdrawType(response.data);
} else {
@ -544,6 +543,15 @@ export default {
this.tax_withdraw_Pay(data)//税惠添薪
// 汇聚代发薪
this.consol_withdraw_Pay(data);
// 处理:只有一个时 默认选中
let newData = Object.assign({}, data);
delete newData.service_switch;
let newDataKeys = Object.keys(newData);
if(newDataKeys.length == 1){
this.pay_type = newDataKeys[0];
this.SelectHandle(newDataKeys[0]);
}
},
// 支付宝
@ -905,6 +913,7 @@ export default {
},
//提现方式选择监听
SelectHandle(val){
console.log("当前选中内容:",val);
//判断微信/支付宝/银行卡-好灵工是否注册,未注册则跳转到注册页面
if(this.pay_type=='worker_withdraw_bank' || this.pay_type=='worker_withdraw_wechat' || this.pay_type=='worker_withdraw_alipay' ){
if(this[this.pay_type].extra_data.is_register == 0){
@ -1040,6 +1049,8 @@ export default {
this.pay_type = '';
break;
}
this.$forceUpdate();
},
// 全选监听
allSelectHandle(value) {

View File

@ -20,7 +20,7 @@
</div>
</div>
<van-sticky :offset-top="40" @change="stickChange">
<div class="elementsin_bottom" v-if="checkList.length > 0" @click="getWithdrawType" :style="{ 'background-color': stickStatus ? 'rgb(250, 138, 77,1)' : '' }">
<div class="elementsin_bottom" @click="getWithdrawType" :style="{ 'background-color': stickStatus ? 'rgb(250, 138, 77,1)' : '' }">
<i class="iconfont" :class="[withTypeTipsIcon]"></i>
<div class="elementsin_bottom_text" v-if="pay_type">
<span class="elementsin_bottom_text_top">{{ withTypeTipsTitle }} </span>

View File

@ -112,7 +112,7 @@ module.exports = {
},
proxy: {
"/addons/yun_shop/api.php": {
target: "https://bztang.cdlfjy.com/", //目标接口域名bztang.cdlfjy.com testbzt.cdlfjy.com
target: "https://testbzt.cdlfjy.com/", //目标接口域名bztang.cdlfjy.com testbzt.cdlfjy.com
changeOrigin: true, //是否跨域
secure: false
// pathRewrite: {