wwf
14 小时以前 4e6f18dfa08e2f2f4f02aaa1b8e8e51852b7a9a1
src/views/h5/verify/index.vue
@@ -1,6 +1,5 @@
<template>
  <div>
  </div>
  <div></div>
</template>
<script>
import { tokenUtils } from '@/utils/axios.js';
@@ -8,9 +7,7 @@
export default {
  components: {},
  data() {
    return {
    }
    return {}
  },
  computed: {
    query() {
@@ -21,17 +18,17 @@
    }
  },
  async created() {
    if (tokenUtils.getAccessToken()) {
      const canVerify = await this.getCanVerify()
      if (canVerify) {
        this.$router.replace(`/h5/verForm/${this.appId}`)
      }
      // else {
      //   this.$router.replace('/h5/noVerAccess')
      // }
    } else {
      this.$message.error('请先登录')
      this.$router.replace({ path: '/h5/login', query: { appId: this.appId } })
    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() {
@@ -54,6 +51,12 @@
        })
      })
    },
    getIsFace() {
      return Boolean(localStorage.getItem('isFace'))
    },
    getIsSignup() {
      return Boolean(localStorage.getItem('isSignup'))
    }
  }
}
</script>