mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 13:56:44 +08:00
[fix] 理赔:人脸识别在微信端修改微信的人脸识别
This commit is contained in:
@@ -77,6 +77,7 @@ export function uploadImg(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
/*
|
||||
// 人脸识别
|
||||
export function recognition(data) {
|
||||
return request({
|
||||
@@ -85,8 +86,26 @@ export function recognition(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
*/
|
||||
|
||||
//获取腾讯人脸识别URL接口
|
||||
export function getRecognitionUrl(data) {
|
||||
return request({
|
||||
url: getUrl('/customer/tencent/getRecognitionUrl', 1),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//获取腾讯人脸识别结果接口
|
||||
export function getRecognitionResult(data) {
|
||||
return request({
|
||||
url: getUrl('/customer/tencent/getRecognitionResult', 1),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 139.9.27.13:7002/updown/uploadImage
|
||||
// 核保接口
|
||||
export function underWrite(data) {
|
||||
return request({
|
||||
@@ -195,3 +214,11 @@ export function getPayState(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询支付结果
|
||||
export function revokeOrder(data) {
|
||||
return request({
|
||||
url: getUrl('/sale/order/revokeOrder', 1),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -75,15 +75,15 @@
|
||||
<div class="bottom-btn bg-white" v-if="!isWeixin && list.applyerSignState == 1">
|
||||
<van-button type="danger" size="large" @click="next" v-no-more-click="1000" v-if="!isWeixin" :disabled="list.applyerSignState == 0">提交</van-button>
|
||||
</div>
|
||||
<UploadImageFile :typeface="idcardData.typeface" :realName="idcardData.idcardName" :idno="idcardData.idcardNumber" @sendimage="sendimage"></UploadImageFile>
|
||||
<Read v-show="readShow" @confirm="goToNext"/>
|
||||
<!-- <UploadImageFile :typeface="idcardData.typeface" :realName="idcardData.idcardName" :idno="idcardData.idcardNumber" @sendimage="sendimage"></UploadImageFile> -->
|
||||
<Read v-show="readShow" @confirm="goToNext" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import UploadImageFile from '@/components/ebiz/sale/UploadImageFile'
|
||||
// import UploadImageFile from '@/components/ebiz/sale/UploadImageFile'
|
||||
import Read from '@/components/ebiz/claims/Read'
|
||||
import { Cell, CellGroup, Collapse, CollapseItem, Dialog } from 'vant'
|
||||
import { getToken, getSignInvalid, checkSignInvalid } from '@/api/ebiz/sale/sale'
|
||||
import { getToken, getSignInvalid, checkSignInvalid, getRecognitionUrl, getRecognitionResult } from '@/api/ebiz/sale/sale'
|
||||
import { progressDetail, submit } from '@/api/ebiz/claims/claims'
|
||||
import { weixinShare } from '@/assets/js/utils/wxShare.js'
|
||||
export default {
|
||||
@@ -123,7 +123,7 @@ export default {
|
||||
[Collapse.name]: Collapse,
|
||||
[CollapseItem.name]: CollapseItem,
|
||||
[Dialog.name]: Dialog,
|
||||
UploadImageFile: UploadImageFile,
|
||||
// UploadImageFile: UploadImageFile,
|
||||
Read
|
||||
},
|
||||
created() {
|
||||
@@ -137,6 +137,10 @@ export default {
|
||||
})
|
||||
window.appCallBack = this.appCallBack
|
||||
}
|
||||
|
||||
if (localStorage['faceAuthWeXin-requestId'] && localStorage['faceAuthWeXin-bizToken']) {
|
||||
this.getRecognitionResult(JSON.parse(localStorage['faceAuthWeXin-requestId']), JSON.parse(localStorage['faceAuthWeXin-bizToken']))
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 初始化
|
||||
@@ -256,9 +260,10 @@ export default {
|
||||
if (that.list.applyerCertiType != '1') {
|
||||
this.showRead()
|
||||
} else {
|
||||
this.idcardData.typeface = !this.idcardData.typeface
|
||||
// this.idcardData.typeface = !this.idcardData.typeface
|
||||
this.idcardData.idcardName = this.list.applyerName
|
||||
this.idcardData.idcardNumber = this.list.applyerCertiCode
|
||||
this.getRecognitionUrl()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -282,6 +287,49 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
getRecognitionUrl(val, num) {
|
||||
localStorage.setItem('faceAuthWeXin-requestId', '')
|
||||
localStorage.setItem('faceAuthWeXin-bizToken', '')
|
||||
return new Promise((resolve, reject) => {
|
||||
// this.$route.fullPath
|
||||
let data = { realName: this.idcardData.idcardName, idno: this.idcardData.idcardNumber, redirectUrl: location.origin + '/#' + this.$route.fullPath }
|
||||
console.log('获取URL请求参数', data)
|
||||
getRecognitionUrl(data).then(
|
||||
res => {
|
||||
console.log('getRecognitionUrl', res)
|
||||
if (res.result == '0') {
|
||||
localStorage.setItem('faceAuthWeXin-requestId', JSON.stringify(res.content.requestId))
|
||||
localStorage.setItem('faceAuthWeXin-bizToken', JSON.stringify(res.content.bizToken))
|
||||
window.location.href = res.content.url
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
},
|
||||
error => {
|
||||
console.log(error)
|
||||
}
|
||||
)
|
||||
})
|
||||
},
|
||||
getRecognitionResult(requestId, bizToken) {
|
||||
getRecognitionResult({ requestId, bizToken })
|
||||
.then(res => {
|
||||
console.log('getRecognitionResult', res)
|
||||
if (res.result == '0') {
|
||||
// this.recognizeResult = res.content.result
|
||||
// this.recognizeMessage = res.content.result == '1' ? res.content.resultMessage : ''
|
||||
// this.sendimage(true)
|
||||
this.showRead()
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error)
|
||||
})
|
||||
localStorage.setItem('faceAuthWeXin-requestId', '')
|
||||
localStorage.setItem('faceAuthWeXin-bizToken', '')
|
||||
},
|
||||
sendimage(e) {
|
||||
if (e) {
|
||||
this.showRead()
|
||||
|
||||
Reference in New Issue
Block a user