Parcourir la source

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

yuhan il y a 2 mois
Parent
commit
f068aef060
1 fichiers modifiés avec 8 ajouts et 4 suppressions
  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
       }
     }