lilei 3 år sedan
förälder
incheckning
db59cc459a
1 ändrade filer med 6 tillägg och 3 borttagningar
  1. 6 3
      src/permission.js

+ 6 - 3
src/permission.js

@@ -32,7 +32,8 @@ router.beforeEach((to, from, next) => {
         store.dispatch('SetInfo', userInfo)
       } else {
         store.dispatch('Logout').then(() => {
-          next({ path: '/user/login', query: { redirect: to.fullPath } })
+          // next({ path: '/user/login', query: { redirect: to.fullPath } })
+          next({ path: '/user/login' })
         })
       }
       console.log(store.getters.roles)
@@ -45,7 +46,8 @@ router.beforeEach((to, from, next) => {
             if (roles.permissionList.length == 0 || !roles) {
               store.dispatch('Logout').then(() => {
                 store.dispatch('ResetRoutes').then(() => {
-                  next({ path: '/user/login', query: { redirect: to.fullPath } })
+                  // next({ path: '/user/login', query: { redirect: to.fullPath } })
+                  next({ path: '/user/login' })
                 })
               })
             } else {
@@ -70,7 +72,8 @@ router.beforeEach((to, from, next) => {
               description: '请求用户信息失败,请重试'
             })
             store.dispatch('Logout').then(() => {
-              next({ path: '/user/login', query: { redirect: to.fullPath } })
+              // next({ path: '/user/login', query: { redirect: to.fullPath } })
+              next({ path: '/user/login' })
             })
           })
       } else {