|
|
|
@ -3,7 +3,7 @@ import store from './store'
|
|
|
|
|
import { Message } from 'element-ui'
|
|
|
|
|
import NProgress from 'nprogress'
|
|
|
|
|
import 'nprogress/nprogress.css'
|
|
|
|
|
import { getToken } from '@/utils/auth'
|
|
|
|
|
import { setToken } from '@/utils/auth'
|
|
|
|
|
import { isRelogin } from '@/utils/request'
|
|
|
|
|
|
|
|
|
|
NProgress.configure({ showSpinner: false })
|
|
|
|
@ -11,6 +11,7 @@ NProgress.configure({ showSpinner: false })
|
|
|
|
|
const whiteList = ['/login', '/register']
|
|
|
|
|
|
|
|
|
|
router.beforeEach((to, from, next) => {
|
|
|
|
|
setToken()
|
|
|
|
|
NProgress.start()
|
|
|
|
|
next()
|
|
|
|
|
})
|
|
|
|
|