优化getRecognitionResult接口传参3

This commit is contained in:
xuxingjun
2025-01-02 17:09:48 +08:00
parent 7089e16029
commit ee0f68a183

View File

@@ -427,10 +427,6 @@ export default {
} }
}, },
async created() { async created() {
// console.log('保单号',localStorage.getItem('orderNo'));
// localStorage.setItem('faceAuthWeXin-requestId', '25479386765')
// localStorage.setItem('faceAuthWeXin-bizToken', '489753879568456')
// this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']), JSON.parse(localStorage['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)
} }
@@ -621,8 +617,6 @@ export default {
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']))
// } // }
}, },
// 获取消息和阅读状态 // 获取消息和阅读状态
@@ -779,7 +773,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') {
@@ -887,7 +881,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))
@@ -1007,7 +1001,7 @@ export default {
} }
} }
} }
} // }
}, },
goUrl() { goUrl() {
let that = this let that = this
@@ -1780,7 +1774,13 @@ export default {
}, },
getRecognitionResult(requestId, bizToken , orderNo) { getRecognitionResult(requestId, bizToken , orderNo) {
return new Promise(() => { return new Promise(() => {
getRecognitionResult({ requestId, bizToken, orderNo }).then( let data = {
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