|
@@ -359,6 +359,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
res.data.url.replace("http", "https");
|
|
res.data.url.replace("http", "https");
|
|
|
|
|
+
|
|
|
this.verifyFace(res.data)
|
|
this.verifyFace(res.data)
|
|
|
this.userInfo.facePhotoUrl = res.data.url.replace("http", "https");
|
|
this.userInfo.facePhotoUrl = res.data.url.replace("http", "https");
|
|
|
}
|
|
}
|
|
@@ -395,6 +396,7 @@ export default {
|
|
|
|
|
|
|
|
// 验证人象
|
|
// 验证人象
|
|
|
verifyFace(data) {
|
|
verifyFace(data) {
|
|
|
|
|
+
|
|
|
let that = this;
|
|
let that = this;
|
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
|
title: '人脸识别中'
|
|
title: '人脸识别中'
|
|
@@ -404,7 +406,7 @@ export default {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
this.requestStatus = true
|
|
this.requestStatus = true
|
|
|
-
|
|
|
|
|
|
|
+ console.log(this.userInfo,'传入数据')
|
|
|
// 保存原来的照片信息,用于识别失败时恢复
|
|
// 保存原来的照片信息,用于识别失败时恢复
|
|
|
const originalFacePhoto = this.userInfo.facePhoto;
|
|
const originalFacePhoto = this.userInfo.facePhoto;
|
|
|
const originalFacePhotoUrl = this.userInfo.facePhotoUrl;
|
|
const originalFacePhotoUrl = this.userInfo.facePhotoUrl;
|
|
@@ -420,8 +422,7 @@ export default {
|
|
|
console.log(res.data, 'res.data')
|
|
console.log(res.data, 'res.data')
|
|
|
|
|
|
|
|
// 情况1: code === 500,查无此人,直接通过
|
|
// 情况1: code === 500,查无此人,直接通过
|
|
|
- if (res.data.code === 500) {
|
|
|
|
|
- console.log('查无此人,允许直接通过,相当于新增')
|
|
|
|
|
|
|
+ if (res.data.data.code === 500) {
|
|
|
this.userInfo.facePhoto = data.ossId
|
|
this.userInfo.facePhoto = data.ossId
|
|
|
this.userInfo.facePhotoUrl = data.url
|
|
this.userInfo.facePhotoUrl = data.url
|
|
|
return;
|
|
return;
|