mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 02:16:44 +08:00
银行卡签约需求-修改前端校验逻辑
This commit is contained in:
@@ -253,8 +253,9 @@ export default {
|
||||
message: '加载中……'
|
||||
})
|
||||
}
|
||||
|
||||
if(await this.checkBankCardSign()){
|
||||
// signFlag 是否完成签约
|
||||
let signFlag = await this.checkBankCardSign()
|
||||
if (signFlag) {
|
||||
const res = await payFlag({ orderNo: this.orderNo })
|
||||
console.dir(res)
|
||||
if (res.content.payFlag == 'Y') {
|
||||
@@ -378,7 +379,9 @@ export default {
|
||||
}
|
||||
},
|
||||
async share() {
|
||||
if(await this.checkBankCardSign()) {
|
||||
// signFlag 是否完成签约
|
||||
let signFlag = await this.checkBankCardSign()
|
||||
if (signFlag) {
|
||||
let shareName = this.underWriteData.appntName
|
||||
EWebBridge.webCallAppInJs('bridge', {
|
||||
flag: 'share',
|
||||
@@ -421,61 +424,61 @@ export default {
|
||||
//校验
|
||||
let data = { orderNo: this.orderNo }
|
||||
console.log("orderNo", data)
|
||||
await getBankCardSignState(data).then(checkRes => {
|
||||
if (checkRes.result == '0') {
|
||||
this.$toast.clear()
|
||||
console.log("=========", checkRes)
|
||||
if (checkRes.signState == '2') {
|
||||
// 不需签约 或 已签约 不做处理 发起支付
|
||||
localStorage.removeItem('changeCard')
|
||||
return true;
|
||||
} else {
|
||||
const bankCode = JSON.parse(window.localStorage.getItem('underWriteData')).bankCode;
|
||||
const shortUrl = checkRes.shortUrl;
|
||||
// 招商银行卡 提示去官微签约
|
||||
if(checkRes.signState == '1' && checkRes.needSign == '1' && this.radio == '' && ('CMB' == bankCode || '308' == bankCode)){
|
||||
this.bankSignJump(shortUrl)
|
||||
return false;
|
||||
}
|
||||
if (checkRes.signState == '4') {
|
||||
// 签约中
|
||||
this.$toast('亲,您的银行卡正在签约中,请稍后再试')
|
||||
return false;
|
||||
} else if (checkRes.signState == '3') {
|
||||
// 签约失败
|
||||
const info = '亲,您当前银行卡账户续期签约失败,原因:' + checkRes.resultMessage
|
||||
Dialog.confirm({
|
||||
message: info,
|
||||
className: 'reConfirm leftConfirm',
|
||||
cancelButtonText: '返回',
|
||||
cancelButtonColor: '#ff5e50',
|
||||
confirmButtonText: '修改银行卡信息',
|
||||
confirmButtonColor: '#ff5e50',
|
||||
allowHtml: true
|
||||
}).then(() => {
|
||||
// on confirm
|
||||
// 订单状态已同步修改为 签约失败,页面提示去修改银行卡信息
|
||||
localStorage.setItem('changeCard', true)
|
||||
this.$router.push('/sale/AccountInformation')
|
||||
return false;
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
return false;
|
||||
});
|
||||
} else if (checkRes.signState == '1' && checkRes.needSign == '1' && this.radio == '3') {
|
||||
// 需签约 且 未签约
|
||||
// 提示去签约
|
||||
this.bankSignJump(shortUrl)
|
||||
return false;
|
||||
}else {
|
||||
return true;
|
||||
return new Promise((resolve, reject) => {
|
||||
getBankCardSignState(data).then(checkRes => {
|
||||
if (checkRes.result == '0') {
|
||||
this.$toast.clear()
|
||||
console.log("=========", checkRes)
|
||||
if (checkRes.signState == '2') {
|
||||
// 不需签约 或 已签约 不做处理 发起支付
|
||||
localStorage.removeItem('changeCard')
|
||||
resolve(true);
|
||||
} else {
|
||||
const bankCode = JSON.parse(window.localStorage.getItem('underWriteData')).bankCode;
|
||||
const shortUrl = checkRes.shortUrl;
|
||||
// 招商银行卡 提示去官微签约
|
||||
if(checkRes.signState == '1' && checkRes.needSign == '1' && this.radio == '' && ('CMB' == bankCode || '308' == bankCode)){
|
||||
this.bankSignJump(shortUrl)
|
||||
resolve(false);
|
||||
}
|
||||
if (checkRes.signState == '4') {
|
||||
// 签约中
|
||||
this.$toast('亲,您的银行卡正在签约中,请稍后再试')
|
||||
resolve(false);
|
||||
} else if (checkRes.signState == '3') {
|
||||
// 签约失败
|
||||
const info = '亲,您当前银行卡账户续期签约失败,原因:' + checkRes.resultMessage
|
||||
Dialog.confirm({
|
||||
message: info,
|
||||
className: 'reConfirm leftConfirm',
|
||||
cancelButtonText: '返回',
|
||||
cancelButtonColor: '#ff5e50',
|
||||
confirmButtonText: '修改银行卡信息',
|
||||
confirmButtonColor: '#ff5e50',
|
||||
allowHtml: true
|
||||
}).then(() => {
|
||||
// on confirm
|
||||
// 订单状态已同步修改为 签约失败,页面提示去修改银行卡信息
|
||||
localStorage.setItem('changeCard', true)
|
||||
this.$router.push('/sale/AccountInformation')
|
||||
resolve(false);
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
resolve(false);
|
||||
});
|
||||
} else if (checkRes.signState == '1' && checkRes.needSign == '1' && this.radio == '3') {
|
||||
// 需签约 且 未签约
|
||||
// 提示去签约
|
||||
this.bankSignJump(shortUrl)
|
||||
resolve(false);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
this.$toast(checkRes.resultMessage)
|
||||
resolve(false);
|
||||
}
|
||||
}else{
|
||||
this.$toast(checkRes.resultMessage)
|
||||
return false;
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
||||
Reference in New Issue
Block a user