router.beforeEach((to, from, next) => {
if (to.name == "person") {
if (localStorage.getItem("Token")) {
next();
} else {
next({
path: "/login",
query: { redirect: to.fullPath }
})
}
} else {
next();
}
});