| 123456789101112131415161718192021222324 |
- <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>
|