大屏页面初始化
This commit is contained in:
@@ -51,12 +51,12 @@ router.beforeEach((to, from, next) => {
|
||||
try {
|
||||
const token = localStorage.getItem('token')
|
||||
if (token && token.trim() !== '') {
|
||||
next()
|
||||
next();
|
||||
} else {
|
||||
next({ path: '/login', query: { redirect: to.fullPath } })
|
||||
next({ path: '/login', query: { redirect: to.fullPath } });
|
||||
}
|
||||
} catch (error) {
|
||||
next('/login')
|
||||
next('/login');
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user