lixuliang
2024-08-29 11cd6f4d30fbae557d18aaa44afc0b32de54ad32
se-ui/src/permission.js
@@ -32,11 +32,12 @@
            next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
          })
        }).catch(err => {
            store.dispatch('LogOut').then(() => {
              Message.error(err)
              next({ path: '/' })
            })
          store.dispatch('LogOut').then(() => {
            Message.error(err)
            window.location.href = window.location.origin + '/sso/login'
            // next({ path: '/' })
          })
        })
      } else {
        next()
      }
@@ -47,7 +48,8 @@
      // 在免登录白名单,直接进入
      next()
    } else {
      next(`/login?redirect=${encodeURIComponent(to.fullPath)}`) // 否则全部重定向到登录页
      // next(`/login?redirect=${encodeURIComponent(to.fullPath)}`) // 否则全部重定向到登录页
      window.location.href = window.location.origin + '/sso/login'
      NProgress.done()
    }
  }