|
|
@@ -4,13 +4,14 @@
|
|
|
*/
|
|
|
|
|
|
import React, { Component } from 'react'
|
|
|
+import { connect } from 'react-redux'
|
|
|
import { isObjEmpty } from '../../../utils/common/common.util'
|
|
|
import './ProfileCard.less'
|
|
|
import { Icon, List } from 'antd-mobile'
|
|
|
|
|
|
const Item = List.Item
|
|
|
|
|
|
-export default class ProfileCard extends Component {
|
|
|
+class ProfileCard extends Component {
|
|
|
|
|
|
constructor () {
|
|
|
super()
|
|
|
@@ -27,14 +28,8 @@ export default class ProfileCard extends Component {
|
|
|
}
|
|
|
|
|
|
render () {
|
|
|
- let mineInfo = {
|
|
|
- companyName: '深圳市英唐智能控制股份有限公司',
|
|
|
- userName: '胡俊森',
|
|
|
- userPost: '管理员',
|
|
|
- imgUrl: '',
|
|
|
- companyId: '',
|
|
|
- }
|
|
|
- let { companyName, userName, userPost, imgUrl } = mineInfo
|
|
|
+
|
|
|
+ let { companyName, imgUrl, userName, departName, jobName } = this.props.userState
|
|
|
|
|
|
return (
|
|
|
<div className="mine-info" style={{ padding: '15px 10px 0px 15px' }}>
|
|
|
@@ -42,7 +37,7 @@ export default class ProfileCard extends Component {
|
|
|
<div className="profile-info">
|
|
|
<div className="company">{companyName}</div>
|
|
|
<div className="name func-font-family">{userName}</div>
|
|
|
- <div className="post">{userPost}</div>
|
|
|
+ <div className="post">{departName + ' > ' + jobName}</div>
|
|
|
</div>
|
|
|
{
|
|
|
imgUrl
|
|
|
@@ -51,9 +46,15 @@ export default class ProfileCard extends Component {
|
|
|
}
|
|
|
</div>
|
|
|
<div className="profile-set">
|
|
|
- <Item disabled={true} arrow="horizontal">设置</Item>
|
|
|
+ {/* <Item disabled={true} arrow="horizontal">设置</Item> */}
|
|
|
</div>
|
|
|
</div>
|
|
|
)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+let mapStateToProps = (state) => ({
|
|
|
+ userState: state.userState,
|
|
|
+})
|
|
|
+
|
|
|
+export default connect(mapStateToProps)(ProfileCard)
|