|
|
@ -8,30 +8,6 @@ const { Meta } = Card; |
|
|
|
|
|
|
|
const UserCenter = (props) => { |
|
|
|
const { dispatch, actions, user, loading, socket } = props |
|
|
|
useEffect(() => { |
|
|
|
console.log('user',user); |
|
|
|
// ACTION 示例 |
|
|
|
// dispatch(actions.example.getMembers(user.orgId)) |
|
|
|
}, []) |
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
// ACTION 示例 |
|
|
|
// dispatch(actions.example.getMembers(user.orgId)) |
|
|
|
}) |
|
|
|
|
|
|
|
// websocket 使用测试 |
|
|
|
// useEffect(() => { |
|
|
|
// console.log(socket) |
|
|
|
// if (socket) { |
|
|
|
// socket.on('TEST', function (msg) { |
|
|
|
// console.info(msg); |
|
|
|
// }); |
|
|
|
// return () => { |
|
|
|
// socket.off("TEST"); |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
// }, [socket]) |
|
|
|
|
|
|
|
return ( |
|
|
|
<> |
|
|
@ -56,8 +32,8 @@ const UserCenter = (props) => { |
|
|
|
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>USER CENTER</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style={{ marginTop: 42,marginLeft:70 }}> |
|
|
|
<Avatar size="large" style={{ margin: 4,cursor:'default' }} color="light-blue" alt='User'> |
|
|
|
<div style={{ marginTop: 42, marginLeft: 70 }}> |
|
|
|
<Avatar size="large" style={{ margin: 4, cursor: 'default' }} color="light-blue" alt='User'> |
|
|
|
{user.name.split('')[0]} |
|
|
|
</Avatar> |
|
|
|
</div> |
|
|
@ -71,11 +47,7 @@ const UserCenter = (props) => { |
|
|
|
function mapStateToProps (state) { |
|
|
|
const { auth, global, members, webSocket } = state; |
|
|
|
return { |
|
|
|
// loading: members.isRequesting, |
|
|
|
user: auth.user, |
|
|
|
// actions: global.actions, |
|
|
|
// members: members.data, |
|
|
|
// socket: webSocket.socket |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|