|
|
@ -7,76 +7,48 @@ import PerfectScrollbar from "perfect-scrollbar"; |
|
|
|
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(() => { |
|
|
|
const { dispatch, actions, user, loading, socket } = props |
|
|
|
|
|
|
|
// 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 ( |
|
|
|
<> |
|
|
|
<div style={{ padding: '0px 40px' }}> |
|
|
|
{/* 头部 */} |
|
|
|
<div style={{ margin: '4px 0px 14px', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}> |
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}> |
|
|
|
<div style={{ color: '#4A4A4A', fontSize: 14 }}> |
|
|
|
HI,欢迎回来,行业服务部 |
|
|
|
</div> |
|
|
|
<div style={{ fontFamily: 'YouSheBiaoTiHei', fontSize: 20, color: '#005ABD', marginLeft: 4 }}> |
|
|
|
刘昊然! |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/* 主体 */} |
|
|
|
<div style={{ background: '#FFFFFF', boxShadow: '0px 0px 12px 2px rgba(220,222,224,0.2)', borderRadius: 2, paddingTop: 20, paddingLeft: 24 }}> |
|
|
|
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}> |
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}> |
|
|
|
<div style={{ width: 0, height: 20, borderLeft: '3px solid #005ABD', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div> |
|
|
|
<div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#101531', marginLeft: 8 }}>用户中心</div> |
|
|
|
<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'> |
|
|
|
{user.name.split('')[0]} |
|
|
|
</Avatar> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/* moment(row.createTime).format("YYYY-MM-DD HH:mm:ss") */} |
|
|
|
return ( |
|
|
|
<> |
|
|
|
<div style={{ padding: '0px 40px' }}> |
|
|
|
{/* 头部 */} |
|
|
|
<div style={{ margin: '4px 0px 14px', display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}> |
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}> |
|
|
|
<div style={{ color: '#4A4A4A', fontSize: 14 }}> |
|
|
|
HI,欢迎回来,行业服务部 |
|
|
|
</div> |
|
|
|
<div style={{ fontFamily: 'YouSheBiaoTiHei', fontSize: 20, color: '#005ABD', marginLeft: 4 }}> |
|
|
|
刘昊然! |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/* 主体 */} |
|
|
|
<div style={{ background: '#FFFFFF', boxShadow: '0px 0px 12px 2px rgba(220,222,224,0.2)', borderRadius: 2, paddingTop: 20, paddingLeft: 24 }}> |
|
|
|
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}> |
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}> |
|
|
|
<div style={{ width: 0, height: 20, borderLeft: '3px solid #005ABD', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div> |
|
|
|
<div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#101531', marginLeft: 8 }}>用户中心</div> |
|
|
|
<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'> |
|
|
|
{user.name.split('')[0]} |
|
|
|
</Avatar> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</> |
|
|
|
) |
|
|
|
{/* moment(row.createTime).format("YYYY-MM-DD HH:mm:ss") */} |
|
|
|
</div> |
|
|
|
</> |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
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 |
|
|
|
}; |
|
|
|
const { auth, global, members, webSocket } = state; |
|
|
|
return { |
|
|
|
user: auth.user, |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
export default connect(mapStateToProps)(UserCenter); |
|
|
|