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

Ant Design Pro 如何动态修改路由配置文件config/router.config.js #2839

Closed
csdwd opened this issue Nov 13, 2018 · 3 comments
Closed

Comments

@csdwd
Copy link

csdwd commented Nov 13, 2018

Ant Design Pro 如何实现登录成功后从后台获取路由配置文件
及如何动态修改 config/router.config.js 里的配置文件, 在登录成功后, 从后台获取到用户对应的路由信息和权限
因为在路由中实现了用户权限判断, 由于权限类别太多, 无法从前端进行管理

@csdwd csdwd changed the title Ant Design Pro 如何实现登录成功后从后台获取路由配置文件 Ant Design Pro 如何动态修改路由配置文件config/router.config.js Nov 13, 2018
@chenshuai2144
Copy link
Collaborator

router.config.js 在服务器生成现在是做不到的。因为 router 还要设置加载哪些文件。

@csdwd
Copy link
Author

csdwd commented Nov 14, 2018

@chenshuai2144router.config.js中的 authority 字段是否可以根据后台的数据动态修改呢?

@chenshuai2144
Copy link
Collaborator

你可以自己写一个逻辑出来,现在的逻辑默认是通过,你可以默认是不通过

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