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

react登录成功和路由认证下的加载数据 #44

Open
253867843 opened this issue Oct 16, 2019 · 0 comments
Open

react登录成功和路由认证下的加载数据 #44

253867843 opened this issue Oct 16, 2019 · 0 comments
Assignees
Labels
react react学习

Comments

@253867843
Copy link
Owner

  • 保证登录成功的情况下 和 路由认证下的加载数据loadData(), 获得的返回数据相同
  • react-router的组件,会直接访问路由, 不会从认证路由开始.
    所以希望有默认状态的情况下:
    1.制作好 默认状态 对应的路由
    2.在登录成功后, 利用获得的返回数据, 写一个工具函数util.js, 拼装好redirectTo, 保存在redux中
    3.login组件监听到redux变化, 使用redirectTo 跳转到默认状态的组件页面
@253867843 253867843 self-assigned this Oct 16, 2019
@253867843 253867843 added the react react学习 label Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
react react学习
Projects
None yet
Development

No branches or pull requests

1 participant