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