Commit 58bd0ef9 authored by cellee's avatar cellee

翻页带小区、头部显示登陆姓名

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 8031fe53
......@@ -34,9 +34,14 @@ class AvatarDropdown extends React.Component<GlobalHeaderRightProps> {
currentUser = {
avatar: 'http://120.77.240.215:5205/file/ce90a1cd01cf4c2bb6ab12b295c25c16.png',
name: 'Login Again Please',
userModel: {
tosAccountName: 'Tos',
},
},
} = this.props;
console.log(currentUser);
const menuHeaderDropdown = (
<Menu className={styles.menu} selectedKeys={[]} onClick={this.onMenuClick}>
<Menu.Item key="logout">
......@@ -50,7 +55,9 @@ class AvatarDropdown extends React.Component<GlobalHeaderRightProps> {
<HeaderDropdown overlay={menuHeaderDropdown}>
<span className={`${styles.action} ${styles.account}`}>
<Avatar size="small" className={styles.avatar} src={currentUser.avatar} alt="avatar" />
<span className={styles.name}>{currentUser.name}</span>
<span className={styles.name}>
{currentUser.userModel ? currentUser.userModel.tosAccountName : 'Tos'}
</span>
</span>
</HeaderDropdown>
);
......
......@@ -220,7 +220,9 @@ const FacilityBookings = (props: any) => {
pageNum: current,
subscribeDate: curString.subscribeDate,
status: curString.status,
communityNameList: curString.communityNameList,
communityNameList: curString.communityNameList
? curString.communityNameList
: JSON.parse(localStorage.getItem('CommunityList') as any),
});
} else {
var tmp = curString;
......@@ -230,7 +232,9 @@ const FacilityBookings = (props: any) => {
RA(8, {
userToken: token,
pageNum: current,
communityNameList: curString.communityNameList,
communityNameList: curString.communityNameList
? curString.communityNameList
: JSON.parse(localStorage.getItem('CommunityList') as any),
});
} else {
RA(8, { userToken: token, pageNum: current });
......
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