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

login路由下按需加载出现闪屏 #479

Closed
yangbin1994 opened this issue Aug 4, 2017 · 2 comments
Closed

login路由下按需加载出现闪屏 #479

yangbin1994 opened this issue Aug 4, 2017 · 2 comments

Comments

@yangbin1994
Copy link
Contributor

No description provided.

@yangbin1994 yangbin1994 changed the title login login路由下按需加载出现闪屏 Aug 4, 2017
@chenkang084
Copy link
Contributor

@yangbin1994
我在我自己fork的分支里面已经fixed 了这个问题。请参考 https://github.com/chenkang084/antd-admin/blob/master/src/models/app.js#L67
问题原因:由于 subscriptions 中异步去查询,如果后台返回比较慢,这个时候页面其实已经渲染完毕了,然后,返回解决回来之后,又重新 direct 到 login page 造成页面闪烁。
解决办法:加了一个loading,等待 请求回来,如果没有权限,跳转到login页面,如果有权限,跳到dashboard页面。

@superlbr
Copy link
Collaborator

fixed in 08f40ef

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

3 participants