From 9a6cd220224fd3a9a6c84b5bb37c6410a470969f Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期二, 17 三月 2026 17:53:21 +0800
Subject: [PATCH] 考点核验
---
src/views/h5/verify/index.vue | 53 ++++++++++++++++++++++++++++++-----------------------
1 files changed, 30 insertions(+), 23 deletions(-)
diff --git a/src/views/h5/verify/index.vue b/src/views/h5/verify/index.vue
index 7d67685..0befee6 100644
--- a/src/views/h5/verify/index.vue
+++ b/src/views/h5/verify/index.vue
@@ -1,37 +1,28 @@
<template>
- <div>
- </div>
+ <div></div>
</template>
<script>
-import { tokenUtils } from '@/utils/axios.js';
-
export default {
components: {},
data() {
- return {
-
- }
+ return {}
},
computed: {
- query() {
- return this.$route.query
- },
appId() {
- return this.query.appId
+ return this.$route.query.appId
}
},
async created() {
- if (tokenUtils.getAccessToken()) {
- const canVerify = await this.getCanVerify()
- if (canVerify) {
- this.$router.replace(`/h5/verForm/${this.appId}`)
- }
- // else {
- // this.$router.replace('/h5/noVerAccess')
- // }
- } else {
- this.$message.error('璇峰厛鐧诲綍')
- this.$router.replace({ path: '/h5/login', query: { appId: this.appId } })
+ const canVerify = await this.getCanVerify()
+ if (!canVerify) {
+ this.$router.replace('/h5/noVerAccess')
+ return
+ }
+ const checkinExist = await this.getCheckinExist()
+ if (checkinExist) {
+ this.$router.replace({ path: '/h5/verForm', query: { appId: this.appId }})
+ } else {
+ this.$router.replace({ path: '/h5/face', query: { appId: this.appId }})
}
},
mounted() {
@@ -41,7 +32,7 @@
getCanVerify() {
return new Promise((resolve) => {
const params = {
- applicationId: this.$route.query.appId
+ applicationId: this.appId
}
this.$axios.get('/exam/verify-record/can-verify', { params }).then(res => {
if (res.data.code == 0) {
@@ -54,6 +45,22 @@
})
})
},
+ getCheckinExist() {
+ return new Promise((resolve) => {
+ const params = {
+ targetId: this.appId
+ }
+ this.$axios.get('/exam/staff/checkin/exist', { params }).then(res => {
+ if (res.data.code == 0) {
+ resolve(res.data.data)
+ } else {
+ resolve(false)
+ }
+ }, () => {
+ resolve(false)
+ })
+ })
+ },
}
}
</script>
\ No newline at end of file
--
Gitblit v1.8.0