diff --git a/src/permission.js b/src/permission.js index 4bd390c..5a345e7 100644 --- a/src/permission.js +++ b/src/permission.js @@ -21,7 +21,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: '/sloworder/index' }) NProgress.done() } else if (isWhiteList(to.path)) { next() @@ -39,7 +39,7 @@ router.beforeEach((to, from, next) => { }).catch(err => { store.dispatch('LogOut').then(() => { Message.error(err) - next({ path: '/' }) + next({ path: '/sloworder/index' }) }) }) } else { diff --git a/src/router/index.js b/src/router/index.js index 626e931..84e46eb 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -64,7 +64,7 @@ export const constantRoutes = [ { path: '', component: Layout, - redirect: 'index', + redirect: '/sloworder/index', children: [ { path: 'index', diff --git a/src/views/login.vue b/src/views/login.vue index 5308f04..920f85f 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -142,7 +142,7 @@ export default { Cookies.remove('rememberMe') } this.$store.dispatch("Login", this.loginForm).then(() => { - this.$router.push({ path: this.redirect || "/order/list" }).catch(()=>{}) + this.$router.push({ path: this.redirect || "/sloworder/index" }).catch(()=>{}) }).catch(() => { this.loading = false if (this.captchaEnabled) {