1234567891011121314151617 |
- const male = 'https://minio.citupro.com/dev/menduner/11.png'
- const female = 'https://minio.citupro.com/dev/menduner/7.png'
- const defaultAvatar = 'https://minio.menduner.com/dev/04af7f4a3b8bc90207ecae864b8a6e5bf72b4b3313886cb8cac3f78c82683691.png'
- // 根据性别返回默认头像
- // isChatSystem: 系统消息头像
- export const getUserAvatar = (avatar, sex, isChatSystem) => {
- if (isChatSystem) return 'https://minio.menduner.com/dev/1e6893918ef378ca280360078dfe74ade10b27101c89865261824b46de7d34a6.png'
- if (avatar) {
- return avatar
- }
- // if (!sex) return female
- if (sex === '1') {
- return male
- }
- return female
- }
|