Merge branch 'dev' of 112.124.100.131:GFRS/ebiz-h5 into dev

This commit is contained in:
liyuetong
2021-07-27 16:49:18 +08:00
3 changed files with 29 additions and 20 deletions

View File

@@ -270,8 +270,9 @@ export default {
} }
}, },
handlePhoto(url) { handlePhoto(url) {
let index = url.indexOf('images') //let index = url.indexOf('images')
return this.$assetsUpUrl + url.substring(index) //return this.$assetsUpUrl + url.substring(index)
return this.$assetsUpUrl + url;
}, },
handlePdf(url) { handlePdf(url) {
this.pdfShow = true this.pdfShow = true
@@ -330,7 +331,7 @@ export default {
} }
}, },
familyRelationFilter(val) { familyRelationFilter(val) {
for (let item of dictionary.relationType) { for (let item of dictionary.agentEenterBasicFamilyRelationType) {
if (item.id === val) { if (item.id === val) {
return item.text return item.text
} }

View File

@@ -341,7 +341,7 @@ export default {
} }
}, },
familyRelationFilter(val) { familyRelationFilter(val) {
for (let item of dictionary.relationType) { for (let item of dictionary.agentEenterBasicFamilyRelationType) {
if (item.id === val) { if (item.id === val) {
return item.text return item.text
} }

View File

@@ -409,11 +409,19 @@ export default {
}, },
async checkBankCardSign(){ async checkBankCardSign(){
// 是否需要签约标识
let isNeedSignFlag = true;
// 1.短期险不需要签约 // 1.短期险不需要签约
console.log("是否是长险", this.$CacheUtils.getLocItem('isLongInsuranceFlag')) console.log("是否是长险", this.$CacheUtils.getLocItem('isLongInsuranceFlag'))
if (this.$CacheUtils.getLocItem('isLongInsuranceFlag') === 'N') { if (this.$CacheUtils.getLocItem('isLongInsuranceFlag') === 'N') {
return true; isNeedSignFlag = false;
} }
const bankCode = JSON.parse(window.localStorage.getItem('underWriteData')).bankCode;
// 1.微信支付方式 2.银行卡支付 且 招商银行卡 需要签约
if (!((this.radio == '' && ('CMB' == bankCode || '308' == bankCode)) || this.radio == '3')){
isNeedSignFlag = false;
}
this.$toast.clear() this.$toast.clear()
this.$toast.loading({ this.$toast.loading({
duration: 0, // 持续展示 toast duration: 0, // 持续展示 toast
@@ -423,25 +431,27 @@ export default {
}) })
//校验 //校验
let data = { orderNo: this.orderNo } let data = { orderNo: this.orderNo }
console.log("orderNo", data) return new Promise((resolve) => {
return new Promise((resolve, reject) => { if (!isNeedSignFlag) {
resolve(true)
return
}
getBankCardSignState(data).then(checkRes => { getBankCardSignState(data).then(checkRes => {
if (checkRes.result == '0') { if (checkRes.result == '0') {
this.$toast.clear() this.$toast.clear()
console.log("=========", checkRes) console.log("=========", checkRes)
if (checkRes.signState == '2') { if (checkRes.signState == '2' || checkRes.needSign == '0') {
// 不需签约 或 已签约 不做处理 发起支付 // 不需签约 或 已签约 不做处理 可以发起支付
localStorage.removeItem('changeCard') localStorage.removeItem('changeCard')
resolve(true); resolve(true);
} else { } else if (checkRes.needSign == '1'){
const bankCode = JSON.parse(window.localStorage.getItem('underWriteData')).bankCode; // 需要签约
const shortUrl = checkRes.shortUrl; const shortUrl = checkRes.shortUrl;
// 招商银行卡 提示去官微签约 if(checkRes.signState == '1'){
if(checkRes.signState == '1' && checkRes.needSign == '1' && this.radio == '' && ('CMB' == bankCode || '308' == bankCode)){ // 需签约 且 未签约
this.bankSignJump(shortUrl) this.bankSignJump(shortUrl)
resolve(false); resolve(false);
} }else if (checkRes.signState == '4') {
if (checkRes.signState == '4') {
// 签约中 // 签约中
this.$toast('亲,您的银行卡正在签约中,请稍后再试') this.$toast('亲,您的银行卡正在签约中,请稍后再试')
resolve(false); resolve(false);
@@ -466,12 +476,10 @@ export default {
// on cancel // on cancel
resolve(false); 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{ }else{
this.$toast(checkRes.resultMessage) this.$toast(checkRes.resultMessage)