change page title

This commit is contained in:
非空
2019-04-15 10:29:29 +08:00
committed by GitHub
parent 42b42a5e1c
commit 48dc9c66d7

View File

@@ -12,7 +12,9 @@ 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 = to.meta.title
}
// determine whether the user has logged in
const hasToken = getToken()