From 38712ae83223cb244020e255fc37e1ce35775c45 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 09 四月 2026 13:53:40 +0800
Subject: [PATCH] 优化
---
src/views/h5/faceAuth/components/auditDialog.vue | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/views/h5/faceAuth/components/auditDialog.vue b/src/views/h5/faceAuth/components/auditDialog.vue
index 15b15e8..9662901 100644
--- a/src/views/h5/faceAuth/components/auditDialog.vue
+++ b/src/views/h5/faceAuth/components/auditDialog.vue
@@ -10,7 +10,7 @@
>
<div class="p-7 pt-0" style="display: flex; flex-direction: column; align-items: center;">
<div class="image_box" v-if="['unStart', 'auditing'].includes(status)">
- <el-image :src="base64"></el-image>
+ <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)">
@@ -66,7 +66,8 @@
data() {
return {
dialogFlag: false,
- status: ''
+ status: '',
+ url: ''
}
},
props: {
@@ -99,16 +100,15 @@
methods: {
async submitAudit() {
this.status = 'auditing'
- const url = await uploadByBase64(this.base64 ,'浜鸿劯鐓х墖')
- if (!url) {
+ this.url = await uploadByBase64(this.base64 ,'浜鸿劯鐓х墖')
+ if (!this.url) {
this.status = 'fail'
return
}
- const params = { faceImgPath: url }
+ const params = { faceImgPath: this.url }
this.$axios.get('/system/auth/staff/checkin/face-match', { params }).then(res => {
if (res.data.code == 0) {
- // this.status = res.data.data ? 'success' : 'fail'
- this.status = 'success'
+ this.status = res.data.data ? 'success' : 'fail'
} else {
this.status = 'fail'
this.$message.error(res.data.msg || "浜鸿劯姣斿澶辫触")
@@ -119,7 +119,7 @@
},
handlerSuccess() {
this.dialogFlag = false
- this.$emit('handlerSuccess')
+ this.$emit('handlerSuccess', this.url)
}
}
}
--
Gitblit v1.8.0