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/signup/index.vue |   48 ++++++++++++++++++++++++++++++------------------
 1 files changed, 30 insertions(+), 18 deletions(-)

diff --git a/src/views/h5/signup/index.vue b/src/views/h5/signup/index.vue
index 7a6f83d..99098ca 100644
--- a/src/views/h5/signup/index.vue
+++ b/src/views/h5/signup/index.vue
@@ -77,11 +77,11 @@
       distance: null,
       positionError: false,
       positionName: '',
-      positionAddress: '鍗楀北鍖烘墦鐭充簩璺崡118鍙�',
+      positionAddress: '',
       currentTimeText: '',
       centerPoint: {
-        lat: 22.580372,
-        lng: 113.946530
+        lat: 23.135618,
+        lng: 113.27077
       }
     }
   },
@@ -104,6 +104,9 @@
     },
     appId() {
       return this.$route.query.appId
+    },
+    url() {
+      return this.$route.query.url
     }
   },
   created() {
@@ -118,10 +121,12 @@
       this.$axios.get('/exam/verify-record/get-by-application-id', { params }).then(res => {
         if (res.data.code == 0) {
           const resData = res.data.data || {}
-          // this.centerPoint = {
-          //   lat: resData.examSite?.locationLat,
-          //   lng: resData.examSite?.locationLng
-          // }
+          if (resData.examSite?.locationLat && resData.examSite?.locationLng) {
+            this.centerPoint = {
+              lat: resData.examSite?.locationLat,
+              lng: resData.examSite?.locationLng 
+            }
+          }
           this.positionAddress = resData.examSite?.address
         } else {
           this.$message.error(res.data.msg)
@@ -140,22 +145,29 @@
       }
     },
     signinConfirm() {
-      if (!this.canSignup) {
+      if (!this.canSignup || this.confirmLoading) {
         return
       }
-      this.$message.success('绛惧埌鎴愬姛')
-      localStorage.setItem('isSignup', true)
-      setTimeout(() => {
-        if (this.getIsFace()) {
-          this.$router.replace({ path: '/h5/face', query: { appId: this.appId }})
+      const data = {
+        targetId: this.appId,
+        targetType: 2,
+        url: this.url,
+        type: 0
+      }
+      this.confirmLoading = true
+      this.$axios.post('/exam/staff/checkin', data).then(res => {
+        if (res.data.code == 0) {
+          this.$message.success('绛惧埌鎴愬姛')
+          setTimeout(() => {
+            this.$router.replace({ path: '/h5/verForm', query: { appId: this.appId }})
+          }, 500)
         } else {
-          this.$router.replace({ path: '/h5/verForm', query: { appId: this.appId }})
+          this.$message.error(res.data.msg)
         }
-      }, 500)
+      }).finally(() => {
+        this.confirmLoading = false
+      })
     },
-    getIsFace() {
-      return Boolean(localStorage.getItem('isFace'))
-    }
   }
 }
 </script>

--
Gitblit v1.8.0