Merge branch 'feature/GFRS-860【0514】更换人脸识别厂商-微信端' into dev

This commit is contained in:
yuweiqi
2020-05-08 20:45:09 +08:00

View File

@@ -439,12 +439,9 @@ export default {
// let params = {
// orderNo: ''
// }
console.log('init 111', this.$route.query.faceAuthCountWeixin, typeof this.$route.query.faceAuthCountWeixin)
console.log('init query', this.$route.query)
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.weixin = this.$route.query.faceAuthCountWeixin == undefined ? 0 : Number(this.$route.query.faceAuthCountWeixin)
console.log(1111, this.faceAuthCount.weixin, typeof this.faceAuthCount.weixin)
} else {
// 获取详情消息
@@ -1173,7 +1170,6 @@ export default {
this.goUrl()
}
} else {
console.log('腾讯人脸识别失败111', this.faceAuthCount.weixin, typeof this.faceAuthCount.weixin)
this.faceAuthCount.weixin++
console.log('腾讯人脸识别失败', this.faceAuthCount.weixin, typeof this.faceAuthCount.weixin)
if (this.faceAuthCount.weixin >= this.smsAuthNum) {
@@ -1192,17 +1188,23 @@ export default {
await this.getRecognitionUrl()
},
//替换redirectUrl
replaceSearch() {
let obj = this.$route.query,
str = '?'
obj.faceAuthCountAppnt = this.faceAuthCount.appnt
obj.faceAuthCountInsured = this.faceAuthCount.insured
obj.faceAuthCountWeixin = this.faceAuthCount.weixin
for (let key in obj) {
str += `&${key}=${obj[key]}`
}
return str
},
getRecognitionUrl() {
return new Promise((resolve, reject) => {
this.idcardData.redirectUrl =
window.location.href +
'&faceAuthCountAppnt=' +
this.faceAuthCount.appnt +
'&faceAuthCountInsured=' +
this.faceAuthCount.insured +
'&faceAuthCountWeixin=' +
this.faceAuthCount.weixin
localStorage.setItem('9999111', JSON.stringify(this.faceAuthCount.weixin)) //调试专用
this.idcardData.redirectUrl = location.origin + this.replaceSearch()
localStorage.setItem('9999111', JSON.stringify(this.idcardData.redirectUrl)) //调试专用
let data = { realName: this.idcardData.realName, idno: this.idcardData.idno, redirectUrl: this.idcardData.redirectUrl }
console.log('获取URL请求参数', data)
getRecognitionUrl(data).then(