|
@@ -7,13 +7,15 @@ import '@/components/NProgress/nprogress.less'
|
|
import notification from 'ant-design-vue/es/notification'
|
|
import notification from 'ant-design-vue/es/notification'
|
|
import { setDocumentTitle, domTitle } from '@/utils/domUtil'
|
|
import { setDocumentTitle, domTitle } from '@/utils/domUtil'
|
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
|
-
|
|
+import versionTood from '@/libs/versionUpdate'
|
|
NProgress.configure({ showSpinner: false })
|
|
NProgress.configure({ showSpinner: false })
|
|
|
|
|
|
const whiteList = ['login', 'register', 'registerResult']
|
|
const whiteList = ['login', 'register', 'registerResult']
|
|
const defaultRoutePath = '/home'
|
|
const defaultRoutePath = '/home'
|
|
|
|
|
|
router.beforeEach((to, from, next) => {
|
|
router.beforeEach((to, from, next) => {
|
|
|
|
+
|
|
|
|
+ versionTood.isNewVersion()
|
|
NProgress.start()
|
|
NProgress.start()
|
|
to.meta && (typeof to.meta.title !== 'undefined' && setDocumentTitle(`${to.meta.title} - ${domTitle}`))
|
|
to.meta && (typeof to.meta.title !== 'undefined' && setDocumentTitle(`${to.meta.title} - ${domTitle}`))
|
|
let token = store.state.user.token || sessionStorage.getItem(ACCESS_TOKEN)
|
|
let token = store.state.user.token || sessionStorage.getItem(ACCESS_TOKEN)
|