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 | 84 ++++++++++++++++++++++++++++++-----------
1 files changed, 61 insertions(+), 23 deletions(-)
diff --git a/src/views/h5/faceAuth/components/auditDialog.vue b/src/views/h5/faceAuth/components/auditDialog.vue
index 9662901..8501b86 100644
--- a/src/views/h5/faceAuth/components/auditDialog.vue
+++ b/src/views/h5/faceAuth/components/auditDialog.vue
@@ -13,7 +13,7 @@
<el-image :src="base64" style="width: 100%;" fit="cover"></el-image>
<div v-if="status=='auditing'" class="scan-line"></div>
</div>
- <el-row justify="center" v-else-if="['success', 'fail'].includes(status)">
+ <div style="display: flex; flex-direction: column; align-items: center;" v-else-if="['success', 'fail'].includes(status)">
<el-image :src="$getImageUrl(`/h5/face_${status}.png`)"></el-image>
<el-row>
<el-text class="text-lg">浜鸿劯楠岃瘉{{ status=='success'?'':'涓�' }}閫氳繃</el-text>
@@ -22,16 +22,24 @@
<el-text v-if="status=='success'">绯荤粺宸叉垚鍔熷鏍告偍鐨勮韩浠�</el-text>
<el-text v-else-if="status=='fail'">璇烽噸鏂伴獙璇佹偍鐨勮韩浠�</el-text>
</el-row>
- </el-row>
+ </div>
<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