Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ant-design-pro
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
安博
ant-design-pro
Commits
7595ac07
Commit
7595ac07
authored
Jun 05, 2018
by
安博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update readme.md
parent
f5c5693b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
README.md
README.md
+3
-3
No files found.
README.md
View file @
7595ac07
...
...
@@ -910,7 +910,7 @@ cookie可以设置过期方式与过期时间字段。
6.
3 ant框架中的权限控制
------
###6.3.1 权限类型
###
6.3.1 权限类型
框架默认的权限类型包括三种:
`admin`
`user`
`guest`
...
...
@@ -942,7 +942,7 @@ cookie可以设置过期方式与过期时间字段。
});
},
```
###6.3.2 登录登出
###
6.3.2 登录登出
model文件夹下有一个
`login.js`
,其中引入了api中的
`fakeAccountLogin`
,它调用的API就是上述代码段。
```
import { routerRedux } from 'dva/router';
...
...
@@ -1004,7 +1004,7 @@ const renderAuthorize = currentAuthority => {
```
刷新权限后,通过
`routerRedux.push('/')`
跳转页面到首页。
类似的,
`login.js`
中的
`logout`
方法会刷新权限为
`guest`
,然后跳转到登录页。
###6.3.3 页面访问控制
###
6.3.3 页面访问控制
页面权限检查的功能实现在
`Authorized`
组件中
```
render() {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment