|
|
@ -6,6 +6,8 @@ const managerPath = ['/stat/list','/user/list','/role/list'] // 管理员才能 |
|
|
|
|
|
|
|
|
|
|
|
router.beforeEach((to, from, next) => { |
|
|
|
router.beforeEach((to, from, next) => { |
|
|
|
document.title = Setting.titleSuffix |
|
|
|
document.title = Setting.titleSuffix |
|
|
|
|
|
|
|
const user = store.state.user |
|
|
|
|
|
|
|
JSON.stringify(user) == '{}' && util.local.clear() |
|
|
|
const role = util.local.get(Setting.tokenKey) |
|
|
|
const role = util.local.get(Setting.tokenKey) |
|
|
|
if (!role && to.path !== '/login' && to.path !== '/index/list') { |
|
|
|
if (!role && to.path !== '/login' && to.path !== '/index/list') { |
|
|
|
next('/index/list') |
|
|
|
next('/index/list') |
|
|
|