<template>
  <div id="nav">
    检查登录状态中……
  </div>
</template>

<script>
export default {
  mounted() {
    this.checkLogin()
  },
  methods: {
    async checkLogin() {
      console.log(this)
      const res = await this.$post('/api/admin/index/check_login')
      // console.log(res)
      if(res.status) this.$router.replace('/main')
      else this.$router.replace('/login')
    }
  }
}
</script>

<style>
</style>
