WangHan
2024-12-19 ed6c6350015d52ea1cb033c7558f72b721ece84a
admin-web/src/permission.js
@@ -1,9 +1,9 @@
import router from './router';
import store from './store';
import { Message } from 'element-ui';
import {Message} from 'element-ui';
import NProgress from 'nprogress'; // progress bar
import 'nprogress/nprogress.css'; // progress bar style
import { getToken, getCPass } from '@/utils/auth'; // get token from cookie
import {getToken} from '@/utils/auth'; // get token from cookie
import getPageTitle from '@/utils/get-page-title';
NProgress.configure({ showSpinner: false }); // NProgress Configuration
@@ -23,7 +23,9 @@
  if (hasToken) {
    if (to.path === '/login') {
      // if is logged in, redirect to the home page
      next({ path: '/' });
      // next({ path: '/' });
      next();
      NProgress.done();
    }else if( to.path === '/resetPwd'){
      next();