diff --git a/jero-web/src/permission.js b/jero-web/src/permission.js index 419112d34..ed185df30 100644 --- a/jero-web/src/permission.js +++ b/jero-web/src/permission.js @@ -51,7 +51,7 @@ router.beforeEach((to, from, next) => { })*/ // query: { redirect: to.fullPath } store.dispatch('Logout').then(() => { - next({ path: '/user/login', }) + next({ path: '/user/login', query: { redirect: to.fullPath } }) }) }) } else { @@ -63,8 +63,8 @@ router.beforeEach((to, from, next) => { // 在免登录白名单,直接进入 next() } else { - //query: { redirect: to.fullPath } - next({ path: '/user/login', }) + + next({ path: '/user/login', query: { redirect: to.fullPath } }) NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it } }