1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
| <template>
| <div></div>
| </template>
| <script>
| import { tokenUtils } from '@/utils/axios.js';
|
| export default {
| components: {},
| data() {
| return {}
| },
| computed: {
| query() {
| return this.$route.query
| },
| appId() {
| return this.query.appId
| }
| },
| async created() {
| const canVerify = await this.getCanVerify()
| if (canVerify) {
| if (!this.getIsFace()) {
| this.$router.replace({ path: '/h5/face', query: { appId: this.appId }})
| } else if (!this.getIsSignup()) {
| this.$router.replace({ path: '/h5/signup', query: { appId: this.appId } })
| } else {
| this.$router.replace({ path: '/h5/verForm', query: { appId: this.appId }})
| }
| } else {
| this.$router.replace('/h5/noVerAccess')
| }
| },
| mounted() {
| document.title = '考点核验'
| },
| methods: {
| getCanVerify() {
| return new Promise((resolve) => {
| const params = {
| applicationId: this.$route.query.appId
| }
| this.$axios.get('/exam/verify-record/can-verify', { params }).then(res => {
| if (res.data.code == 0) {
| resolve(res.data.data)
| } else {
| resolve(false)
| }
| }, () => {
| resolve(false)
| })
| })
| },
| getIsFace() {
| return Boolean(localStorage.getItem('isFace'))
| },
| getIsSignup() {
| return Boolean(localStorage.getItem('isSignup'))
| }
| }
| }
| </script>
|
|