How to restrict users from accessing the login page again through address url/login after logging in in vue

// 
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.

Apr.07,2021

sessionStorage find out, or judge whether the current session is valid on the login page. For example, send a packet to ask if you are logged in. If you are already logged in, go directly to router.push.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-49adc5a-105a6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-49adc5a-105a6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?