From 1d37c375fd114212ee1419c3bbdadc81d76666a4 Mon Sep 17 00:00:00 2001
From: yearning <10538594+wangweifeng1999@user.noreply.gitee.com>
Date: 星期四, 03 九月 2026 18:01:59 +0800
Subject: [PATCH] 优化

---
 src/views/h5/faceAuth/components/auditDialog.vue |   80 +++++++++++++++++++++++++++++----------
 1 files changed, 59 insertions(+), 21 deletions(-)

diff --git a/src/views/h5/faceAuth/components/auditDialog.vue b/src/views/h5/faceAuth/components/auditDialog.vue
index 58c0dc4..8501b86 100644
--- a/src/views/h5/faceAuth/components/auditDialog.vue
+++ b/src/views/h5/faceAuth/components/auditDialog.vue
@@ -26,12 +26,20 @@
       <el-row justify="center" class="mt-5" v-if="status=='auditing'">
         <el-text>姝e湪瀹℃牳涓紝璇疯�愬績绛夊緟...</el-text>
       </el-row>
-      <el-button
-        v-if="status=='unStart'"
-        @click="submitAudit" 
-        :loading="status=='auditing'" 
+      <el-button v-if="mode=='local'"
+        @click="handlerSuccess"
         type="primary"
-        size="large" class="mt-5" 
+        size="large" class="mt-5"
+        style="width: 100%;"
+      >
+        涓婁紶鐜板満鐓х墖
+      </el-button>
+      <el-button
+        v-else-if="status=='unStart'"
+        @click="submitAudit"
+        :loading="status=='auditing'"
+        type="primary"
+        size="large" class="mt-5"
         style="width: 100%;"
       >
         鎻愪氦瀹℃牳
@@ -39,21 +47,39 @@
       <el-button
         v-else-if="status=='success'"
         @click="handlerSuccess"
-        type="primary" 
-        size="large" class="mt-5" 
+        type="primary"
+        size="large" class="mt-5"
         style="width: 100%;"
       >
         瀹屾垚楠岃瘉
       </el-button>
-      <el-button
-        v-else-if="status=='fail'"
-        @click="dialogFlag=false"
-        type="primary" 
-        size="large" class="mt-5" 
-        style="width: 100%;"
-      >
-        纭畾
-      </el-button>
+      <template v-else-if="status=='fail'">
+        <el-button
+          @click="dialogFlag=false"
+          type="primary"
+          size="large" class="mt-5"
+          style="width: 100%;"
+        >
+          纭畾
+        </el-button>
+        <template v-if="verifyErrorCount >= 2" >
+          <el-row justify="center">
+            <el-text
+              tag="ins" class="text-red mt-6"
+              @click="uploadLocalImg()"
+            >
+              鏍搁獙寮傚父锛屽伐浣滀汉鍛樹笂浼犵幇鍦虹収鐗�
+            </el-text>
+          </el-row>
+          <el-row justify="center" style="width: 100%;">
+            <el-text
+              class="text-xs text-info px-1"
+            >
+              璇锋媿鎽勩�愭湰浜烘墜鎸佽韩浠借瘉涓旇儗鏅綋鐜扮幇鍦哄厓绱犵殑鐓х墖銆�
+            </el-text>
+          </el-row>
+        </template>
+      </template>
     </div>
   </el-dialog>
 </template>
@@ -67,7 +93,8 @@
     return {
       dialogFlag: false,
       status: '',
-      url: ''
+      url: '',
+      verifyErrorCount: 0
     }
   },
   props: {
@@ -78,13 +105,17 @@
     base64: {
       type: String,
       default: ''
+    },
+    mode: {
+      type: String,
+      default: ''
     }
   },
   computed: {
-    
+
   },
   created() {
-    
+
   },
   watch: {
     modelValue(val) {
@@ -109,6 +140,9 @@
       this.$axios.get('/system/auth/staff/checkin/face-match', { params }).then(res => {
         if (res.data.code == 0) {
           this.status = res.data.data ? 'success' : 'fail'
+          if (!res.data.data) {
+            this.verifyErrorCount += 1
+          }
         } else {
           this.status = 'fail'
           this.$message.error(res.data.msg || "浜鸿劯姣斿澶辫触")
@@ -120,7 +154,11 @@
     handlerSuccess() {
       this.dialogFlag = false
       this.$emit('handlerSuccess', this.url)
-    }
+    },
+    uploadLocalImg() {
+      this.dialogFlag = false
+      this.$emit('uploadLocalImg')
+    },
   }
 }
 </script>
@@ -153,4 +191,4 @@
   100% { top: 100%; } /* 绉诲姩鍒板簳閮� */
 }
 
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.8.0