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