修改完成
This commit is contained in:
parent
0010c55676
commit
03e3498de5
|
|
@ -69,7 +69,7 @@ const routes = [
|
|||
const router = new Router({
|
||||
mode: 'history',
|
||||
routes,
|
||||
base: '',
|
||||
base: '/screen',
|
||||
})
|
||||
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
|
|
@ -78,7 +78,7 @@ router.beforeEach(async (to, from, next) => {
|
|||
}
|
||||
const token = localStorage.getItem('token')
|
||||
if (!token) {
|
||||
next('/login/index') // 跳转到登录页
|
||||
next('/screen/login/index') // 跳转到登录页
|
||||
} else {
|
||||
next() // 放行
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue