Quellcode durchsuchen

fix:修改服务对象照片修改失败修复

xuyunhui vor 2 Monaten
Ursprung
Commit
5230081d88
1 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen
  1. 4 3
      myPages/serviceObjectAllInfo/index.vue

+ 4 - 3
myPages/serviceObjectAllInfo/index.vue

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