文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit 7595ac07 by 安博

update readme.md

parent f5c5693b
...@@ -910,7 +910,7 @@ cookie可以设置过期方式与过期时间字段。 ...@@ -910,7 +910,7 @@ cookie可以设置过期方式与过期时间字段。
6.3          ant框架中的权限控制 6.3          ant框架中的权限控制
------ ------
###6.3.1          权限类型 ### 6.3.1          权限类型
框架默认的权限类型包括三种: 框架默认的权限类型包括三种:
`admin` `user` `guest` `admin` `user` `guest`
...@@ -942,7 +942,7 @@ cookie可以设置过期方式与过期时间字段。 ...@@ -942,7 +942,7 @@ cookie可以设置过期方式与过期时间字段。
}); });
}, },
``` ```
###6.3.2          登录登出 ### 6.3.2          登录登出
model文件夹下有一个`login.js`,其中引入了api中的`fakeAccountLogin`,它调用的API就是上述代码段。 model文件夹下有一个`login.js`,其中引入了api中的`fakeAccountLogin`,它调用的API就是上述代码段。
``` ```
import { routerRedux } from 'dva/router'; import { routerRedux } from 'dva/router';
...@@ -1004,7 +1004,7 @@ const renderAuthorize = currentAuthority => { ...@@ -1004,7 +1004,7 @@ const renderAuthorize = currentAuthority => {
``` ```
刷新权限后,通过`routerRedux.push('/')`跳转页面到首页。 刷新权限后,通过`routerRedux.push('/')`跳转页面到首页。
类似的,`login.js`中的`logout`方法会刷新权限为`guest`,然后跳转到登录页。 类似的,`login.js`中的`logout`方法会刷新权限为`guest`,然后跳转到登录页。
###6.3.3          页面访问控制 ### 6.3.3          页面访问控制
页面权限检查的功能实现在`Authorized`组件中 页面权限检查的功能实现在`Authorized`组件中
``` ```
render() { render() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment