需求:未成年人人脸识别

变更:增加未成年人选择身份证时,不用进行人脸识别
This commit is contained in:
ding.zhou
2020-03-01 21:32:51 +08:00
committed by 28CD73C051F645E8132835671423A23F
parent 69bb80e41e
commit e0ba1ebd26
2 changed files with 8 additions and 9 deletions

View File

@@ -105,6 +105,7 @@
<script>
import { Cell, CellGroup, Field, RadioGroup, Radio, Popup, List, Switch, Toast, SwitchCell, Icon } from 'vant'
import { saveInformation, getBankList, getOrderDetail } from '@/api/ebiz/sale/sale'
import utilsAge from '@/assets/js/utils/age'
import BankCardScan from '@/components/ebiz/sale/BankCardScan'
export default {
data() {
@@ -406,11 +407,9 @@ export default {
this.productNo = res.orderDTO.insuredDTOs[0].riskDTOLst[0].mainRiskCode
//计算年龄
const birthday = res.orderDTO.insuredDTOs[0].birthday
const ageDiff = new Date().getTime() - new Date(birthday).getTime()
const age = Math.floor(ageDiff/1000/60/60/24/365)
const age = utilsAge.getAge(birthday, new Date());
this.age = age
} else {
this.$toast(res.resultMessage)
}

View File

@@ -1193,9 +1193,9 @@ export default {
}
}
//如果是身份证,且未成年,则与投保人关系必须是子女关系
if(age < 18 && this.userInfo.relationToAppnt != '4'){
return this.$toast('被保人小于18周岁选择身份证时与投保人关系必须为子女')
}
// if(age < 18 && this.userInfo.relationToAppnt != '4'){
// return this.$toast('被保人小于18周岁选择身份证时与投保人关系必须为子女')
// }
//证件类型是户口本
} else if (this.userInfo.idType == '2') {
@@ -1230,9 +1230,9 @@ export default {
// }
// 年龄 0-7 周岁且不是投保人的子女
// if (age < 7 && this.userInfo.relationToAppnt != '4') {
// return this.$toast('0-7岁未成年人须由其父母投保请确定')
// }
if (age < 7 && this.userInfo.relationToAppnt != '4') {
return this.$toast('0-7岁未成年人须由其父母投保请确定')
}
if (this.userInfo.salarySource == '4') {
if (!this.userInfo.otherSalarySource) {