登录路由
This commit is contained in:
parent
b7148d9a54
commit
961480060f
|
|
@ -259,10 +259,10 @@ const router = createRouter({
|
|||
|
||||
router.beforeEach((to, from, next) => {
|
||||
const store = useStore()
|
||||
if (store.token || to.path == '/Login') {
|
||||
if (store.token || to.path == '/login') {
|
||||
next()
|
||||
} else {
|
||||
next('/Login')
|
||||
next('/login')
|
||||
}
|
||||
// chrome
|
||||
document.body.scrollTop = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue