Commit 93a7eb4f authored by 袁玲利's avatar 袁玲利

浦发充值提现新逻辑

parent 88056c03
This diff is collapsed.
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<view class="left_">提现金额 </view> <view class="left_">提现金额 </view>
<view class="right_">每日可提现一次</view> <view class="right_">每日可提现一次</view>
</view> </view>
<!-- 20211230渤海银行 --> <!-- 20211230渤海银行 浦发银行 -->
<view class="BankBohai" v-if="bankInfo_.accountType==4"> <view class="BankBohai" v-if="bankInfo_.accountType==4 || bankInfo_.accountType==5">
<view class="BankBHL">提现至</view> <view class="BankBHL">提现至</view>
<view class="BankBHR"> <view class="BankBHR">
<view class="">{{bankInfo_.bindCardName}} <view class="">{{bankInfo_.bindCardName}}
...@@ -141,7 +141,9 @@ ...@@ -141,7 +141,9 @@
msCount: 60, //定时器 msCount: 60, //定时器
CodeMsg: "获取验证码", CodeMsg: "获取验证码",
RechargeSmsorderNoInfo: {}, //第三方合作交易标识 RechargeSmsorderNoInfo: {}, //第三方合作交易标识
WithdrawInfo: null WithdrawInfo: null,
bindcardList: [],
bindCardNo: "",
} }
}, },
onLoad: function(options) { onLoad: function(options) {
...@@ -189,6 +191,9 @@ ...@@ -189,6 +191,9 @@
case 4: case 4:
withdrawSmsUrl = withdrawSmsUrl + '/bank-wechat/bohai/comprehensive/otpSms'; withdrawSmsUrl = withdrawSmsUrl + '/bank-wechat/bohai/comprehensive/otpSms';
break; break;
case 5:
withdrawSmsUrl = withdrawSmsUrl + '/bank-wechat/spdb/passcodes';
break;
default: default:
Dialog({ Dialog({
title: '系统提示', title: '系统提示',
...@@ -197,20 +202,38 @@ ...@@ -197,20 +202,38 @@
throw ("银行账号类型错误!") throw ("银行账号类型错误!")
break; break;
} }
let params = {
amount: (this.inputOtherM * 1).toFixed(2), //充值金额,单位元
schoolId: bankInfo.schoolId, //学校id
userId: userID, //用户id
sessionid: sessionID,
wechattype: 1,
// 21211230渤海银行
mobilePhone: this.openCardPhon,
msg: "提现"
}
let params1 = {
mobileNum: this.openCardPhon,
schoolId: bankInfo.schoolId, //学校id
userId: userID, //用户id
sessionid: sessionID,
wechattype: 1
}
$.ajax({ $.ajax({
url: withdrawSmsUrl, url: withdrawSmsUrl,
type: "POST", type: "POST",
contentType: "application/x-www-form-urlencoded", contentType: "application/x-www-form-urlencoded",
data: { // data: {
amount: (this.inputOtherM * 1).toFixed(2), //充值金额,单位元 // amount: (this.inputOtherM * 1).toFixed(2), //充值金额,单位元
schoolId: bankInfo.schoolId, //学校id // schoolId: bankInfo.schoolId, //学校id
userId: userID, //用户id // userId: userID, //用户id
sessionid: sessionID, // sessionid: sessionID,
wechattype: 1, // wechattype: 1,
// 21211230渤海银行 // // 21211230渤海银行
mobilePhone: this.openCardPhon, // mobilePhone: this.openCardPhon,
msg: "提现" // msg: "提现"
}, // },
data: bankInfo.accountType == 5 ? params1 : params,
headers: { headers: {
'sessionid': sessionID, 'sessionid': sessionID,
}, },
...@@ -308,12 +331,16 @@ ...@@ -308,12 +331,16 @@
return return
} }
this.openCardPhonSms = ''; this.openCardPhonSms = '';
this.$refs.popup.open('top') if(bankInfo.accountType != 5) {
this.$refs.popup.open('top')
}else {
this.ExchangeWithdraw();
}
}, },
// 提现 // 提现
async ExchangeWithdraw() { async ExchangeWithdraw() {
let this_ = this; let this_ = this;
if (bankInfo.accountType != 4) { if (bankInfo.accountType != 4 && bankInfo.accountType != 5) {
if (!this.RechargeSmsorderNoInfo.orderNo) { if (!this.RechargeSmsorderNoInfo.orderNo) {
Dialog({ Dialog({
title: '系统提示', title: '系统提示',
...@@ -322,7 +349,7 @@ ...@@ -322,7 +349,7 @@
return return
} }
} }
if (!this.openCardPhonSms) { if (!this.openCardPhonSms && bankInfo.accountType != 5) {
Dialog({ Dialog({
title: '系统提示', title: '系统提示',
message: '请收入验证码!' message: '请收入验证码!'
...@@ -332,6 +359,9 @@ ...@@ -332,6 +359,9 @@
let loading = weui.loading('请稍后'); let loading = weui.loading('请稍后');
// 20211230 // 20211230
let withdrawUrl = gHost; let withdrawUrl = gHost;
if(bankInfo.accountType == 5){
await this.queryBindCardListBefore();
}
switch (bankInfo.accountType) { switch (bankInfo.accountType) {
case 3: case 3:
withdrawUrl = withdrawUrl + '/bank-wechat/bocom/exchange/withdraw'; withdrawUrl = withdrawUrl + '/bank-wechat/bocom/exchange/withdraw';
...@@ -339,6 +369,9 @@ ...@@ -339,6 +369,9 @@
case 4: case 4:
withdrawUrl = withdrawUrl + '/bank-wechat/bohai/exchange/withdraw'; withdrawUrl = withdrawUrl + '/bank-wechat/bohai/exchange/withdraw';
break; break;
case 5:
withdrawUrl = withdrawUrl + '/bank-wechat/spdb/withdrawals';
break;
default: default:
Dialog({ Dialog({
title: '系统提示', title: '系统提示',
...@@ -347,23 +380,42 @@ ...@@ -347,23 +380,42 @@
throw ("银行账号类型错误!") throw ("银行账号类型错误!")
break; break;
} }
$.ajax({ let params = {
url: withdrawUrl, amount: (this.inputOtherM * 1).toFixed(2), //充值金额,单位元
type: "POST", orderNo: this_.RechargeSmsorderNoInfo.orderNo,
contentType: "application/x-www-form-urlencoded", msgCodeSeq: this_.RechargeSmsorderNoInfo.msgCodeSeq,
data: { msgVerCode: this_.openCardPhonSms,
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
// 21211230渤海银行
transAmount: (this.inputOtherM * 1).toFixed(2),
verifyNo: this_.openCardPhonSms,
};
let bindingCardId = "";
if(this.bindcardList.length){
let arr = this.bindcardList.filter(x => x.bindCardNo == this_.bindCardNo);
if(arr.length){
bindingCardId = arr[0].bindCardId;
}
}
if (bankInfo.accountType == 5) {
params = {
amount: (this.inputOtherM * 1).toFixed(2), //充值金额,单位元 amount: (this.inputOtherM * 1).toFixed(2), //充值金额,单位元
orderNo: this_.RechargeSmsorderNoInfo.orderNo,
msgCodeSeq: this_.RechargeSmsorderNoInfo.msgCodeSeq,
msgVerCode: this_.openCardPhonSms,
schoolId: bankInfo.schoolId, schoolId: bankInfo.schoolId,
bindingCardId: bindingCardId,
userId: userID, userId: userID,
sessionid: sessionID, sessionid: sessionID,
wechattype: 1, wechattype: 1,
// 21211230渤海银行 };
transAmount: (this.inputOtherM * 1).toFixed(2),
verifyNo: this_.openCardPhonSms, }
}, $.ajax({
url: withdrawUrl,
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: params,
headers: { headers: {
'sessionid': sessionID, 'sessionid': sessionID,
}, },
...@@ -376,10 +428,10 @@ ...@@ -376,10 +428,10 @@
content: '银行处理需要1-5分钟时间,充值结果以余额查询为准。', content: '银行处理需要1-5分钟时间,充值结果以余额查询为准。',
showCancel: false, showCancel: false,
success: function() { success: function() {
if (bankInfo.accountType != 4) { if (bankInfo.accountType != 4 && bankInfo.accountType != 5) {
this_.ExchangeWithdrawQuery(); this_.ExchangeWithdrawQuery();
} }
if (bankInfo.accountType == 4) { if (bankInfo.accountType == 4 && bankInfo.accountType != 5) {
window.location.reload() window.location.reload()
} }
} }
...@@ -465,7 +517,7 @@ ...@@ -465,7 +517,7 @@
ReturnToTop() { ReturnToTop() {
// 若最后一位为小数点则去掉 // 若最后一位为小数点则去掉
let str = this.inputOtherM + ""; let str = this.inputOtherM + "";
if(str.lastIndexOf('.') == str.length - 1) { if (str.lastIndexOf('.') == str.length - 1) {
this.inputOtherM = str.substring(0, str.length - 1) this.inputOtherM = str.substring(0, str.length - 1)
} }
this.$nextTick(function() { this.$nextTick(function() {
...@@ -576,6 +628,9 @@ ...@@ -576,6 +628,9 @@
case 4: case 4:
queryBankInfoUrl = queryBankInfoUrl + '/bank-wechat/bohai/exchange/balanceQuery'; queryBankInfoUrl = queryBankInfoUrl + '/bank-wechat/bohai/exchange/balanceQuery';
break; break;
case 5:
queryBankInfoUrl = queryBankInfoUrl + '/bank-wechat/spdb/balancesQuery';
break;
default: default:
Dialog({ Dialog({
title: '系统提示', title: '系统提示',
...@@ -584,18 +639,24 @@ ...@@ -584,18 +639,24 @@
throw ("银行账号类型错误!") throw ("银行账号类型错误!")
break; break;
} }
let params = {
mediumId: bankInfo.accountNo || "",
schoolId: bankInfo.schoolId || "",
userId: bankInfo.userId || "",
sessionid: sessionID,
wechattype: 1,
};
if (bankInfo.accountType == 5) {
Object.assign(params, {
accountId: bankInfo.thirdId
})
}
$.ajax({ $.ajax({
url: queryBankInfoUrl, url: queryBankInfoUrl,
type: "POST", type: "POST",
timeout: 8000, timeout: 8000,
contentType: "application/x-www-form-urlencoded", contentType: "application/x-www-form-urlencoded",
data: { data: params,
mediumId: bankInfo.accountNo || '',
schoolId: bankInfo.schoolId || '',
userId: bankInfo.userId || '',
sessionid: sessionID,
wechattype: 1,
},
success: function(res3) { success: function(res3) {
loading.hide(); loading.hide();
if (res3.code == "10000") { if (res3.code == "10000") {
...@@ -658,8 +719,10 @@ ...@@ -658,8 +719,10 @@
success: function(res2) { success: function(res2) {
if (res2.code == "10000") { if (res2.code == "10000") {
bankInfo = res2.results; bankInfo = res2.results;
console.log(bankInfo, 'bankInfobankInfobankInfobankInfo')
bankInfo.sessionid = sessionID; bankInfo.sessionid = sessionID;
this_.bankInfo_ = bankInfo this_.bankInfo_ = bankInfo
this_.bindCardNo = res2.results.bindCardNo;
// 20211129 // 20211129
this_.openCardPhon = bankInfo.mobileNo this_.openCardPhon = bankInfo.mobileNo
this_.queryBankInfo(); this_.queryBankInfo();
...@@ -672,6 +735,34 @@ ...@@ -672,6 +735,34 @@
}, },
}); });
}, },
async queryBindCardListBefore() {
let this_ = this;
let loading = weui.loading("请稍后");
await $.ajax({
url: gHost + "/bank-wechat/user/bank/bindingList",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: {
cardNo: bankInfo.accountNo,
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
},
success: function(res4) {
loading.hide();
if (res4.code == "10000") {
this_.bindcardList = res4.results;
console.log(this_.bindcardList, 'bindcardListbindcardListbindcardList')
} else {
weui.topTips(res4.message);
}
},
error: function(err) {
loading.hide();
},
});
},
//查询用户信息 //查询用户信息
QueryUserInfo() { QueryUserInfo() {
let this_ = this; let this_ = this;
......
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