loulijun2021
2023-05-31 f3c578b9ed1d5f6b6271d3c03f9d30352a9c2c2c
src/permission.js
@@ -8,7 +8,7 @@
NProgress.configure({ showSpinner: false }) // NProgress Configuration
const whiteList = ['/login', '/zhkb', '/ckgl', '/cgdd', '/bzcj', '/dccj', '/zpcj', '/back'] // no redirect whitelist
const whiteList = ['/login', '/zhkb', '/ckgl', '/cgdd', '/back'] // no redirect whitelist
router.beforeEach(async(to, from, next) => {
  // start progress bar
@@ -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