| | |
| | | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| | | */ |
| | | import router from './router' |
| | | import { ElMessage } from 'element-plus' |
| | | import NProgress from 'nprogress' |
| | | import 'nprogress/nprogress.css' |
| | | import { getToken } from '@/utils/auth' |
| | | import useSettingsStore from '@/store/modules/settings' |
| | | import usePermissionStore from '@/store/modules/permission' |
| | | |
| | | NProgress.configure({ showSpinner: false }); |
| | | |
| | |
| | | NProgress.start() |
| | | if (getToken()) { |
| | | to.meta.title && useSettingsStore().setTitle(to.meta.title) |
| | | console.log(20,to.meta.title) |
| | | /* has token*/ |
| | | if (to.path === '/login') { |
| | | next({ path: '/overview' }) |