瀏覽代碼

重登录时跳转联锁总表而不是上一次

yuhan 1 周之前
父節點
當前提交
f068aef060
共有 1 個文件被更改,包括 8 次插入4 次删除
  1. 8 4
      src/permission.js

+ 8 - 4
src/permission.js

@@ -73,7 +73,8 @@ router.beforeEach((to, from, next) => {
               description: '请求用户信息失败,请重试!'
             })*/
             store.dispatch('Logout').then(() => {
-              next({ path: '/user/login', query: { redirect: to.fullPath } })
+              next({ path: '/user/login' })
+              // next({ path: '/user/login', query: { redirect: to.fullPath } })
             })
           })
         } else {
@@ -118,7 +119,8 @@ router.beforeEach((to, from, next) => {
       } else {
         // 如果当前是在OAuth2APP环境,就跳转到OAuth2登录页面
         let path = isOAuth2AppEnv() ? OAUTH2_LOGIN_PAGE_PATH : '/user/login'
-        next({ path: path, query: { redirect: to.fullPath } })
+        next({ path: path })
+        // next({ path: path, query: { redirect: to.fullPath } })
         NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
       }
     })
@@ -160,7 +162,8 @@ router.beforeEach((to, from, next) => {
                 description: '请求用户信息失败,请重试!'
               })*/
               store.dispatch('Logout').then(() => {
-                next({ path: '/user/login', query: { redirect: to.fullPath } })
+                next({ path: '/user/login' })
+                // next({ path: '/user/login', query: { redirect: to.fullPath } })
               })
             })
         } else {
@@ -202,7 +205,8 @@ router.beforeEach((to, from, next) => {
       } else {
         // 如果当前是在OAuth2APP环境,就跳转到OAuth2登录页面
         let path = isOAuth2AppEnv() ? OAUTH2_LOGIN_PAGE_PATH : '/user/login'
-        next({ path: path, query: { redirect: to.fullPath } })
+        next({ path: path })
+        // next({ path: path, query: { redirect: to.fullPath } })
         NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
       }
     }