mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-16 04:06:44 +08:00
Merge branch 'feature/GFRS-1019【0415】签收回执人脸识别修改为短信验证码-tgy' into release/0507
This commit is contained in:
@@ -78,7 +78,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<van-dialog v-model="show" title="提示" show-cancel-button @confirm="authConfirm(authCode)" @cancel="clearTimer">
|
||||||
|
<p class="p10 fs14">为确保是您本人操作,短信验证码已发送至您手机号{{ encyCustomerMobile }},请您输入验证码以完成后续投保操作。</p>
|
||||||
|
<van-cell-group class="flex align-items-c pr5 mb15">
|
||||||
|
<van-field maxlength="6" placeholder="请输入短信验证码" v-model="authCode" clearable label-width="0" />
|
||||||
|
<van-button type="danger" plain size="small" class="w160 p0" @click="getAuthCode" :disabled="codeDisabled" v-no-more-click="2000">{{
|
||||||
|
codeDisabled ? `${countDown}s后重新获取` : '获取验证码'
|
||||||
|
}}</van-button>
|
||||||
|
</van-cell-group>
|
||||||
|
</van-dialog>
|
||||||
<div class="bottom-btn bg-white" v-if="detailJump == '1'">
|
<div class="bottom-btn bg-white" v-if="detailJump == '1'">
|
||||||
<van-button type="danger" size="large" @click="submit" :disabled="isSubmit" v-no-more-click="1000">提交</van-button>
|
<van-button type="danger" size="large" @click="submit" :disabled="isSubmit" v-no-more-click="1000">提交</van-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -88,8 +96,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { RadioGroup, Radio, Dialog, NoticeBar } from 'vant'
|
import { RadioGroup, Radio, Dialog, NoticeBar, Cell, CellGroup, Button, Field } from 'vant'
|
||||||
import { getOrderDetail, saveInformation, submit } from '@/api/ebiz/sale/sale'
|
import { getAuthCode, autchCodeCheck, getOrderDetail, saveInformation, submit } from '@/api/ebiz/sale/sale'
|
||||||
|
import { checkPhone } from '@/api/ebiz/customer/customer'
|
||||||
import config from '@/config'
|
import config from '@/config'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -97,7 +106,13 @@ export default {
|
|||||||
let isWeixin = this.$utils.device().isWeixin //判断环境
|
let isWeixin = this.$utils.device().isWeixin //判断环境
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
show: false, // 获取短信验证码
|
||||||
|
codeDisabled: false, // 获取验证码按钮是否禁用
|
||||||
|
timeId: null, // 计时器ID
|
||||||
|
countDown: 60, // 倒计时
|
||||||
|
authCode: '', // 验证码
|
||||||
pdfh5: null,
|
pdfh5: null,
|
||||||
|
encyCustomerMobile:'',
|
||||||
pdfUrl: '',
|
pdfUrl: '',
|
||||||
// policyUrl: '',
|
// policyUrl: '',
|
||||||
src: location.origin + '/pdfjs/web/viewer.html?file=',
|
src: location.origin + '/pdfjs/web/viewer.html?file=',
|
||||||
@@ -161,9 +176,69 @@ export default {
|
|||||||
[RadioGroup.name]: RadioGroup,
|
[RadioGroup.name]: RadioGroup,
|
||||||
[Radio.name]: Radio,
|
[Radio.name]: Radio,
|
||||||
[Dialog.name]: Dialog,
|
[Dialog.name]: Dialog,
|
||||||
|
[Cell.name]: Cell,
|
||||||
|
[CellGroup.name]: CellGroup,
|
||||||
|
[Button.name]: Button,
|
||||||
|
[Field.name]: Field,
|
||||||
[NoticeBar.name]: NoticeBar
|
[NoticeBar.name]: NoticeBar
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 获取短信验证码
|
||||||
|
getAuthCode() {
|
||||||
|
this.codeDisabled = true
|
||||||
|
//倒计时
|
||||||
|
this.timeId = setInterval(() => {
|
||||||
|
this.countDown--
|
||||||
|
if (this.countDown <= 0) {
|
||||||
|
window.clearInterval(this.timeId)
|
||||||
|
this.codeDisabled = false
|
||||||
|
this.countDown = 60
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
getAuthCode({
|
||||||
|
operateType: 'appntInfoEntry',
|
||||||
|
type: 'H5',
|
||||||
|
operateCode: this.customerMobile,
|
||||||
|
system: 'agentApp',
|
||||||
|
operateCodeType: '0'
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.result == 0) {
|
||||||
|
this.sid = res.sessionId
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 验证码确认事件
|
||||||
|
async authConfirm() {
|
||||||
|
//清理计时器
|
||||||
|
this.clearTimer()
|
||||||
|
this.changeSubmit()
|
||||||
|
},
|
||||||
|
// 清理计时器
|
||||||
|
clearTimer() {
|
||||||
|
window.clearInterval(this.timeId)
|
||||||
|
this.timeId = null
|
||||||
|
this.countDown = 60
|
||||||
|
this.codeDisabled = false
|
||||||
|
},
|
||||||
|
//提交变更申请
|
||||||
|
async changeSubmit() {
|
||||||
|
if (null == this.sid) {
|
||||||
|
this.$toast('请先进行发送短信验证码')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let res = await autchCodeCheck({
|
||||||
|
smsId: this.sid,
|
||||||
|
code: this.authCode
|
||||||
|
})
|
||||||
|
if (res.result == 0) {
|
||||||
|
this.submit4detail()
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
|
}
|
||||||
|
},
|
||||||
timeOut() {
|
timeOut() {
|
||||||
let that = this
|
let that = this
|
||||||
let time = that.time
|
let time = that.time
|
||||||
@@ -229,8 +304,53 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
submit(){
|
||||||
|
if(this.detailJump == '1'){
|
||||||
|
this.submit4detailJump()
|
||||||
|
}else{
|
||||||
|
this.submit4detail()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
submit4detailJump(){
|
||||||
|
// 如果是回执签收
|
||||||
|
// 则短信验证
|
||||||
|
this.$toast.loading({
|
||||||
|
// 持续展示 toast
|
||||||
|
duration: 0,
|
||||||
|
// 禁用背景点击s
|
||||||
|
forbidClick: true,
|
||||||
|
loadingType: 'spinner',
|
||||||
|
message: '加载中……'
|
||||||
|
})
|
||||||
|
let data = {
|
||||||
|
name: this.saleInsuredInfo.name,
|
||||||
|
idType: this.saleInsuredInfo.idType,
|
||||||
|
idNo: this.saleInsuredInfo.idNo,
|
||||||
|
mobile: this.saleInsuredInfo.mobile
|
||||||
|
}
|
||||||
|
this.customerMobile = this.saleInsuredInfo.mobile
|
||||||
|
this.encyCustomerMobile = this.customerMobile.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2')
|
||||||
|
this.authCode = null
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
// return new Promise((resolve, reject) => {
|
||||||
|
checkPhone(data).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.result == '0') {
|
||||||
|
console.log(res)
|
||||||
|
this.show = true
|
||||||
|
} else {
|
||||||
|
Dialog.confirm({
|
||||||
|
title: '提示',
|
||||||
|
message: '抱歉,您预留的手机号非您本人的手机号,请进行线下投保!',
|
||||||
|
showCancelButton: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// })
|
||||||
|
|
||||||
|
},
|
||||||
// 点击提交
|
// 点击提交
|
||||||
submit() {
|
submit4detail() {
|
||||||
this.$toast.loading({
|
this.$toast.loading({
|
||||||
duration: 0, // 持续展示 toast
|
duration: 0, // 持续展示 toast
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="detail-container pb50">
|
<div class="detail-container pb50" v-if="false">
|
||||||
<!-- <van-uploader
|
<!-- <van-uploader
|
||||||
name="appntImg"
|
name="appntImg"
|
||||||
v-model="appntImg"
|
v-model="appntImg"
|
||||||
@@ -87,6 +87,7 @@ export default {
|
|||||||
this.idcardData.idcardName = JSON.parse(this.$route.query.saleInsuredInfo).name
|
this.idcardData.idcardName = JSON.parse(this.$route.query.saleInsuredInfo).name
|
||||||
this.idcardData.idcardNumber = JSON.parse(this.$route.query.saleInsuredInfo).idNo
|
this.idcardData.idcardNumber = JSON.parse(this.$route.query.saleInsuredInfo).idNo
|
||||||
this.getPolicyDetail()
|
this.getPolicyDetail()
|
||||||
|
this.next()
|
||||||
} else {
|
} else {
|
||||||
// 获取保单详情
|
// 获取保单详情
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -363,36 +363,37 @@ export default {
|
|||||||
},
|
},
|
||||||
// 回执签收
|
// 回执签收
|
||||||
next() {
|
next() {
|
||||||
let that = this
|
this.toNextPage()
|
||||||
if (this.faceAuthCount.appnt < this.smsAuthNum) {
|
// let that = this
|
||||||
if (this.appntDTO.idType == '1') {
|
// if (this.faceAuthCount.appnt < this.smsAuthNum) {
|
||||||
//证件类型为身份证时,进行人脸识别
|
// if (this.appntDTO.idType == '1') {
|
||||||
EWebBridge.webCallAppInJs('face_auth', {
|
// //证件类型为身份证时,进行人脸识别
|
||||||
number: this.appntDTO.idNo, //身份证号码
|
// EWebBridge.webCallAppInJs('face_auth', {
|
||||||
name: this.appntDTO.name //姓名
|
// number: this.appntDTO.idNo, //身份证号码
|
||||||
}).then(data => {
|
// name: this.appntDTO.name //姓名
|
||||||
this.$toast.loading({
|
// }).then(data => {
|
||||||
duration: 0, // 持续展示 toast
|
// this.$toast.loading({
|
||||||
forbidClick: true, // 禁用背景点击
|
// duration: 0, // 持续展示 toast
|
||||||
loadingType: 'spinner',
|
// forbidClick: true, // 禁用背景点击
|
||||||
message: '加载中……'
|
// loadingType: 'spinner',
|
||||||
})
|
// message: '加载中……'
|
||||||
this.$toast.clear()
|
// })
|
||||||
if (JSON.parse(data).state == '1') {
|
// this.$toast.clear()
|
||||||
this.toNextPage()
|
// if (JSON.parse(data).state == '1') {
|
||||||
} else {
|
// this.toNextPage()
|
||||||
that.faceAuthCount.appnt++
|
// } else {
|
||||||
if (that.faceAuthCount.appnt >= this.smsAuthNum) {
|
// that.faceAuthCount.appnt++
|
||||||
this.realPeopelCheck()
|
// if (that.faceAuthCount.appnt >= this.smsAuthNum) {
|
||||||
}
|
// this.realPeopelCheck()
|
||||||
}
|
// }
|
||||||
})
|
// }
|
||||||
} else {
|
// })
|
||||||
this.toNextPage()
|
// } else {
|
||||||
}
|
// this.toNextPage()
|
||||||
} else {
|
// }
|
||||||
this.realPeopelCheck()
|
// } else {
|
||||||
}
|
// this.realPeopelCheck()
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
toNextPage() {
|
toNextPage() {
|
||||||
let params = {
|
let params = {
|
||||||
|
|||||||
Reference in New Issue
Block a user