|
@@ -5,6 +5,7 @@ import store from './store'
|
|
|
import NProgress from 'nprogress' // progress bar
|
|
|
import 'nprogress/nprogress.css' // progress bar style
|
|
|
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 }) // NProgress Configuration
|
|
@@ -13,7 +14,7 @@ const whiteList = ['login', 'register', 'registerResult'] // no redirect whiteli
|
|
|
|
|
|
router.beforeEach((to, from, next) => {
|
|
|
NProgress.start() // start progress bar
|
|
|
-
|
|
|
+ to.meta && (typeof to.meta.title !== 'undefined' && setDocumentTitle(`${to.meta.title} - ${domTitle}`))
|
|
|
if (Vue.ls.get(ACCESS_TOKEN)) {
|
|
|
/* has token */
|
|
|
if (to.path === '/user/login') {
|