|
@@ -8,7 +8,7 @@ import { isRelogin } from '@/utils/request'
|
|
|
|
|
|
NProgress.configure({ showSpinner: false })
|
|
|
|
|
|
-const whiteList = ['/login', '/auth-redirect', '/bind', '/register','/screen','/pad','/index']
|
|
|
+const whiteList = ['/login', '/auth-redirect', '/bind', '/register','/screen','/pad']
|
|
|
|
|
|
router.beforeEach((to, from, next) => {
|
|
|
NProgress.start()
|
|
@@ -16,7 +16,7 @@ router.beforeEach((to, from, next) => {
|
|
|
to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
|
|
|
/* has token*/
|
|
|
if (to.path === '/login') {
|
|
|
- next({ path: '/' })
|
|
|
+ next({ path: '/index' })
|
|
|
NProgress.done()
|
|
|
} else {
|
|
|
if (store.getters.roles.length === 0) {
|
|
@@ -32,7 +32,7 @@ router.beforeEach((to, from, next) => {
|
|
|
}).catch(err => {
|
|
|
store.dispatch('LogOut').then(() => {
|
|
|
Message.error(err)
|
|
|
- next({ path: '/' })
|
|
|
+ next({ path: '/login' })
|
|
|
})
|
|
|
})
|
|
|
} else {
|