发现板块下的“附近的人”功能对接
用户进入附近的人,必须是获取到当前的位置信息权限才行,否则无法访问这个功能
对应接口:
/api/users.nearby?filter[location]=116.397469,39.908821
返回数据:
{"Code": 0,"Message": "接口调用成功","Data": {"pageData": [{"id": 1,"username": "admin", // 用户名"mobile": "","signature": "", // 用户签名"avatarUrl": "", // 头像"threadCount": 2,"registerIp": "127.0.0.1","lastLoginIp": "112.49.184.40","distance": 0 // 距离},{"id": 2,"username": "binlee","mobile": "","signature": "","avatarUrl": "000/00/00/02.png","threadCount": 5,"registerIp": "112.49.184.86","lastLoginIp": "112.49.185.30","distance": 0}],"currentPage": 1,"perPage": 20,"firstPageUrl": "https://demo.qkaifa.com/api/users.nearby?filter[location]=116.397469,39.908821&page=1","nextPageUrl": "https://demo.qkaifa.com/api/users.nearby?filter[location]=116.397469,39.908821&page=2","prePageUrl": "https://demo.qkaifa.com/api/users.nearby?filter[location]=116.397469,39.908821&page=1","pageLength": 20,"totalCount": 21,"totalPage": 2},"RequestId": "555ef52d-e0c0-431b-a0c7-fe787f39a454","RequestTime": "2021-06-02 11:10:51"}
示意图:
