loulijun2021
2022-12-06 8be7af61c56cd7be6590dcf89dcaa11b419a582e
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', '/zhkbc', '/ckgl', '/cgdd', '/back', '/zngc'] // no redirect whitelist
router.beforeEach(async(to, from, next) => {
  // start progress bar
@@ -19,7 +19,8 @@
  // determine whether the user has logged in
  // const hasToken = getToken()
  const hasToken = getCookie('admin')
  // const hasToken = getCookie('admin')
  const hasToken = store.state.app.isGoToIndex
  if (hasToken) {
    if (to.path === '/login') {
      // if is logged in, redirect to the home page