loulijun2021
2023-05-06 7bfa4e0bbad8d1cbff5b60605b4d46c71138a3f3
src/permission.js
@@ -8,7 +8,7 @@
NProgress.configure({ showSpinner: false }) // NProgress Configuration
const whiteList = ['/login', '/zhkb', '/cjsc', '/cjzl'] // no redirect whitelist
const whiteList = ['/login', '/zhkb', '/cjsc', '/cjzl', '/cgdd', '/ckgl'] // no redirect whitelist
router.beforeEach(async(to, from, next) => {
  // start progress bar
@@ -19,7 +19,7 @@
  // determine whether the user has logged in
  // const hasToken = getToken()
  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