loulijun2021
2023-02-14 2e5686c6e6a3c6c8bdd9edd1b1966c0e260c0c01
src/permission.js
@@ -19,8 +19,7 @@
  // determine whether the user has logged in
  // const hasToken = getToken()
  // const hasToken = getCookie('admin')
  const hasToken = store.state.app.isGoToIndex
  const hasToken = getCookie('admin')
  if (hasToken) {
    if (to.path === '/login') {
      // if is logged in, redirect to the home page