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
63
64
65
66
| <template>
| <div></div>
| </template>
| <script>
| export default {
| components: {},
| data() {
| return {}
| },
| computed: {
| appId() {
| return this.$route.query.appId
| }
| },
| async created() {
| const canVerify = await this.getCanVerify()
| if (!canVerify) {
| this.$router.replace('/h5/noVerAccess')
| return
| }
| const checkinExist = await this.getCheckinExist()
| if (checkinExist) {
| this.$router.replace({ path: '/h5/verForm', query: { appId: this.appId }})
| } else {
| this.$router.replace({ path: '/h5/face', query: { appId: this.appId }})
| }
| },
| mounted() {
| document.title = '考点核验'
| },
| methods: {
| getCanVerify() {
| return new Promise((resolve) => {
| const params = {
| applicationId: this.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)
| })
| })
| },
| getCheckinExist() {
| return new Promise((resolve) => {
| const params = {
| targetId: this.appId
| }
| this.$axios.get('/exam/staff/checkin/exist', { params }).then(res => {
| if (res.data.code == 0) {
| resolve(res.data.data)
| } else {
| resolve(false)
| }
| }, () => {
| resolve(false)
| })
| })
| },
| }
| }
| </script>
|
|