Explorar el Código

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

yuhan hace 2 meses
padre
commit
f068aef060
Se han modificado 1 ficheros con 8 adiciones y 4 borrados
  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
       }
     }