//
router.beforeEach((to, from, next) => {
if (to.matched.some(record => record.meta.requiresAuth)) {
if (!window.localStorage.token) {
next({
path: "/login",
})
} else {
next()
}
} else {
if(to.name == "Login" && !window.localStorage.token == false){
next({
path: "/",
})
}else{
console.log("2");
next()
}
}
tried to determine the page and status intercept, but when you enter enter manually, the page seems to refresh once, and it seems impossible to block it.