[FIX]【保全】退保-是否需要上传身份证件影像问题修复;受益人变更

This commit is contained in:
yuweiqi
2020-06-11 19:09:44 +08:00
parent 90a944866a
commit c85a38b262
16 changed files with 406 additions and 452 deletions

View File

@@ -13,6 +13,8 @@
</template>
<script>
import utilsAge from '@/assets/js/utils/age'
export default {
name: 'HandleResult',
data() {
@@ -22,7 +24,8 @@ export default {
entry: '',
signInvalid: '',
surrenderType: '',
customerInfo: {}
customerInfo: {},
policy: {}
}
},
created() {
@@ -30,13 +33,16 @@ export default {
if (localStorage['preserve-customerInfo']) {
this.customerInfo = JSON.parse(localStorage['preserve-customerInfo'])
}
if (localStorage['preserve-policy']) {
this.policy = JSON.parse(localStorage['preserve-policy'])
}
// 此处处理 this.path
switch (this.entry) {
case 'BB':
this.path = `/preserve/ContactConfirmation?entry=${this.entry}`
this.path = `/preserve/BB/ContactConfirmation?entry=${this.entry}`
break
case 'BC':
this.path = `/preserve/BeneficiaryConfirmation?entry=${this.entry}`
this.path = `/preserve/BC/BeneficiaryConfirmation?entry=${this.entry}`
break
case 'PC':
this.path = `/preserve/pc/renewalConfirmation?entry=${this.entry}`
@@ -74,21 +80,36 @@ export default {
})
}
} else if (this.entry == 'BC') {
// 如果 保全项是 受益人变更则进行特殊判断
// 若被保险人≥18周岁人脸识别录入被保人本人
// 若被保险人18周岁被保险人与投保人为子女关系人脸识别录入未成年人父亲或母亲
// toDo
//
// if (this.customerInfo.idType != '1' ) {
// // 如果证件类型不是身份证
// // 直接跳过人脸识别
// this.jumpNextPage(this.path)
// }
//
this.jumpNextPage(this.path)
/* 如果 保全项是 受益人变更则进行特殊判断
若被保险人≥18周岁人脸识别录入被保人本人
若被保险人18周岁被保险人与投保人为子女关系人脸识别录入未成年人父亲或母亲*/
let age = utilsAge.getAge(this.policy.insuredInfo.insuredBirthday, new Date())
if (age >= 18) {
if (this.policy.insuredInfo.idType != '0') {
// 如果证件类型不是身份证——直接跳过人脸识别
this.jumpNextPage(this.path)
} else {
this.toFace({
number: this.policy.insuredInfo.idNo, //身份证号码
name: this.policy.insuredInfo.insuredName, //姓名
businessSource: '4' //业务来源:1-电投2-入司3-理赔4-保全
})
}
} else {
if (this.policy.appntInfo.idType != '0') {
// 如果证件类型不是身份证——直接跳过人脸识别
this.jumpNextPage(this.path)
} else {
this.toFace({
number: this.policy.appntInfo.idNo, //身份证号码
name: this.policy.appntInfo.appntName, //姓名
businessSource: '4' //业务来源:1-电投2-入司3-理赔4-保全
})
}
}
}
},
jumpNextPage(path = '/preserve/bc/BeneficiaryInfo') {
jumpNextPage(path) {
this.$jump({
flag: 'h5',
extra: {
@@ -101,10 +122,7 @@ export default {
},
toFace(config) {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('face_auth', {
number: this.customerInfo.idNo, //身份证号码
name: this.customerInfo.customerName //姓名
})
EWebBridge.webCallAppInJs('face_auth', config)
// 跳过人脸识别
// new Promise(resolve => {
// console.log('--跳过人脸识别--返回识别成功')