diff --git a/src/my/MyFriend.tsx b/src/my/MyFriend.tsx index 2a3b4d8..c35293a 100644 --- a/src/my/MyFriend.tsx +++ b/src/my/MyFriend.tsx @@ -158,9 +158,10 @@ export class MyFriend extends React.Component< queryFriend:e.target.value }) loadMyFriend(e.target.value,this,1) + this.queryUser(e.target.value,1) }}/> - {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)=> @@ -171,7 +172,7 @@ export class MyFriend extends React.Component< friendIndex:index }) this.loadMyChat(friend) - }}>{friend.name} + }}>{friend.userId} 查看用户信息this.setState({userId:friend.userId})}/> @@ -179,8 +180,20 @@ export class MyFriend extends React.Component< - ):null} - 没有好友搜索结果 + ):
+ 没有本地搜索结果 + {this.state.userList?this.state.userList.length>0?this.state.userList.map((user:User,index:number)=> + + {user.userId} + + 查看用户信息this.setState({userId:user.userId})}/> + + + ):无法精确查找用户:null} +
: null} + + + {this.state.scrollTip!==null?this.setState({scrollTip:null})} duration={1000}/>:null} diff --git a/src/public.tsx b/src/public.tsx index b060163..8d58da9 100644 --- a/src/public.tsx +++ b/src/public.tsx @@ -81,10 +81,10 @@ export function scrollBottom(e:any,that:React.Component,callback:Functi } //查找我的好友 -export function loadMyFriend(name:string,that:React.Component,page:number){ +export function loadMyFriend(targetUserId:string,that:React.Component,page:number){ request(Api.account.myFriend,Method.GET, { currentPage:String(page), - name:name + targetUserId:targetUserId },new UserTransform(),function (res:UserRes) { switch (res.customResult) { case PageDataMessage.ok: