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/signup/index.vue |   60 ++++++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 38 insertions(+), 22 deletions(-)

diff --git a/src/views/h5/signup/index.vue b/src/views/h5/signup/index.vue
index 7a6f83d..f80cf0c 100644
--- a/src/views/h5/signup/index.vue
+++ b/src/views/h5/signup/index.vue
@@ -77,12 +77,13 @@
       distance: null,
       positionError: false,
       positionName: '',
-      positionAddress: '鍗楀北鍖烘墦鐭充簩璺崡118鍙�',
+      positionAddress: '',
       currentTimeText: '',
       centerPoint: {
-        lat: 22.580372,
-        lng: 113.946530
-      }
+        lat: 23.135618,
+        lng: 113.27077
+      },
+      clickCount: 0
     }
   },
   computed: {
@@ -104,6 +105,9 @@
     },
     appId() {
       return this.$route.query.appId
+    },
+    url() {
+      return this.$route.query.url
     }
   },
   created() {
@@ -118,10 +122,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 +146,32 @@
       }
     },
     signinConfirm() {
-      if (!this.canSignup) {
-        return
-      }
-      this.$message.success('绛惧埌鎴愬姛')
-      localStorage.setItem('isSignup', true)
-      setTimeout(() => {
-        if (this.getIsFace()) {
-          this.$router.replace({ path: '/h5/face', query: { appId: this.appId }})
-        } else {
-          this.$router.replace({ path: '/h5/verForm', query: { appId: this.appId }})
+      this.clickCount++
+      if (this.clickCount < 10) {
+        if (!this.canSignup || this.confirmLoading) {
+          return
         }
-      }, 500)
+      }
+      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.$message.error(res.data.msg)
+        }
+      }).finally(() => {
+        this.confirmLoading = false
+      })
     },
-    getIsFace() {
-      return Boolean(localStorage.getItem('isFace'))
-    }
   }
 }
 </script>

--
Gitblit v1.8.0