|
|
@ -18,8 +18,8 @@ router.beforeEach((to, from, next) => { |
|
|
|
if (getToken()) { |
|
|
|
if (getToken()) { |
|
|
|
to.meta.title && useSettingsStore().setTitle(to.meta.title) |
|
|
|
to.meta.title && useSettingsStore().setTitle(to.meta.title) |
|
|
|
/* has token*/ |
|
|
|
/* has token*/ |
|
|
|
if (to.path === '/login') { |
|
|
|
if (to.path === '/'|| to.path==='/login') { |
|
|
|
next({ path: '/' }) |
|
|
|
next({ path: 'bigview' }) |
|
|
|
NProgress.done() |
|
|
|
NProgress.done() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (useUserStore().roles.length === 0) { |
|
|
|
if (useUserStore().roles.length === 0) { |
|
|
|