|
@@ -5,6 +5,7 @@ import {
|
|
|
getToken,
|
|
|
setToken
|
|
|
} from './utils/auth'
|
|
|
+import progress from '@/utils/progress'
|
|
|
import store from './store'
|
|
|
import Vue from 'vue'
|
|
|
// 刷新token状态
|
|
@@ -32,6 +33,7 @@ router.beforeEach(async (to, from, next) => {
|
|
|
next('/')
|
|
|
return
|
|
|
}
|
|
|
+ progress.start()
|
|
|
|
|
|
try {
|
|
|
if (from.path !== '/login-local') {
|
|
@@ -59,6 +61,7 @@ router.beforeEach(async (to, from, next) => {
|
|
|
})
|
|
|
|
|
|
router.afterEach((to, from) => {
|
|
|
+ progress.done()
|
|
|
document.title = `${Vue.prototype.$DEFAULT_TITLE} ${to.meta.title ?? ''}`
|
|
|
})
|
|
|
|