|
@@ -5,6 +5,7 @@ import store from './store'
|
|
|
import NProgress from 'nprogress'
|
|
|
import 'nprogress/nprogress.css'
|
|
|
import notification from 'ant-design-vue/es/notification'
|
|
|
+import { setDocumentTitle, domTitle } from '@/utils/domUtil'
|
|
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
|
|
|
|
|
NProgress.configure({ showSpinner: false })
|
|
@@ -13,7 +14,7 @@ const whiteList = ['login', 'register', 'registerResult']
|
|
|
|
|
|
router.beforeEach((to, from, next) => {
|
|
|
NProgress.start()
|
|
|
-
|
|
|
+ to.meta && (typeof to.meta.title !== 'undefined' && setDocumentTitle(`${to.meta.title} - ${domTitle}`))
|
|
|
if (Vue.ls.get(ACCESS_TOKEN)) {
|
|
|
|
|
|
if (to.path === '/user/login') {
|