|
@@ -18,8 +18,8 @@ router.beforeEach((to, from, next) => {
|
|
|
to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
|
|
to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
|
|
|
/* has token*/
|
|
/* has token*/
|
|
|
if (to.path === '/login') {
|
|
if (to.path === '/login') {
|
|
|
- // next({ path: '/' })
|
|
|
|
|
- next({ path: '/newpage' })
|
|
|
|
|
|
|
+ next({ path: '/' })
|
|
|
|
|
+ // next({ path: '/newpage' })
|
|
|
NProgress.done()
|
|
NProgress.done()
|
|
|
} else {
|
|
} else {
|
|
|
if (store.getters.roles.length === 0) {
|
|
if (store.getters.roles.length === 0) {
|
|
@@ -35,8 +35,8 @@ router.beforeEach((to, from, next) => {
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
store.dispatch('LogOut').then(() => {
|
|
store.dispatch('LogOut').then(() => {
|
|
|
Message.error(err)
|
|
Message.error(err)
|
|
|
- // next({ path: '/' })
|
|
|
|
|
- next({ path: '/newpage' })
|
|
|
|
|
|
|
+ next({ path: '/' })
|
|
|
|
|
+ // next({ path: '/newpage' })
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|