getRecognitionResult 接口加个保单号入参

This commit is contained in:
xuxingjun
2024-12-24 14:24:55 +08:00
parent 46cccb9d4e
commit 2bd46c8c82
5 changed files with 18 additions and 17 deletions

View File

@@ -127,7 +127,7 @@ export default {
num++
await this.getRecognitionUrl(val, num)
if (this.requestId && this.bizToken) {
await this.getRecognitionResult(this.requestId, this.bizToken)
await this.getRecognitionResult(this.requestId, this.bizToken, localStorage.getItem('orderNo'))
} else {
return
}
@@ -155,9 +155,9 @@ export default {
)
})
},
getRecognitionResult(requestId, bizToken) {
getRecognitionResult(requestId, bizToken, orderNo) {
return new Promise((resolve, reject) => {
getRecognitionResult({ requestId, bizToken }).then(
getRecognitionResult({ requestId, bizToken, orderNo :orderNo }).then(
res => {
console.log('getRecognitionResult', res)
if (res.result == '0') {

View File

@@ -195,7 +195,7 @@ export default {
//获取腾讯人脸识别URL后重新跳回页面验证腾讯人脸识别结果成功的话调签字面板
if (localStorage['faceAuthWeXin-requestId'] && localStorage['faceAuthWeXin-bizToken'] && this.$route.query.faceAuthCountWeixin != undefined) {
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']))
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']), localStorage.getItem('orderNo'))
}
this.faceAuthCount.enjoy = this.$route.query.faceAuthCountAppnt == undefined ? 0 : Number(this.$route.query.faceAuthCountAppnt)
this.faceAuthCount.weixin = this.$route.query.faceAuthCountWeixin == undefined ? 0 : Number(this.$route.query.faceAuthCountWeixin)
@@ -291,9 +291,9 @@ export default {
return str
},
//微信初始化--获取腾讯人脸识别结果接口
getRecognitionResult(requestId, bizToken) {
getRecognitionResult(requestId, bizToken, orderNo) {
return new Promise(() => {
getRecognitionResult({ requestId, bizToken }).then(
getRecognitionResult({ requestId, bizToken, orderNo:orderNo }).then(
(res) => {
if (res.result == '0') {
this.recognizeResult = res.result

View File

@@ -132,7 +132,7 @@ export default {
}
if (localStorage['faceAuthWeXin-requestId'] && localStorage['faceAuthWeXin-bizToken']) {
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']))
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']), localStorage.getItem('orderNo'))
}
},
methods: {
@@ -396,8 +396,8 @@ export default {
)
})
},
getRecognitionResult(requestId, bizToken) {
getRecognitionResult({ requestId, bizToken })
getRecognitionResult(requestId, bizToken, orderNo) {
getRecognitionResult({ requestId, bizToken, orderNo: orderNo })
.then(res => {
console.log('getRecognitionResult', res)
if (res.result == '0') {

View File

@@ -442,7 +442,7 @@ export default {
}
// localStorage['faceAuthWeXin-requestId'] localStorage['faceAuthWeXin-bizToken']--微信端人脸识别获取腾讯认证url接口获得认证相关参数
if (localStorage['faceAuthWeXin-requestId'] && localStorage['faceAuthWeXin-bizToken'] && this.$route.query.faceAuthCountWeixin != undefined) {
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']))
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']), localStorage.getItem('orderNo'))
}
if (sessionStorage.shareCode == '1') {
@@ -1400,9 +1400,9 @@ export default {
)
})
},
getRecognitionResult(requestId, bizToken) {
getRecognitionResult(requestId, bizToken, orderNo) {
return new Promise(() => {
getRecognitionResult({ requestId, bizToken }).then(
getRecognitionResult({ requestId, bizToken, orderNo: orderNo }).then(
res => {
if (res.result == '0') {
this.recognizeResult = res.result

View File

@@ -427,6 +427,7 @@ export default {
}
},
async created() {
console.log('保单号',localStorage.getItem('orderNo'));
if(this.$route.query.token){
window.localStorage.setItem('token', this.$route.query.token)
}
@@ -591,7 +592,7 @@ export default {
Dialog.alert({ title: '提示', message: '确认完成,请联系业务员完成后续流程!' })
}
if (localStorage['faceAuthWeXin-requestId'] && localStorage['faceAuthWeXin-bizToken'] && this.$route.query.faceAuthCountWeixin != undefined) {
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']))
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']), localStorage.getItem('orderNo'))
}
if (sessionStorage.shareCode == '1') {
console.log('进来被保险人')
@@ -807,7 +808,7 @@ export default {
}
// 人脸识别
if (localStorage['faceAuthWeXin-requestId'] && localStorage['faceAuthWeXin-bizToken'] && this.$route.query.faceAuthCountWeixin != undefined) {
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']))
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']), localStorage.getItem('orderNo'))
} else {
this.idcardData.realName = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo')).name
this.idcardData.idno = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredInfo')).idNo
@@ -864,7 +865,7 @@ export default {
}
// 人脸识别
if (localStorage['faceAuthWeXin-requestId'] && localStorage['faceAuthWeXin-bizToken'] && this.$route.query.faceAuthCountWeixin != undefined) {
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']))
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']), localStorage.getItem('orderNo'))
} else {
this.idcardData.realName = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).name
this.idcardData.idno = JSON.parse(this.$CacheUtils.getLocItem('saleInsuredPersonInfo')).idNo
@@ -1771,9 +1772,9 @@ export default {
)
})
},
getRecognitionResult(requestId, bizToken) {
getRecognitionResult(requestId, bizToken , orderNo) {
return new Promise(() => {
getRecognitionResult({ requestId, bizToken }).then(
getRecognitionResult({ requestId, bizToken, orderNo: orderNo }).then(
(res) => {
if (res.result == '0') {
this.recognizeResult = res.result