Commit b25475ee authored by 符伟's avatar 符伟

工行优化

parent e8e08c3a
......@@ -2,6 +2,7 @@
node_modules/
unpackage/
dist/
.hbuilderx/
# local env files
.env.local
......
......@@ -2,10 +2,15 @@
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
"version": "0.0",
"configurations": [{
"type": "uniCloud",
"default": {
"launchtype": "remote"
}
"default" :
{
"launchtype" : "remote"
},
"h5" :
{
"launchtype" : "remote"
},
"type" : "uniCloud"
}
]
}
......@@ -80,7 +80,7 @@
<span>充值生活费</span>
</view>
<!-- -->
<view class="switchbankCard" @click="BackToMini('AssignAddCard')">我要换银行卡支付</view>
<view class="switchbankCard" @click="ChangeBankPay">我要换银行卡支付</view>
</view>
</view>
......@@ -251,7 +251,7 @@
tempFiles1: '../../static/img/idCardBg1.png', //上传身份证临时选择文件
tempFiles2: '../../static/img/idCardBg0.png',
//绑定的一类卡列表
bindcardList: [],
bindcardList: []
}
},
onLoad: function(options) {
......@@ -270,6 +270,56 @@
},
methods: {
async ChangeBankPay(){
uni.showLoading({ mask:true });
let status = await this.accountCloseacceptStatusQuery();
uni.hideLoading();
if( status !== 0 ) return false;
this.BackToMini('AssignAddCard')
},
accountCloseacceptStatusQuery(){
return new Promise(( resolve,reject) => {
$.ajax({ //查询是否提交销户
url:gHost + "/bank-wechat/icbc/account/manager/accountCloseacceptStatusQuery",
type:'post',
data:{
schoolId:this.PersonalInfo.schoolid,
userId:this.PersonalInfo.id,
wechattype: 1,
'sessionid': sessionID,
},
contentType: "application/x-www-form-urlencoded",
headers: {
'sessionid': sessionID,
},
success:( { code , message , results } ) => {
let status = results && results.status ; // 0表示未申请,1申请中,2已销户,3销户申请失败
if(code === '10000' && status == '0'){
}else if(code === '10000' && status == '1'){
uni.showToast({
title: "您已提交销户申请,银行正在审核中。",
icon:'none',
})
}else{
uni.showToast({
title: message,
icon:'none',
})
}
resolve(status)
},
error: function(err) {
uni.showToast({
title: err.message || '请求失败',
icon:'none',
});
reject(-1)
},
});
})
},
// 验证码弹出框开启
toDeposit() {
if (this.isOtherMoney) {
......@@ -378,6 +428,14 @@
loadingType: 'spinner',
duration: 0
});
try{
let status = await this.accountCloseacceptStatusQuery();
if(status !== 0) { loading.clear(); return false };
}catch(e){
loading.clear();
return false
}
$.ajax({
url: gHost + '/bank-wechat/icbc/account/exchange/recharge',
type: "POST",
......@@ -398,15 +456,11 @@
loading.clear();
if (res5.code == "10000") {
this_.close();
Toast({
className: 'SubmittedSuccessfully',
message: '充值申请提交成功',
icon: require('../../../static/images/tijiaos.png'),
});
setTimeout(function() {
this_.ExchangeRechargeQuery(res5.results.flowId, res5.results
.corpSerno);
}, 2000)
wx.showModal({
title:'充值申请已提交',
content:'银行处理需要1-5分钟时间,充值结果以余额查询为准。',
showCancel:false
})
} else {
weui.topTips(res5.message)
}
......@@ -661,7 +715,7 @@
}
},
error: function(err) {
loading.hide();
// loading.hide();
},
});
},
......@@ -713,7 +767,7 @@
}
</script>
<style scoped lang="scss">
<style lang="scss">
html,
body,
page {
......@@ -748,6 +802,7 @@
background: #000000;
opacity: 0.8;
border-radius: 8rpx;
}
.cardNum {
......
......@@ -177,7 +177,12 @@
success: function(res5) {
loading.hide();
if (res5.code == "10000") {
this_.ExchangeWithdrawQuery(res5.results.flowId, res5.results.corpSerno);
// this_.ExchangeWithdrawQuery(res5.results.flowId, res5.results.corpSerno);
wx.showModal({
title:'提现申请已提交',
content:'银行处理需要1-5分钟时间,充值结果以余额查询为准。',
showCancel:false
})
} else {
weui.topTips(res5.message)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment