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

View File

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

View File

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