| | |
| | | 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 |
| | |
| | | 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(); |