优化getRecognitionResult接口传参4

This commit is contained in:
xuxingjun
2025-01-02 17:48:41 +08:00
parent ee0f68a183
commit 11fe456dfd

View File

@@ -427,6 +427,7 @@ export default {
} }
}, },
async created() { async created() {
console.log('保单号',localStorage.getItem('orderNo'));
if(this.$route.query.token){ if(this.$route.query.token){
window.localStorage.setItem('token', this.$route.query.token) window.localStorage.setItem('token', this.$route.query.token)
} }
@@ -544,7 +545,7 @@ export default {
// 初始化 // 初始化
async init() { async init() {
localStorage.doubleRecordFlag = '0' //0不是双录单 1是双录单 localStorage.doubleRecordFlag = '0' //0不是双录单 1是双录单
// if (this.isWeixin) { if (this.isWeixin) {
if (this.$route.query.airSign) { if (this.$route.query.airSign) {
sessionStorage.setItem('airSign', this.$route.query.airSign) sessionStorage.setItem('airSign', this.$route.query.airSign)
} }
@@ -590,9 +591,9 @@ export default {
if (this.changeCard && this.appntSign.documentStatus == '1') { if (this.changeCard && this.appntSign.documentStatus == '1') {
Dialog.alert({ title: '提示', message: '确认完成,请联系业务员完成后续流程!' }) Dialog.alert({ title: '提示', message: '确认完成,请联系业务员完成后续流程!' })
} }
if (localStorage['faceAuthWeXin-requestId'] && localStorage['faceAuthWeXin-bizToken'] && this.$route.query.faceAuthCountWeixin != undefined) { // if (localStorage['faceAuthWeXin-requestId'] && localStorage['faceAuthWeXin-bizToken'] && this.$route.query.faceAuthCountWeixin != undefined) {
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']), localStorage.getItem('orderNo')) // this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']), localStorage.getItem('orderNo'))
} // }
if (sessionStorage.shareCode == '1') { if (sessionStorage.shareCode == '1') {
console.log('进来被保险人') console.log('进来被保险人')
this.tipsName = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).name this.tipsName = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).name
@@ -611,13 +612,15 @@ export default {
this.faceAuthCount.appnt = this.$route.query.faceAuthCountAppnt == undefined ? 0 : Number(this.$route.query.faceAuthCountAppnt) this.faceAuthCount.appnt = this.$route.query.faceAuthCountAppnt == undefined ? 0 : Number(this.$route.query.faceAuthCountAppnt)
this.faceAuthCount.insured = this.$route.query.faceAuthCountInsured == undefined ? 0 : Number(this.$route.query.faceAuthCountInsured) this.faceAuthCount.insured = this.$route.query.faceAuthCountInsured == undefined ? 0 : Number(this.$route.query.faceAuthCountInsured)
this.faceAuthCount.weixin = this.$route.query.faceAuthCountWeixin == undefined ? 0 : Number(this.$route.query.faceAuthCountWeixin) this.faceAuthCount.weixin = this.$route.query.faceAuthCountWeixin == undefined ? 0 : Number(this.$route.query.faceAuthCountWeixin)
// } else { } else {
// 获取详情消息 // 获取详情消息
this.getOrderDetail() this.getOrderDetail()
this.getSignInvalid() this.getSignInvalid()
this.isShow = true this.isShow = true
// } }
// } if (localStorage['faceAuthWeXin-requestId'] && localStorage['faceAuthWeXin-bizToken'] && this.$route.query.faceAuthCountWeixin != undefined) {
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']), JSON.parse(localStorage['orderNo']))
}
}, },
// 获取消息和阅读状态 // 获取消息和阅读状态
realPeopelCheck() { realPeopelCheck() {
@@ -773,7 +776,7 @@ export default {
} }
// val 0投保人 1被保险人 2本人 // val 0投保人 1被保险人 2本人
let that = this let that = this
// if (this.isWeixin) { if (this.isWeixin) {
window.localStorage.setItem('sign-val', val) window.localStorage.setItem('sign-val', val)
window.localStorage.setItem('sign-appnt', JSON.stringify(that.appntSign)) window.localStorage.setItem('sign-appnt', JSON.stringify(that.appntSign))
if (val == '0' || val == '2') { if (val == '0' || val == '2') {
@@ -865,7 +868,7 @@ export default {
} }
// 人脸识别 // 人脸识别
if (localStorage['faceAuthWeXin-requestId'] && localStorage['faceAuthWeXin-bizToken'] && this.$route.query.faceAuthCountWeixin != undefined) { if (localStorage['faceAuthWeXin-requestId'] && localStorage['faceAuthWeXin-bizToken'] && this.$route.query.faceAuthCountWeixin != undefined) {
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']), JSON.parse(localStorage['orderNo'])) this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']), localStorage.getItem('orderNo'))
} else { } else {
this.idcardData.realName = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).name this.idcardData.realName = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).name
this.idcardData.idno = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).idNo this.idcardData.idno = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).idNo
@@ -881,7 +884,7 @@ export default {
// } // }
} }
} }
// } else { } else {
if (val == '0' || val == '2') { if (val == '0' || val == '2') {
window.localStorage.setItem('sign-val', val) window.localStorage.setItem('sign-val', val)
window.localStorage.setItem('sign-appnt', JSON.stringify(that.appntSign)) window.localStorage.setItem('sign-appnt', JSON.stringify(that.appntSign))
@@ -1001,7 +1004,7 @@ export default {
} }
} }
} }
// } }
}, },
goUrl() { goUrl() {
let that = this let that = this
@@ -1762,6 +1765,7 @@ export default {
localStorage.setItem('faceAuthWeXin-requestId', JSON.stringify(res.content.requestId)) localStorage.setItem('faceAuthWeXin-requestId', JSON.stringify(res.content.requestId))
localStorage.setItem('faceAuthWeXin-bizToken', JSON.stringify(res.content.bizToken)) localStorage.setItem('faceAuthWeXin-bizToken', JSON.stringify(res.content.bizToken))
window.location.href = res.content.url window.location.href = res.content.url
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']), localStorage.getItem('orderNo'))
} else { } else {
this.$toast(res.resultMessage) this.$toast(res.resultMessage)
} }
@@ -1774,13 +1778,7 @@ export default {
}, },
getRecognitionResult(requestId, bizToken , orderNo) { getRecognitionResult(requestId, bizToken , orderNo) {
return new Promise(() => { return new Promise(() => {
let data = { getRecognitionResult({ requestId, bizToken, orderNo }).then(
bizToken: bizToken,
requestId: requestId,
orderNo: orderNo,
}
getRecognitionResult(data).then(
(res) => { (res) => {
if (res.result == '0') { if (res.result == '0') {
this.recognizeResult = res.result this.recognizeResult = res.result