| | |
| | | distance: null, |
| | | positionError: false, |
| | | positionName: '', |
| | | positionAddress: '南山区打石二路南118号', |
| | | positionAddress: '', |
| | | currentTimeText: '', |
| | | centerPoint: { |
| | | lat: 22.580372, |
| | | lng: 113.946530 |
| | | lat: 23.135618, |
| | | lng: 113.27077 |
| | | } |
| | | } |
| | | }, |
| | |
| | | }, |
| | | appId() { |
| | | return this.$route.query.appId |
| | | }, |
| | | url() { |
| | | return this.$route.query.url |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | 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) |
| | |
| | | } |
| | | }, |
| | | 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> |