'防范视频展示'

This commit is contained in:
proudlx
2021-04-27 16:50:04 +08:00
parent 28ddb6bc7e
commit 8c6de4c35b

View File

@@ -219,12 +219,18 @@
</div>
<van-popup v-model="videoShow" position="bottom" style="height: 100vh; background: #666">
<!-- <video controls style="width: 100%; max-height: calc(100vh - 60px)" src="/app/video/rlsb.mp4"></video> -->
<div class="" v-if="videoShow" style="height: calc(100vh - 60px); display: flex; align-items: center;flex-flow: column;justify-content: center;">
<van-notice-bar :scrollable="false" class="notice" style="width:100%;">为维护您的合法权益请您务必观看防范销售误导视频</van-notice-bar>
<video controls style="width: 100%; max-height: calc(100vh - 60px)" :src="this.$assetsUrl + 'video/rlsb.mp4'" autoplay></video>
<div class="" v-if="videoShow" style="height: calc(100vh - 60px); display: flex; align-items: center; flex-flow: column; justify-content: center">
<van-notice-bar :scrollable="false" class="notice" style="width: 100%">为维护您的合法权益请您务必观看防范销售误导视频</van-notice-bar>
<video
controls
style="width: 100%; max-height: calc(100vh - 60px)"
:src="this.$assetsUrl + 'video/rlsb.mp4'"
ref="vid"
@timeupdate="timeupdate"
></video>
</div>
<div class="bottom-btn bg-white">
<van-button type="danger" size="large" @click="isVideoUrlClick()" v-no-more-click="1000">下一步</van-button>
<van-button type="danger" :disabled="isVideoNext" size="large" @click="isVideoUrlClick()" v-no-more-click="1000">下一步</van-button>
</div>
</van-popup>
<!-- 短信验证 -->
@@ -259,7 +265,7 @@ import {
autchCodeCheck,
getRecognitionUrl,
getRecognitionResult,
saveCustomerRid,
saveCustomerRid
} from '@/api/ebiz/sale/sale'
import { getAgentInfo } from '@/api/ebiz/my/my.js'
import { checkPhone } from '@/api/ebiz/customer/customer'
@@ -273,6 +279,7 @@ export default {
let isWeixin = this.$utils.device().isWeixin //判断环境
return {
isVideo: false, //是否已阅读视频
isVideoNext: true,
videoShow: false, //防误导视频
show: false, // 获取短信验证码
codeDisabled: false, // 获取验证码按钮是否禁用
@@ -283,12 +290,12 @@ export default {
operaFlag: null,
encyCustomerMobile: null,
sid: null,
isVideoUrl:'',
isVideoUrl: '',
//人脸识别认证次数
faceAuthCount: {
appnt: 0,
insured: 0,
weixin: 0,
weixin: 0
},
customerMobile: '',
//保险产品名称
@@ -337,7 +344,7 @@ export default {
realName: '',
idno: '',
redirectUrl: '',
businessSource: '1', //微信端人脸识别业务来源:1-电投2-入司3-理赔4-保全
businessSource: '1' //微信端人脸识别业务来源:1-电投2-入司3-理赔4-保全
},
// idcardData: {
// typeface: false,
@@ -352,11 +359,17 @@ export default {
recognizeMessage: '', //微信端-人脸识别失败原因
realPeopleRidInfo: {
appntRidFlag: null,
insureRidFlag: null,
},
insureRidFlag: null
}
}
},
methods: {
timeupdate() {
console.log(this.$refs['vid'].paused)
if (!this.$refs['vid'].paused) {
this.isVideoNext = false
}
},
fakeFaceAuth(expect) {
console.log('模拟调用人脸识别')
return new Promise(function (resolve, reject) {
@@ -377,8 +390,8 @@ export default {
flag: 'navigation',
extra: {
title: '签名确认',
hiddenRight: '1',
},
hiddenRight: '1'
}
})
return (this.videoShow = false)
}
@@ -388,7 +401,7 @@ export default {
title: '提示',
message: '退出流程可能会丢失部分数据,是否确认退出?',
cancelButtonColor: '#E9332E',
confirmButtonColor: '#FFFFFF',
confirmButtonColor: '#FFFFFF'
})
.then(() => {
this.$jump({
@@ -396,12 +409,12 @@ export default {
extra: {
title: '电子投保单列表',
forbidSwipeBack: 1, //当前页面禁止右滑返回
url: location.origin + `/#/sale/list`,
url: location.origin + `/#/sale/list`
},
routerInfo: {
path: `/sale/list`,
type: '1',
},
type: '1'
}
})
})
.catch(() => {
@@ -409,9 +422,10 @@ export default {
})
}
},
isVideoUrlClick(){
isVideoUrlClick() {
console.log(this.isVideoUrl)
this.isVideoUrl == 'goUrl' ? this.goUrl():this.insuredUrl()
this.isVideoNext = !this.isVideoNext
this.isVideoUrl == 'goUrl' ? this.goUrl() : this.insuredUrl()
},
// 初始化
async init() {
@@ -484,7 +498,7 @@ export default {
weixinShare({
title: '国富人寿计划书',
imgUrl: 'http://47.96.143.111:8000/app/images/logo.png',
desc: '国富为您量身定制的保险产品,请查收',
desc: '国富为您量身定制的保险产品,请查收'
})
// let params = {
// orderNo: ''
@@ -508,7 +522,7 @@ export default {
// 禁用背景点击s
forbidClick: true,
loadingType: 'spinner',
message: '加载中……',
message: '加载中……'
})
let data = {}
this.authCode = null
@@ -518,7 +532,7 @@ export default {
name: appntData.name,
idType: appntData.idType,
idNo: appntData.idNo,
mobile: appntData.mobile,
mobile: appntData.mobile
}
this.customerMobile = appntData.mobile
this.encyCustomerMobile = this.customerMobile.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2')
@@ -528,7 +542,7 @@ export default {
name: insuredData.name,
idType: insuredData.idType,
idNo: insuredData.idNo,
mobile: insuredData.mobile,
mobile: insuredData.mobile
}
this.customerMobile = insuredData.mobile
this.encyCustomerMobile = this.customerMobile.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2')
@@ -543,7 +557,7 @@ export default {
Dialog.confirm({
title: '提示',
message: '抱歉,您预留的手机号非您本人的手机号,请进行线下投保!',
showCancelButton: false,
showCancelButton: false
})
}
})
@@ -557,7 +571,7 @@ export default {
// 禁用背景点击s
forbidClick: true,
loadingType: 'spinner',
message: '加载中……',
message: '加载中……'
})
let data = {}
if ('appnt' == type) {
@@ -566,7 +580,7 @@ export default {
name: appntData.name,
idType: appntData.idType,
idNo: appntData.idNo,
mobile: appntData.mobile,
mobile: appntData.mobile
}
} else if ('insured' == type) {
let insuredData = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo'))
@@ -574,7 +588,7 @@ export default {
name: insuredData.name,
idType: insuredData.idType,
idNo: insuredData.idNo,
mobile: insuredData.mobile,
mobile: insuredData.mobile
}
}
let res = await checkPhone(data)
@@ -603,7 +617,7 @@ export default {
type: 'H5',
operateCode: this.customerMobile,
system: 'agentApp',
operateCodeType: '0',
operateCodeType: '0'
}).then((res) => {
console.log(res)
if (res.result == 0) {
@@ -629,7 +643,7 @@ export default {
}
let res = await autchCodeCheck({
smsId: this.sid,
code: this.authCode,
code: this.authCode
})
if (res.result == 0) {
if ('appnt' == this.operaFlag) {
@@ -650,6 +664,26 @@ export default {
// 人脸识别
async start_ocr(val) {
// val 0投保人 1被保险人 2本人
// return this.$dialog
// .alert({
// className: 'dialog-alert',
// title: '提示',
// message: '为维护您的合法权益,请您务必认真观看防范销售误导视频。',
// confirmButtonColor: '#ee0a24',
// confirmButtonText: '确认'
// })
// .then(() => {
// this.$jump({
// flag: 'navigation',
// extra: {
// title: '防范销售误导',
// hiddenRight: '1'
// }
// })
// this.videoShow = true
// this.isVideo = true
// this.isVideoUrl = 'goUrl'
// })
console.log('人脸识别')
console.log(val)
let that = this
@@ -665,7 +699,7 @@ export default {
const res = await getWhitelist({
idNo: this.saleInsuredInfo.idNo,
name: this.saleInsuredInfo.name,
whiteType: 'sale_face_show',
whiteType: 'sale_face_show'
})
if (res.result === '0') {
// 在白名单内
@@ -709,7 +743,7 @@ export default {
const res = await getWhitelist({
idNo: this.saleInsuredPersonInfo.idNo,
name: this.saleInsuredPersonInfo.name,
whiteType: 'sale_face_show',
whiteType: 'sale_face_show'
})
if (res.result === '0') {
// 用户在白名单内
@@ -761,7 +795,7 @@ export default {
const res = await getWhitelist({
idNo: this.saleInsuredInfo.idNo,
name: this.saleInsuredInfo.name,
whiteType: 'sale_face_show',
whiteType: 'sale_face_show'
})
if (res.result === '0') {
// 在白名单内
@@ -778,7 +812,7 @@ export default {
const authRes = await EWebBridge.webCallAppInJs('face_auth', {
businessSource: '1', //业务来源:1-电投2-入司3-理赔4-保全
number: that.saleInsuredInfo.idNo, //身份证号码
name: that.saleInsuredInfo.name, //姓名
name: that.saleInsuredInfo.name //姓名
}).then((data) => {
if (JSON.parse(data).state == '1') {
// 保存rid 数据
@@ -841,7 +875,7 @@ export default {
const res = await getWhitelist({
idNo: this.saleInsuredPersonInfo.idNo,
name: this.saleInsuredPersonInfo.name,
whiteType: 'sale_face_show',
whiteType: 'sale_face_show'
})
console.log('白名单查询结果: ', res)
if (res.result === '0') {
@@ -860,7 +894,7 @@ export default {
const authRes = await EWebBridge.webCallAppInJs('face_auth', {
businessSource: '1', //业务来源:1-电投2-入司3-理赔4-保全
number: that.saleInsuredPersonInfo.idNo, //身份证号码
name: that.saleInsuredPersonInfo.name, //姓名
name: that.saleInsuredPersonInfo.name //姓名
}).then((data) => {
if (JSON.parse(data).state == '1') {
// 保存rid 数据
@@ -918,21 +952,31 @@ export default {
// 禁用背景点击s
forbidClick: true,
loadingType: 'spinner',
message: '获取信息中……',
message: '获取信息中……'
})
getAgentInfo({}).then((res) => {
console.log(res)
if ((res.branchType == 'N1' || res.branchType == '1') && !this.isVideo) {
this.$jump({
flag: 'navigation',
extra: {
title: '防范销售误导',
hiddenRight: '1',
},
})
this.videoShow = true
this.isVideo = true
this.isVideoUrl = 'goUrl'
this.$dialog
.alert({
className: 'dialog-alert',
title: '提示',
message: '为维护您的合法权益,请您务必认真观看防范销售误导视频。',
confirmButtonColor: '#ee0a24',
confirmButtonText: '确认'
})
.then(() => {
this.$jump({
flag: 'navigation',
extra: {
title: '防范销售误导',
hiddenRight: '1'
}
})
this.videoShow = true
this.isVideo = true
this.isVideoUrl = 'goUrl'
})
} else {
let that = this
let path = ''
@@ -979,11 +1023,11 @@ export default {
that.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/' + path,
url: location.origin + '/#/sale/' + path
},
routerInfo: {
path: '/sale/' + path,
},
path: '/sale/' + path
}
})
}
})
@@ -995,23 +1039,33 @@ export default {
// 禁用背景点击s
forbidClick: true,
loadingType: 'spinner',
message: '获取信息中……',
message: '获取信息中……'
})
getAgentInfo({}).then((res) => {
console.log('是否进入下一页')
console.log(res)
console.log(this.isVideo)
if ((res.branchType == 'N1' || res.branchType == '1') && !this.isVideo) {
this.$jump({
flag: 'navigation',
extra: {
title: '防范销售误导',
hiddenRight: '1',
},
})
this.videoShow = true
this.isVideo = true
this.isVideoUrl = 'insuredUrl'
this.$dialog
.alert({
className: 'dialog-alert',
title: '提示',
message: '为维护您的合法权益,请您务必认真观看防范销售误导视频。',
confirmButtonColor: '#ee0a24',
confirmButtonText: '确认'
})
.then(() => {
this.$jump({
flag: 'navigation',
extra: {
title: '防范销售误导',
hiddenRight: '1'
}
})
this.videoShow = true
this.isVideo = true
this.isVideoUrl = 'insuredUrl'
})
} else {
let that = this
let path = ''
@@ -1023,11 +1077,11 @@ export default {
that.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/' + path,
url: location.origin + '/#/sale/' + path
},
routerInfo: {
path: '/sale/' + path,
},
path: '/sale/' + path
}
})
}
})
@@ -1083,8 +1137,8 @@ export default {
'&productCode=' +
localStorage.productCode +
'&changeCard=0',
img: this.$assetsUrl + 'images/logo.png',
},
img: this.$assetsUrl + 'images/logo.png'
}
})
} else {
// eslint-disable-next-line no-undef
@@ -1107,8 +1161,8 @@ export default {
this.signInvalid +
'&productCode=' +
localStorage.productCode,
img: this.$assetsUrl + 'images/logo.png',
},
img: this.$assetsUrl + 'images/logo.png'
}
})
}
},
@@ -1122,16 +1176,16 @@ export default {
loadingType: 'spinner',
message: '加载中……',
message: '加载中……'
})
let data = {
platform: 'app',
type: '1',
orderDTO: {
orderInfoDTO: {
orderNo: window.localStorage.getItem('orderNo'),
},
},
orderNo: window.localStorage.getItem('orderNo')
}
}
}
// /insure/selfToHuman
underWrite(data).then((res) => {
@@ -1145,11 +1199,11 @@ export default {
that.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/payMent',
url: location.origin + '/#/sale/payMent'
},
routerInfo: {
path: '/sale/payMent',
},
path: '/sale/payMent'
}
})
} else if (res.uwResult == '07') {
// 核保失败
@@ -1159,11 +1213,11 @@ export default {
flag: 'h5',
extra: {
url: location.origin + '/#/sale/result',
backToFirst: '1',
backToFirst: '1'
},
routerInfo: {
path: '/sale/result',
},
path: '/sale/result'
}
})
} else if (res.uwResult == '46') {
// 转人核
@@ -1173,11 +1227,11 @@ export default {
flag: 'h5',
extra: {
url: location.origin + '/#/sale/result',
backToFirst: '1',
backToFirst: '1'
},
routerInfo: {
path: '/sale/result',
},
path: '/sale/result'
}
})
} else if (res.uwResult == '47') {
// 核心系统繁忙,请稍后重试
@@ -1186,11 +1240,11 @@ export default {
flag: 'h5',
extra: {
url: location.origin + '/#/sale/result',
backToFirst: '1',
backToFirst: '1'
},
routerInfo: {
path: '/sale/result',
},
path: '/sale/result'
}
})
} else {
//其他-系统繁忙,请稍后重试
@@ -1199,11 +1253,11 @@ export default {
flag: 'h5',
extra: {
url: location.origin + '/#/sale/result',
backToFirst: '1',
backToFirst: '1'
},
routerInfo: {
path: '/sale/result',
},
path: '/sale/result'
}
})
}
} else {
@@ -1218,11 +1272,11 @@ export default {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#/sale/payMent',
url: location.origin + '/#/sale/payMent'
},
routerInfo: {
path: '/sale/payMent',
},
path: '/sale/payMent'
}
})
},
// 获取消息和阅读状态
@@ -1234,11 +1288,11 @@ export default {
// 禁用背景点击s
forbidClick: true,
loadingType: 'spinner',
message: '加载中……',
message: '加载中……'
})
let data = {
orderNo: window.localStorage.getItem('orderNo'),
getOtherType: 'RID',
getOtherType: 'RID'
}
localStorage.setItem('riskName', '')
return new Promise((resolve) => {
@@ -1287,7 +1341,7 @@ export default {
Dialog({
message: message.split('\\n').join('\n&emsp;&emsp;'),
confirmButtonText: '本人已阅读并同意上述特别约定内容',
messageAlign: 'left',
messageAlign: 'left'
})
}
// const message = '&emsp;&emsp;' + res.orderDTO.productDTO.special.content
@@ -1432,7 +1486,7 @@ export default {
loadingType: 'spinner',
message: '加载中……',
message: '加载中……'
})
let data = {}
getSignInvalid(data).then((res) => {
@@ -1451,10 +1505,10 @@ export default {
loadingType: 'spinner',
message: '加载中……',
message: '加载中……'
})
let data = {
sign: signInvalid,
sign: signInvalid
}
return new Promise((resolve) => {
checkSignInvalid(data).then((res) => {
@@ -1518,7 +1572,7 @@ export default {
realName: this.idcardData.realName,
idno: this.idcardData.idno,
redirectUrl: this.idcardData.redirectUrl,
businessSource: this.idcardData.businessSource,
businessSource: this.idcardData.businessSource
}
getRecognitionUrl(data).then(
(res) => {
@@ -1570,7 +1624,7 @@ export default {
ridType: ridType,
ridDate: Formatter.formatDate(new Date(), 'yyyy-MM-dd'),
ridPhone: this.appnt.mobile,
orderNo: this.orderInfo.orderNo,
orderNo: this.orderInfo.orderNo
}
} else if (type == 'insured_rid') {
param = {
@@ -1582,21 +1636,21 @@ export default {
ridType: ridType,
ridDate: Formatter.formatDate(new Date(), 'yyyy-MM-dd'),
ridPhone: this.insured[0].mobile,
orderNo: this.orderInfo.orderNo,
orderNo: this.orderInfo.orderNo
}
}
// 保存rid 认证结果 不阻断流程
saveCustomerRid(param).then((res) => {
console.log('saveCustomerRid', res)
})
},
}
},
created() {
setTimeout(() => {
// eslint-disable-next-line no-undef
EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
intercept: '1', //是否拦截原生返回事件 1是 其他否
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
}, 100)
window.appCallBack = this.appCallBack
@@ -1613,7 +1667,7 @@ export default {
Dialog.confirm({
title: '提示',
message: '当前投保单件需进行双录,请手动切换至双录系统,进行双录操作,完成后进行后续操作',
showCancelButton: false,
showCancelButton: false
}).then(() => {
// 获取投被保险人是否同一个人
that.relationToAppnt = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).relationToAppnt
@@ -1628,15 +1682,15 @@ export default {
[CellGroup.name]: CellGroup,
[Collapse.name]: Collapse,
[CollapseItem.name]: CollapseItem,
[NoticeBar.name]:NoticeBar,
[NoticeBar.name]: NoticeBar,
[Dialog.name]: Dialog,
[Field.name]: Field,
[IndexBar.name]: IndexBar,
[IndexBar.name]: IndexBar
},
beforeRouteLeave(to, from, next) {
document.body.style.backgroundColor = ''
next()
},
}
}
</script>