token 无效

This commit is contained in:
2022-09-22 14:16:30 +08:00
parent b623970db8
commit 2f149911ba
14 changed files with 118 additions and 59 deletions

View File

@@ -17,6 +17,7 @@ router.beforeEach((to, from, next) => {
}
NProgress.start()
if (getToken()) {
// debugger
// 已登录且要跳转的页面是登录页
if (to.path === '/login') {
next({ path: '/' })

View File

@@ -1,3 +0,0 @@
<template>
<router-view />
</template>

View File

@@ -1,15 +0,0 @@
<template>
<div style="padding:30px;">
<el-input v-model="input" placeholder="请输入内容" />
</div>
</template>
<script>
export default {
name: 'Test',
data() {
return {
input: ''
}
}
}
</script>

View File

@@ -1,5 +0,0 @@
<template>
<div style="padding:30px;">
<el-input v-model="input" placeholder="请输入内容2" />
</div>
</template>

View File

@@ -1,5 +0,0 @@
<template>
<div style="padding:30px;">
<el-alert :closable="false" title="二级菜单" />
</div>
</template>