[fix] 基本完成 保全-联系方式变更 的 除数据传输 的全部页面逻辑,【原因:接口文档未确定】

This commit is contained in:
tian.guangyuan
2020-04-09 15:53:15 +08:00
parent affcb65f36
commit 42eb67f47a
5 changed files with 248 additions and 392 deletions

View File

@@ -7,6 +7,7 @@ const policyList = () => import('@/views/ebiz/preserve/PolicyList')
const renewalInfo = () => import('@/views/ebiz/preserve/RenewalInfo')
const renewalConfirmation = () => import('@/views/ebiz/preserve/RenewalConfirmation')
const contactInfo = () => import('@/views/ebiz/preserve/ContactInfo')
const contacAgreement = () => import('@/views/ebiz/preserve/ContacAgreement')
const contactConfirmation = () => import('@/views/ebiz/preserve/ContactConfirmation')
const beneficiaryInfo = () => import('@/views/ebiz/preserve/BeneficiaryInfo')
const beneficiaryConfirmation = () => import('@/views/ebiz/preserve/BeneficiaryConfirmation')
@@ -41,6 +42,15 @@ export default [
index: 3
}
},
{
path: '/preserve/contacAgreement',
name: 'contacAgreement',
component: contacAgreement,
meta: {
title: '联系方式变更协议',
index: 100
}
},
{
path: '/preserve/renewalInfo',
name: 'renewalInfo',

View File

@@ -1,16 +1,16 @@
<!--联系方式变更协议-->
<template>
<div class="insuranceInformation-container pb50">
<div class="content">
<van-notice-bar :scrollable="false" v-if="!Time" class="notice">{{ `提示阅读时长需在${this.Time ? this.time : this.number}秒以上` }}</van-notice-bar>
<iframe :src="src + pdfUrl" class="iframe"></iframe>
<van-radio-group v-model="radio" class="pb10 pt20 pl30 fs14">
<van-radio-group v-model="radio" class="pb10 pt20 pl30 pr30 fs14">
<van-radio name="1" @click="click">
本人确认已阅读
<span>国富人寿人身保险联系方式变更协议</span>
</van-radio>
</van-radio-group>
<div class="bg-white bottom-btn">
<van-button type="danger" size="large" @click="goNext" v-no-more-click="1000">下一步</van-button>
<van-button type="danger" size="large" :disabled="isDisable" @click="goNext" v-no-more-click="1000">下一步</van-button>
</div>
</div>
</template>
@@ -20,12 +20,6 @@ import { RadioGroup, Radio, Dialog, NoticeBar } from 'vant'
export default {
data() {
return {
// 投保人还是被保险人信息
signVal: '',
// 被保险人签名信息
insuredSign: {},
// 投保人签名信息
appntSign: {},
radio: '',
// 倒计时时间
number: '',
@@ -38,19 +32,8 @@ export default {
Time: true,
// 按钮是否可以点击
isDisable: true,
// sign加密码
base64: '',
// 是否可以点击
isDisabledComplite: true,
// local带来的被保险人信息
saleInsuredPersonInfo: {},
// local带来的投保人信息
saleInsuredInfo: {},
// 是否从详情跳过来 如果为1 是
detailJump: '',
pdfUrl: '',
src: location.origin + '/pdfjs/web/viewer.html?file=',
tipsPolicyUrl: ''
src: location.origin + '/pdfjs/web/viewer.html?file='
}
},
components: {
@@ -60,11 +43,25 @@ export default {
[NoticeBar.name]: NoticeBar
},
mounted() {},
async created() {},
created() {
this.timeOut()
},
methods: {
timeOut() {},
// 获取签名状态
getOrderDetail() {},
timeOut() {
let time = this.time
this.Time = false
this.number = `${time}`
let timer = setInterval(() => {
time--
if (time <= 0) {
time = 0
clearInterval(timer)
this.Time = true
this.isOver = true
}
this.number = `${time}`
}, 1000)
},
// 点击阅读时
click() {
if (this.isOver == false) {
@@ -77,21 +74,38 @@ export default {
})
}
},
// 点击签名
sign() {},
toAirSign() {},
// 下一步
goNext() {}
goNext() {
let path = '/preserve/ContactConfirmation?read=true'
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#' + path
},
routerInfo: {
path: path
}
})
}
},
computed: {},
watch: {}
computed: {
listenChange() {
const { isOver, radio } = this
return { isOver, radio }
}
},
watch: {
listenChange(val) {
if (val.isOver == true && val.radio !== '') {
this.isDisable = false
} else {
this.isDisable = true
}
}
}
}
</script>
<style lang="scss" scoped>
img {
width: 100%;
height: 100%;
}
.notice {
width: 100%;
position: fixed;
@@ -100,6 +114,6 @@ img {
}
.iframe {
width: 100vw;
height: 70vh;
height: 75vh;
}
</style>

View File

@@ -1,10 +1,10 @@
<!--联系方式变更-保全代办确认页-->
<template>
<div class="basic-confirmation-container pb45">
<div style="border-bottom: 1px solid #ebedf0;" class="fs14 pl10 pv12 bg-white">
<div style="border-bottom: 1px solid #ebedf0;" class="fs14 pl10 pr10 pv12 bg-white">
<p>
<span>尊敬的</span>
<span class="red">{{ basicInfo.customerName }}</span>
<span class="red">{{ customerInfo.customerName }}</span>
先生/女士, 您好!
</p>
<p class="mt10">
@@ -15,41 +15,48 @@
</div>
<!-- 基本信息 -->
<van-cell-group class="mt10">
<p style="border-bottom: 1px solid #ebedf0;" class="fs15 fwb pl10 pv12">基本信息</p>
<van-field label="姓名" required :value="basicInfo.customerName" readonly />
<p style="border-bottom: 1px solid #ebedf0;" class="fs15 fwb pl10 pr10 pv12">基本信息</p>
<van-field label="姓名" required :value="customerInfo.customerName" readonly />
<van-field label="移动电话" required name="移动电话" readonly>
<div slot="input" :class="{ red: changedInfo.customerMobile }">{{ basicInfo.customerMobile || changedInfo.customerMobile }}</div>
<div slot="input" :class="{ red: changeInfo.customerMobile }">{{ customerInfo.customerMobile }}</div>
</van-field>
<van-field readonly required label="联系地址">
<div slot="input" :class="{ red: changedInfo.homeProvince || changedInfo.homeCity || changedInfo.homeArea }">{{ homeName }}</div>
<div slot="input">
<span :class="{ red: changeInfo.province }">{{ province }}</span>
-
<span :class="{ red: changeInfo.city }">{{ city }}</span>
-
<span :class="{ red: changeInfo.area }">{{ area }}</span>
</div>
</van-field>
<van-field label readonly>
<div slot="input" :class="{ red: changedInfo.homeAddress }">{{ basicInfo.homeAddress || changedInfo.homeAddress }}</div>
<div slot="input" :class="{ red: changeInfo.address }">{{ customerInfo.address }}</div>
</van-field>
<van-field label="邮编" required readonly>
<div slot="input" :class="{ red: changedInfo.homeZip }">{{ basicInfo.homeZip || changedInfo.homeZip }}</div>
<div slot="input" :class="{ red: changeInfo.homeZip }">{{ customerInfo.homeZip }}</div>
</van-field>
<van-field label="电子邮箱" name="电子邮箱" readonly>
<div slot="input" :class="{ red: changedInfo.customerEmail }">{{ basicInfo.customerEmail || changedInfo.customerEmail }}</div>
<div slot="input" :class="{ red: changeInfo.customerEmail }">{{ customerInfo.customerEmail }}</div>
</van-field>
<van-field label="固定电话" readonly>
<div slot="input" :class="{ red: changedInfo.homePhone }">{{ basicInfo.homePhone || changedInfo.homePhone }}</div>
<div slot="input" :class="{ red: changeInfo.homePhone }">{{ customerInfo.homePhone }}</div>
</van-field>
</van-cell-group>
<!-- 短信验证 -->
<!-- cancelButtonColor="#4FC6B3" -->
<van-dialog
v-model="show"
title="短信确认"
show-cancel-button
cancelButtonColor="#4FC6B3"
class="dialog-delete"
cancelButtonColor="#4FC6B3"
confirmButtonColor="#FFFFFF"
@confirm="authConfirm(authCode)"
@cancel="clearTimer"
>
<p class="p10 fs14">向此手机发送验证码确认用户身份</p>
<p class="p10 fs14" style="border-bottom: 1px solid #ebedf0;">{{ customerMobile }}</p>
<p class="p10 fs14" style="border-bottom: 1px solid #ebedf0;">{{ customerInfoOld.customerMobile | Mask }}</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">
@@ -62,24 +69,11 @@
<van-cell-group class="fs14 mt10 pl15 pr15 pb20">
<p class="pt20 pb20">以下内容需要您阅读确认:</p>
<p>需阅读</p>
<p class="mb10 mt10">
<span class="red">国富人寿人身保险联系方式变更协议</span>
</p>
<p class="mb10 mt10"><span class="red">国富人寿人身保险联系方式变更协议</span></p>
<p class="start">点击开始按钮进行相关操作</p>
</van-cell-group>
<!-- <van-button class="gray" v-if="isInvalid" size="large" disabled>链接已失效</van-button> -->
<!-- <van-button class="gray" v-else-if="isCanceled" size="large" disabled>代理人已撤销</van-button> -->
<!-- <van-button class="gray" v-else-if="submitForbidden" size="large" disabled>提交申请失败</van-button> -->
<van-button
:type="submitForbidden ? '' : 'danger'"
:color="submitForbidden ? 'gray' : ''"
:disabled="submitForbidden"
size="large"
@click="submit"
v-no-more-click="2000"
>
开始
</van-button>
<van-button v-if="read" type="danger" size="large" @click="showAuth" v-no-more-click="2000">提交申请</van-button>
<van-button v-if="!read" type="danger" size="large" @click="nextStep" v-no-more-click="2000">开始</van-button>
</div>
</div>
</template>
@@ -87,8 +81,8 @@
<script>
import { Field, CellGroup, Checkbox, Popup, Picker, Area, RadioGroup, Radio, Dialog } from 'vant'
import getAreaName from '@/assets/js/utils/get-area-name'
import { customerInfoShare, authCode, changeStatus } from '@/api/ebiz/preserve/preserve'
import { checkSignInvalid } from '@/api/ebiz/sale/sale'
import { authCode, changeStatus } from '@/api/ebiz/preserve/preserve'
export default {
name: 'basicConfirmation',
components: {
@@ -100,7 +94,16 @@ export default {
[Area.name]: Area,
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio,
[Dialog.name]: name
[Dialog.name]: name,
},
filters: {
Mask: function (value) {
if (value) {
return value.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
} else {
return ''
}
},
},
data() {
return {
@@ -112,140 +115,54 @@ export default {
areaName: '',
homeName: '',
sessionId: '',
basicInfo: {
customerName: '',
customerSex: '',
customerBirthday: '',
idType: '1',
idNo: '',
isEndDate: '', // 证件截止日期
isLongId: '', // 长期
customerMobile: '', // 移动电话
customerEmail: '', // 电子邮箱
customerNo: '',
companyAddress: '', // 单位详细地址
companyProvince: '',
companyCity: '',
companyArea: '',
companyZip: '',
companyPhone: '',
homeAddress: '', // 家庭详细地址
homeProvince: '',
homeCity: '',
homeArea: '',
homeZip: '',
homePhone: '',
nationality: '', //国籍
jobname: '', //职业类别
jobcode: '', //职业编码
addressStatus: '0', // 设为联系地址
address: '', // 联系详细地址
province: '',
city: '',
area: '',
zipCode: '',
telephone: ''
},
changedInfo: {},
customerInfo: {},
customerInfoOld: {},
changeInfo: {},
signInvalid: '',
isCanceled: false, //代理人是否已撤销
isInvalid: false, //链接是否已失效
submitForbidden: false, //是否提交申请失败
customerMobile: ''
customerMobile: '',
submitForbidden: false,
read: false,
}
},
async created() {
this.$route.query.customerInfo && (localStorage.customerInfo = decodeURI(this.$route.query.customerInfo))
this.customerMobile = JSON.parse(localStorage.customerInfo).customerMobile
this.$route.query.token && (localStorage.token = this.$route.query.token)
if (this.$route.query.signInvalid) {
localStorage.signInvalid = this.$route.query.signInvalid
this.signInvalid = this.$route.query.signInvalid
}
let res = await this.checkSignInvalid(this.signInvalid)
if (res == '1') {
this.isInvalid = false //未失效
} else {
this.isInvalid = true //已失效
}
this.$toast.loading({
// 持续展示 toast
duration: 0,
// 禁用背景点击
forbidClick: true,
loadingType: 'spinner',
message: '加载中……'
})
customerInfoShare({
surrenderType: '1', //"1","基本信息变更" "2","续期账号变更" "3","红利领取"
customerInfoDTOList: [],
mediaDTOList: [],
surrenderId: JSON.parse(localStorage.customerInfo).surrenderId
}).then(res => {
this.$toast.clear()
if (res.result == 0) {
// 0 是变更的 1是未变更的
let resList = res.content.customerResDtos
//代理人是否已撤销
if (!this.isInvalid && resList[0].surrenderStatus == '5') {
this.isCanceled = true
} else if (
!this.isInvalid &&
(resList[0].surrenderStatus == '7' || resList[0].surrenderStatus == '3' || resList[0].surrenderStatus == '6' || resList[0].surrenderStatus == '9')
) {
this.submitForbidden = true
}
for (var key in resList[0]) {
if (key == 'addressStatus') {
this.basicInfo.addressStatus = resList[0].isNewInfo == '0' ? resList[0][key] : resList[1][key]
} else {
if ((resList[0][key] && resList[0][key] == resList[1][key]) || resList[0][key] == resList[1][key]) {
this.basicInfo[key] = resList[0][key]
} else if ((resList[0][key] || resList[1][key]) && resList[0][key] != resList[1][key]) {
this.changedInfo[key] = resList[0].isNewInfo == '0' ? resList[0][key] : resList[1][key]
}
}
}
//设为联系地址取值
// if (this.basicInfo.address && this.basicInfo.companyAddress) {
// this.basicInfo.addressStatus = this.basicInfo.address == this.basicInfo.companyAddress ? '0' : '1'
// } else if (this.changedInfo.address && this.changedInfo.companyAddress) {
// this.basicInfo.addressStatus = this.changedInfo.address == this.changedInfo.companyAddress ? '0' : '1'
// }
//单位地址, 家庭地址
if (resList[0].companyProvince && resList[0].companyCity && resList[0].companyArea) {
this.areaName = getAreaName([
{ code: this.basicInfo.companyProvince || this.changedInfo.companyProvince },
{ code: this.basicInfo.companyCity || this.changedInfo.companyCity },
{ code: this.basicInfo.companyArea || this.changedInfo.companyArea }
])
}
if (resList[0].homeProvince && resList[0].homeCity && resList[0].homeArea) {
this.homeName = getAreaName([
{ code: this.basicInfo.homeProvince || this.changedInfo.homeProvince },
{ code: this.basicInfo.homeCity || this.changedInfo.homeCity },
{ code: this.basicInfo.homeArea || this.changedInfo.homeArea }
])
}
//长期判断
if (this.basicInfo.idEndDate && this.basicInfo.idEndDate == '9999-01-01') {
this.basicInfo.idEndDate = ''
this.basicInfo.isLongId = true
}
// this.customerMobile = this.basicInfo.customerMobile || this.changedInfo.customerMobile
console.log(this.changedInfo)
} else {
this.$toast(res.resultMessage)
}
})
this.read = this.$route.query.read
await this.init()
},
methods: {
// 提交申请
submit() {
// 初始化数据
init() {
// 初始化内容
this.customerInfo = JSON.parse(localStorage['preserve-customerInfo'])
this.customerInfoOld = JSON.parse(localStorage['preserve-customerInfo-old'])
// 判断 内容是否变化
let keys = Object.keys(this.customerInfo)
for (let item of keys) {
this.changeInfo[item] = this.customerInfo[item] != this.customerInfoOld[item]
}
//地址特殊处理
if (this.customerInfo.province && this.customerInfo.city && this.customerInfo.area) {
let tempHomeAdress = getAreaName([{ code: this.customerInfo.province }, { code: this.customerInfo.city }, { code: this.customerInfo.area }]).split('-')
this.province = tempHomeAdress[0]
this.city = tempHomeAdress[1]
this.area = tempHomeAdress[2]
}
},
// 显示验证码 van-dialog
showAuth() {
this.show = true
},
nextStep() {
let path = '/preserve/contacAgreement'
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#' + path,
},
routerInfo: {
path: path,
},
})
},
// 获取短信验证码
getAuthCode() {
this.codeDisabled = true
@@ -265,9 +182,8 @@ export default {
validateCode: '',
operateCode: this.customerMobile,
system: '',
operateCodeType: '0'
}).then(res => {
console.log(res)
operateCodeType: '0',
}).then((res) => {
if (res.result == 0) {
this.sessionId = res.sessionId
} else {
@@ -279,16 +195,17 @@ export default {
async authConfirm() {
//清理计时器
this.clearTimer()
this.$dialog
.alert({
title: '提示',
className: 'dialog-alert',
message: '您所有保单的相应信息均将变更',
confirmButtonColor: '#FFFFFF'
})
.then(() => {
this.changeSubmit()
})
// this.$dialog
// .alert({
// title: '提示',
// className: 'dialog-alert',
// message: '您所有保单的相应信息均将变更',
// confirmButtonColor: '#FFFFFF',
// })
// .then(() => {
// this.changeSubmit()
// })
this.changeSubmit()
},
// 清理计时器
clearTimer() {
@@ -297,60 +214,36 @@ export default {
this.countDown = 60
this.codeDisabled = false
},
// 在微信中校验token是否失效
async checkSignInvalid(signInvalid) {
let that = this
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
let data = {
sign: signInvalid
}
return new Promise((resolve, reject) => {
checkSignInvalid(data).then(res => {
if (res.result == '0') {
that.$toast.clear()
let status = res.content.status
resolve(status)
} else {
reject()
}
})
})
},
//提交变更申请
async changeSubmit() {
let res = await changeStatus({
surrenderId: JSON.parse(localStorage.customerInfo).surrenderId,
surrenderStatus: '3',
smsCodeDTO: {
smsId: this.sessionId,
code: this.authCode
}
// let res = await changeStatus({
// // surrenderId: JSON.parse(localStorage.customerInfo).surrenderId,
// surrenderStatus: '3',
// smsCodeDTO: {
// smsId: this.sessionId,
// code: this.authCode
// }
// })
// if (res.result == 0) {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/preserve/submitResult`,
backToFirst: '1',
},
routerInfo: {
path: `/preserve/submitResult`,
},
})
if (res.result == 0) {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/preserve/submitResult`,
backToFirst: '1'
},
routerInfo: {
path: `/preserve/submitResult`
}
})
} else {
this.$toast(res.resultMessage)
}
}
// } else {
// this.$toast(res.resultMessage)
// }
},
},
beforeDestroy() {
//清理计时器
this.clearTimer()
}
},
}
</script>

View File

@@ -80,14 +80,14 @@ export default {
customerName: '客户姓名',
idType: '证件类型',
idNo: '证件号码',
customerMobile: '客户手机号',
customerEmail: '客户邮箱',
province: '',
city: '',
area: '',
customerMobile: '13702012402',
customerEmail: '',
province: '110000',
city: '110100',
area: '110101',
address: '详细地址',
homeZip: '邮编',
homePhone: '固定电话',
homeZip: '489456',
homePhone: '',
isNewInfo: '是否变更后信息'
}
feachData.surrenderDTOList[0].customerInfoDTOList.push(customerInfo)
@@ -109,8 +109,8 @@ export default {
confirmButtonColor: '#FFFFFF'
})
.then(() => {
if (localStorage.customerInfo) {
this.customerInfo = JSON.parse(localStorage.customerInfo)
if (localStorage['preserve-customerInfo']) {
this.customerInfo = JSON.parse(localStorage['preserve-customerInfo'])
}
//地址
if (this.customerInfo.province && this.customerInfo.city && this.customerInfo.area) {
@@ -131,22 +131,24 @@ export default {
this.$validator.validate().then(valid => {
if (true == valid) {
edorChange(this.feachData)
.then( res => {
if (res.result == 0) {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/preserve/HandleResult'
},
routerInfo: '/preserve/HandleResult'
})
} else {
this.$toast(res.resultMessage)
}
})
.catch( err => {
console.log(err);
})
.then(res => {
if (res.result == 0) {
localStorage['preserve-customerInfo-old'] = localStorage['preserve-customerInfo']
localStorage['preserve-customerInfo'] = JSON.stringify(this.customerInfo)
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/preserve/HandleResult'
},
routerInfo: '/preserve/HandleResult'
})
} else {
this.$toast(res.resultMessage)
}
})
.catch(err => {
console.log(err)
})
} else {
this.$toast(this.$validator.errors.all()[0])
return

View File

@@ -1,28 +1,18 @@
<!--操作结果页面-->
<template>
<div class="handle-result-container">
<div class="payResult-header flex justify-content-c align-items-c p20 pt80">
<img class="w60 h60 mt100" :src="srcSuccess" alt="" />
</div>
<div class="payResult-header flex justify-content-c align-items-c p20 pt80"><img class="w60 h60 mt100" :src="srcSuccess" alt="" /></div>
<div class="flex flex-direction-colunm text-center">
<p class="mt15 mb20">已提交,待客户确认</p>
<!-- <p class="gray fs14" v-if="surrenderType == '3'"><span style="color:red !important">累计红利申请已提交</span>, 请微信分享给客户确认</p> -->
<!-- <p class="gray fs14" v-else><span style="color:red !important">修改完成</span>, 请微信分享给客户确认</p> -->
<p class="gray fs14">修改完成请让客户确认</p>
<p class="gray fs14">如客户当天24:00前未确认提交本次操作将自动取消</p>
</div>
<div class="bg-white bottom-btn">
<!-- <van-button type="danger" size="large" @click="share" v-no-more-click="2000">分享至客户确认</van-button> -->
<van-button type="danger" size="large" @click="toFace" v-no-more-click="2000">客户确认</van-button>
</div>
<div class="bg-white bottom-btn"><van-button type="danger" size="large" @click="nextStep" v-no-more-click="2000">客户确认</van-button></div>
</div>
</template>
<script>
// import { customerInfo } from '@/api/ebiz/preserve/preserve';
// import { getSignInvalid } from '@/api/ebiz/sale/sale'
// import { changeStatus } from '@/api/ebiz/preserve/preserve'
export default {
name: 'handleResult',
data() {
@@ -30,116 +20,68 @@ export default {
srcSuccess: this.$assetsUrl + 'images/success.png',
entry: '',
signInvalid: '',
surrenderType: ''
surrenderType: '',
customerInfo: {}
}
},
created() {
this.entry = JSON.parse(localStorage.customerInfo).entry
this.entry = this.$route.query.entry
if (localStorage['preserve-customerInfo']) {
this.customerInfo = JSON.parse(localStorage['preserve-customerInfo'])
}
// 此处处理 this.path
switch (this.entry) {
case 'basic':
this.surrenderType = '1'
this.path = '1'
break
case 'renewal':
this.surrenderType = '2'
this.path = '2'
break
case 'bonus':
this.surrenderType = '3'
this.path = '3'
break
default:
this.path = ''
break
}
},
mounted() {
document.body.style.backgroundColor = '#fff'
// window.appCallBack = this.appCallBack //app回调
// document.body.style.backgroundColor = '#fff'
},
methods: {
// 分享至客户确认
// async share() {
// localStorage.removeItem('customerSign')
// let url = ''
// let content = ''
// //根据入口判断分享出去的是什么
// let res = await this.getSignInvalid()
// if (res == 'success') {
// console.log(url)
// switch (this.entry) {
// case 'basic':
// url =
// '/#/preserve/basicConfirmation?customerInfo=' +
// encodeURI(localStorage.customerInfo) +
// '&token=' +
// localStorage.token +
// '&signInvalid=' +
// this.signInvalid
// content = '您的基本信息有变更, 点击查看详情'
// break
// case 'renewal':
// url =
// '/#/preserve/renewalConfirmation?customerInfo=' +
// encodeURI(localStorage.customerInfo) +
// '&token=' +
// localStorage.token +
// '&signInvalid=' +
// this.signInvalid
// content = '您的续期账号有变更, 点击查看详情'
nextStep() {
if (this.customerInfo.idType != '1') {
// 如果证件类型不是身份证
// 直接跳过人脸识别
// break
// case 'bonus':
// url =
// '/#/preserve/bonusConfirmation?customerInfo=' +
// encodeURI(localStorage.customerInfo) +
// '&token=' +
// localStorage.token +
// '&signInvalid=' +
// this.signInvalid
// content = '您有累计红利领取申请带确认, 点击查看详情'
// break
// }
// // eslint-disable-next-line no-undef
// EWebBridge.webCallAppInJs('bridge', {
// flag: 'share',
// extra: {
// title: `鼎诚人寿保全申请信息确认`,
// content,
// url: location.origin + url,
// img: this.$assetsUrl + 'images/logo.png'
// }
// })
// }
// },
// 获取微信中token是否失效标识码
// async getSignInvalid() {
// this.$toast.loading({
// duration: 0, // 持续展示 toast
// forbidClick: true, // 禁用背景点击
// loadingType: 'spinner',
// message: '加载中……'
// })
// let data = {}
// let res = await getSignInvalid(data)
// if (res.result == '0') {
// this.$toast.clear()
// this.signInvalid = res.content.sign
// return Promise.resolve('success')
// }
// },
//分享给好友时变更分享状态
// appCallBack(data) {
// if (data.type == '0' && data.trigger == 'weixin_share') {
// changeStatus({
// surrenderId: JSON.parse(localStorage.customerInfo).surrenderId,
// surrenderStatus: '2'
// }).then(res => {
// if (res.result != '0') {
// this.$toast(res.resultMessage)
// }
// })
// }
// }
this.jumpNextPage(this.path)
} else if (this.entry != 'beneficiary') {
// 如果 保全项不是 受益人变更、则 在证件类型为身份证时 直接接入人脸识别
this.face()
} else if (this.entry == 'beneficiary') {
// 如果 保全项是 受益人变更、则进行特殊判断
// 若被保险人≥18周岁人脸识别录入被保人本人
// 若被保险人18周岁被保险人与投保人为子女关系人脸识别录入未成年人父亲或母亲
// toDo
}
},
jumpNextPage(path) {
path = '/preserve/ContactConfirmation'
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#' + path
},
routerInfo: {
path: path
}
})
},
toFace() {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('face_auth', {
number: this.saleInsuredInfo.idNo, //身份证号码
name: this.saleInsuredInfo.name //姓名
number: this.customerInfo.idNo, //身份证号码
name: this.customerInfo.name //姓名
// })
// 跳过人脸识别
// new Promise(resolve => {
@@ -148,23 +90,18 @@ export default {
}).then(data => {
if (JSON.parse(data).state == '1') {
if (this.appntSign.readStatus == '0') {
console.log('zzzzzzzzzzz返回识别成功zzzzzzzzzzz')
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/insuranceInformation'
},
routerInfo: {
path: '/sale/insuranceInformation'
}
})
this.jumpNextPage(this.path)
}
} else {
// EWebBridge.webCallAppInJs('webview_toast', '人脸检测失败')
EWebBridge.webCallAppInJs('webview_toast', '人脸检测失败')
}
})
}
}
// beforeRouteLeave(to, from, next) {
// // document.body.style.backgroundColor = ''
// next()
// }
}
</script>