修改完成

This commit is contained in:
jjLv 2024-12-05 17:16:29 +08:00
parent 0010c55676
commit 03e3498de5
1 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ const routes = [
const router = new Router({ const router = new Router({
mode: 'history', mode: 'history',
routes, routes,
base: '', base: '/screen',
}) })
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
@ -78,7 +78,7 @@ router.beforeEach(async (to, from, next) => {
} }
const token = localStorage.getItem('token') const token = localStorage.getItem('token')
if (!token) { if (!token) {
next('/login/index') // 跳转到登录页 next('/screen/login/index') // 跳转到登录页
} else { } else {
next() // 放行 next() // 放行
} }