|
|
@ -109,7 +109,7 @@ export class MyFriend extends React.Component< |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 查找用户 |
|
|
|
* 查找用户 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
queryUser(name:string){ |
|
|
|
queryUser(name:string,page:number){ |
|
|
|
|
|
|
|
|
|
|
|
if(!name){ |
|
|
|
if(!name){ |
|
|
|
this.setState({ |
|
|
|
this.setState({ |
|
|
@ -122,7 +122,9 @@ export class MyFriend extends React.Component< |
|
|
|
switch (res.customResult) { |
|
|
|
switch (res.customResult) { |
|
|
|
case PageDataMessage.ok: |
|
|
|
case PageDataMessage.ok: |
|
|
|
that.setState({ |
|
|
|
that.setState({ |
|
|
|
userList: res.dataList |
|
|
|
userList: page===1?res.dataList||[]:(that.state.userList||[]).concat(res.dataList||[]), |
|
|
|
|
|
|
|
page: res.page, |
|
|
|
|
|
|
|
scrollTip: page > 1 ? '成功加载第' + page + '页数据' : null, |
|
|
|
}) |
|
|
|
}) |
|
|
|
break |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
@ -187,7 +189,7 @@ export class MyFriend extends React.Component< |
|
|
|
this.setState({ |
|
|
|
this.setState({ |
|
|
|
queryUser:e.target.value |
|
|
|
queryUser:e.target.value |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.queryUser(e.target.value) |
|
|
|
this.queryUser(e.target.value,1) |
|
|
|
}}/> |
|
|
|
}}/> |
|
|
|
</ListGroup.Item> |
|
|
|
</ListGroup.Item> |
|
|
|
|
|
|
|
|
|
|
|