Ant-design-pro: 如何把登陆作为启动页面

Created on 16 May 2018  ·  9Comments  ·  Source: ant-design/ant-design-pro

刚开始了解ant-design-pro,望给出一些帮助

Most helpful comment

1。clone代码
2。按如下路径寻找文件ant-design-pro/src/utils/authority.js
3。右键edit with notepad
4。找到第三行

第一行:   // use localStorage to store the authority info, which might be sent from server in actual project.
第二行:   export function getAuthority() {
第三行:     return localStorage.getItem('antd-pro-authority') || 'admin';
第四行:   }

5。删除||'admin'

All 9 comments

Translation of this issue:


How to use login as startup page

Just started to understand ant-design-pro, hope to give some help

把默认的admin权限去掉

能麻烦书的详细点吗, @pkaq ,谢谢

1。clone代码
2。按如下路径寻找文件ant-design-pro/src/utils/authority.js
3。右键edit with notepad
4。找到第三行

第一行:   // use localStorage to store the authority info, which might be sent from server in actual project.
第二行:   export function getAuthority() {
第三行:     return localStorage.getItem('antd-pro-authority') || 'admin';
第四行:   }

5。删除||'admin'

恩恩, 很感谢

去掉admin 之后 ,连接后台数据 ,密码正确也登录不进去页面 需要怎么修改?

这个问题解决了吗?应该怎么设置登录页为默认页呀?

ant-design-pro/src/utils/authority.js, 这个文件下的admin权限取消了吗

可以了,之前注释了一行代码,谢谢了

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jerry-goodboy picture Jerry-goodboy  ·  3Comments

yaoleiroyal picture yaoleiroyal  ·  3Comments

lvzheng0404 picture lvzheng0404  ·  3Comments

RichardStark picture RichardStark  ·  3Comments

yjz1004 picture yjz1004  ·  3Comments