Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

提一个bug, 切换用户后登陆成功直接路由404页面 #15

Open
qiqingfu opened this issue Sep 11, 2019 · 2 comments
Open

提一个bug, 切换用户后登陆成功直接路由404页面 #15

qiqingfu opened this issue Sep 11, 2019 · 2 comments

Comments

@qiqingfu
Copy link

qiqingfu commented Sep 11, 2019

重现步骤:

  1. 先登陆 admin管理员账号
  2. 访问路由, 权限许可/权限设置
  3. 用户-登出
  4. 输入 user进行登陆
  5. 登陆成功
  6. 导航404页面

可能造成的原因:

  1. 登陆的是管理员账号, 管理员有权限访问 权限许可/权限设置 路由
  2. 登出的时候, 路由导航到 /login的时候, 路由的查询参数 redirect: router.currentRoute.fullPath保存了当前解析的 URL /permission/roles
  3. user 用户登陆, 登陆成功之后进行导航, 而它并没有访问 /permission/roles 路由的权限, 导致直接登陆 404
@gcddblue
Copy link
Owner

你分析的原因很正确,那解决方案就是 登出之后redirect:'/',让每次登陆都跳回到dashboard首页

@qiqingfu
Copy link
Author

@gcddblue 可以

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants