diff --git a/frontend/src/layout/components/Topbar.vue b/frontend/src/layout/components/Topbar.vue index 0eca5b451d..29ce410ffb 100644 --- a/frontend/src/layout/components/Topbar.vue +++ b/frontend/src/layout/components/Topbar.vue @@ -365,7 +365,7 @@ export default { if (result !== 'success' && result !== 'fail') { window.location.href = result } else { - this.$router.push('/login') + this.$router.push(`/login?redirect=${this.$route.fullPath}`) } }, loadUiInfo() { diff --git a/frontend/src/permission.js b/frontend/src/permission.js index ba89f734a7..c5961184b6 100644 --- a/frontend/src/permission.js +++ b/frontend/src/permission.js @@ -53,7 +53,7 @@ const routeBefore = (callBack) => { callBack() } } -router.beforeEach(async(to, from, next) => routeBefore(() => { +router.beforeEach(async (to, from, next) => routeBefore(() => { // start progress bar NProgress.start() const mobileIgnores = ['/delink'] @@ -118,8 +118,7 @@ router.beforeEach(async(to, from, next) => routeBefore(() => { next() } else { // other pages that do not have permission to access are redirected to the login page. - // next(`/login?redirect=${to.path}`) - next('/login') + next(`/login?redirect=${to.path}`) NProgress.done() } }