wwf
12 小时以前 9a6cd220224fd3a9a6c84b5bb37c6410a470969f
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>