1 问题描述:
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/122fbd7b7dd4926671a2f0167cb03d30.png)
2 相关代码:
2.1 后台代码
/获取附近客户列表
@PostMapping("/wxGetNearClientList")
public List<Client> getNearClientList
(@RequestParam Float LONGITUDE,
@RequestParam Float LATITUDE){
List<Client> nearClientList=clientService.findNearClient(LONGITUDE,LATITUDE);
return nearClientList;
}
2.2 前端代码
//获取用户附近的客户
viewNearClient:function(){
var that=this;
wx.request({
url: 'http://192.168.174.1:8080/wxGetNearClientList',
data:{
'LONGITUDE': this.data.longitude,
'LATITUDE': this.data.latitude
},
method: 'POST',
dataType:'json',
success:function(res){