1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-09-08 21:01:22 +08:00
This commit is contained in:
Pan 2019-04-15 11:48:29 +08:00
parent 4fe71cb295
commit f36b190e89

View File

@ -13,9 +13,10 @@ const whiteList = ['/login', '/auth-redirect'] // no redirect whitelist
router.beforeEach(async(to, from, next) => {
// start progress bar
NProgress.start()
if (to.meta.title) {
document.title = getPageTitle(to.meta.title)
}
// set page title
document.title = getPageTitle(to.meta.title)
// determine whether the user has logged in
const hasToken = getToken()