From 61464964df89496e07444a56a5510c542bcc2c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=96=BB=E5=B8=8C=E9=87=8C?= Date: Wed, 11 Oct 2017 11:03:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20user=E9=A1=B5=E5=8E=BB=E9=99=A4subnav?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Header/Header.js | 17 ++++++++++++++--- .../containers/Group/MemberList/MemberList.js | 4 ++-- .../containers/Group/MemberList/MemberList.scss | 4 ++++ client/containers/User/List.js | 1 - client/containers/User/User.js | 15 --------------- 5 files changed, 20 insertions(+), 21 deletions(-) diff --git a/client/components/Header/Header.js b/client/components/Header/Header.js index 12de22a6..e04c8158 100755 --- a/client/components/Header/Header.js +++ b/client/components/Header/Header.js @@ -18,7 +18,13 @@ const MenuUser = (props) => ( 个人中心 - + { + props.role === "admin"? + 用户管理 + :"" + } + + 退出 @@ -40,6 +46,7 @@ const tipDoc = (
MenuUser.propTypes={ user: PropTypes.string, msg: PropTypes.string, + role: PropTypes.string, uid: PropTypes.number, relieveLink: PropTypes.func, logout: PropTypes.func @@ -106,6 +113,7 @@ const ToolUser = (props)=> { user={props.user} msg={props.msg} uid={props.uid} + role={props.role} relieveLink={props.relieveLink} logout={props.logout} /> @@ -125,6 +133,7 @@ const ToolUser = (props)=> { ToolUser.propTypes={ user: PropTypes.string, msg: PropTypes.string, + role: PropTypes.string, uid: PropTypes.number, relieveLink: PropTypes.func, logout: PropTypes.func, @@ -141,6 +150,7 @@ ToolUser.propTypes={ user: state.user.userName, uid: state.user.uid, msg: null, + role: state.user.role, login:state.user.isLogin, studyTip: state.user.studyTip, study: state.user.study @@ -163,6 +173,7 @@ export default class HeaderCom extends Component { user: PropTypes.string, msg: PropTypes.string, uid: PropTypes.number, + role: PropTypes.string, login:PropTypes.bool, relieveLink:PropTypes.func, logoutActions:PropTypes.func, @@ -220,7 +231,7 @@ export default class HeaderCom extends Component { render () { - const { login, user, msg, uid, studyTip, study } = this.props; + const { login, user, msg, uid, role, studyTip, study } = this.props; return (
@@ -234,7 +245,7 @@ export default class HeaderCom extends Component {
0 ? 3 : 1}}> {login? diff --git a/client/containers/Group/MemberList/MemberList.js b/client/containers/Group/MemberList/MemberList.js index cc88f3a0..f4050f0c 100755 --- a/client/containers/Group/MemberList/MemberList.js +++ b/client/containers/Group/MemberList/MemberList.js @@ -247,13 +247,13 @@ class MemberList extends Component { onCancel={this.handleCancel} > -
用户名:
+
用户名:
-
权限:
+
权限: