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

fix: repair login about redirect query #3592

Merged
merged 3 commits into from
Feb 11, 2024

Conversation

xachary
Copy link

@xachary xachary commented Feb 2, 2024

General

根据反馈 #3588 重现问题,根源:
src\store\modules\user.ts 重复并提前执行了 permissionStore.setDynamicAddedRoute(true),导致 src\router\guard\permissionGuard.ts 无法通过到逻辑最后(不知道理解的对不对,测试通过部分场景)。
另外,目前登出均为 logout(true),理应区分”主动“和”被动“两种场景,”主动“不带 redirect 回到登陆页,”被动“带。

  • Pull request template structure not broken

Type

ℹ️ What types of changes does your code introduce?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

ℹ️ Check all checkboxes - this will indicate that you have done everything in accordance with the rules in CONTRIBUTING.

  • My code follows the style guidelines of this project
  • Is the code format correct
  • Is the git submission information standard?
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@xachary xachary mentioned this pull request Feb 2, 2024
@imdap
Copy link
Contributor

imdap commented Feb 2, 2024

在后台路由模式下 登录操作会执行两次buildRoutesAction()

// Permission mode
permissionMode: PermissionModeEnum.BACK,

image
image

@xachary
Copy link
Author

xachary commented Feb 3, 2024

@dapeng0201 有道理,试试最新这个

@imdap
Copy link
Contributor

imdap commented Feb 3, 2024

@dapeng0201 有道理,试试最新这个
测试正常(后台路由) 被动退出登录也能正常redirect
但是redirect如果是一个不存在的路由(用户输入) 界面会卡死且没有报错信息 这个有办法判断直接跳到首页吗
image

@xachary
Copy link
Author

xachary commented Feb 3, 2024

@dapeng0201 666,again

@imdap
Copy link
Contributor

imdap commented Feb 3, 2024

@dapeng0201 666,again

ok了 在前端/后端路由都正常 包括

  • 被动退出登录带redirect 重新登录跳转到对应页面
  • 主动退出登录不带redirect 重新登录跳转到首页
  • redirect为不存在的路径 重新登录跳转到首页

@jinmao88 jinmao88 merged commit 236ddf3 into vbenjs:main Feb 11, 2024
2 checks passed
@chenhw chenhw mentioned this pull request Feb 27, 2024
3 tasks
@vbenjs vbenjs locked and limited conversation to collaborators Aug 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants