|
|
@ -158,9 +158,10 @@ export class MyFriend extends React.Component< |
|
|
|
queryFriend:e.target.value |
|
|
|
queryFriend:e.target.value |
|
|
|
}) |
|
|
|
}) |
|
|
|
loadMyFriend(e.target.value,this,1) |
|
|
|
loadMyFriend(e.target.value,this,1) |
|
|
|
|
|
|
|
this.queryUser(e.target.value,1) |
|
|
|
}}/> |
|
|
|
}}/> |
|
|
|
</ListGroup.Item> |
|
|
|
</ListGroup.Item> |
|
|
|
{this.state.friendList?this.state.friendList.map((friend:User,index:number)=> |
|
|
|
{this.state.friendList?this.state.friendList.length>0?this.state.friendList.map((friend:User,index:number)=> |
|
|
|
|
|
|
|
|
|
|
|
<ListGroup.Item key={"tooltip"+index} className={"d-flex justify-content-between "+(index===this.state.friendIndex?"text-success":"text-dark")} |
|
|
|
<ListGroup.Item key={"tooltip"+index} className={"d-flex justify-content-between "+(index===this.state.friendIndex?"text-success":"text-dark")} |
|
|
|
style={{cursor:"pointer"}} variant={friend.chatStatus?"info":"secondary"}> |
|
|
|
style={{cursor:"pointer"}} variant={friend.chatStatus?"info":"secondary"}> |
|
|
@ -171,7 +172,7 @@ export class MyFriend extends React.Component< |
|
|
|
friendIndex:index |
|
|
|
friendIndex:index |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.loadMyChat(friend) |
|
|
|
this.loadMyChat(friend) |
|
|
|
}}>{friend.name}</span> |
|
|
|
}}>{friend.userId}</span> |
|
|
|
</Tooltip> |
|
|
|
</Tooltip> |
|
|
|
<Tooltip title="查看用户信息" placement="right"> |
|
|
|
<Tooltip title="查看用户信息" placement="right"> |
|
|
|
<img src="user.svg" alt="查看用户信息" className="userIcon" onClick={()=>this.setState({userId:friend.userId})}/> |
|
|
|
<img src="user.svg" alt="查看用户信息" className="userIcon" onClick={()=>this.setState({userId:friend.userId})}/> |
|
|
@ -179,8 +180,20 @@ export class MyFriend extends React.Component< |
|
|
|
</ListGroup.Item> |
|
|
|
</ListGroup.Item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
):null} |
|
|
|
):<div> |
|
|
|
<ListGroup.Item>没有好友搜索结果</ListGroup.Item> |
|
|
|
<ListGroup.Item>没有本地搜索结果</ListGroup.Item> |
|
|
|
|
|
|
|
{this.state.userList?this.state.userList.length>0?this.state.userList.map((user:User,index:number)=> |
|
|
|
|
|
|
|
<ListGroup.Item className={"d-flex justify-content-between"}> |
|
|
|
|
|
|
|
<span>{user.userId}</span> |
|
|
|
|
|
|
|
<Tooltip title="查看用户信息" placement="right"> |
|
|
|
|
|
|
|
<img src="user.svg" alt="查看用户信息" className="userIcon" onClick={()=>this.setState({userId:user.userId})}/> |
|
|
|
|
|
|
|
</Tooltip> |
|
|
|
|
|
|
|
</ListGroup.Item> |
|
|
|
|
|
|
|
):<ListGroup.Item>无法精确查找用户</ListGroup.Item>:null} |
|
|
|
|
|
|
|
</div>: null} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{this.state.scrollTip!==null?<SimpleSnackbar message={this.state.scrollTip} onClose={()=>this.setState({scrollTip:null})} duration={1000}/>:null} |
|
|
|
{this.state.scrollTip!==null?<SimpleSnackbar message={this.state.scrollTip} onClose={()=>this.setState({scrollTip:null})} duration={1000}/>:null} |
|
|
|