Browse Source

uas手机版
我的信息 默认头像

samhoo 5 years ago
parent
commit
d14488f9e8

+ 5 - 5
uas-office-web/uas-mobile/src/components/private/profile/ProfileCard.jsx

@@ -7,7 +7,11 @@ import React, { Component } from 'react'
 import { connect } from 'react-redux'
 import { isObjEmpty } from '../../../utils/common/common.util'
 import './Profile.less'
+import { Avatar } from 'antd'
 import { Icon, List } from 'antd-mobile'
+import {
+  UserOutlined,
+} from '@ant-design/icons'
 
 const Item = List.Item
 
@@ -39,11 +43,7 @@ class ProfileCard extends Component {
             <div className="name func-font-family">{userName}</div>
             <div className="post">{departName + ' > ' + jobName}</div>
           </div>
-          {
-            imgUrl
-              ? <img className="profile-img" src={imgUrl}/>
-              : <img className="profile-img"/>
-          }
+          <Avatar shape="square" size={50} src={imgUrl ? imgUrl : ''} icon={imgUrl ? null : <UserOutlined/>}/>
         </div>
         <div className="profile-set">
           {/* <Item disabled={true} arrow="horizontal">设置</Item> */}