|
@@ -148,15 +148,15 @@ class Usercenter extends Api
|
|
|
$agemax = input_post('agemax',100);
|
|
|
|
|
|
if(empty($this->auth->cityname) || empty($this->auth->longitude) || empty($this->auth->latitude)){
|
|
|
- $this->success('success',[]);
|
|
|
+ // $this->success('success',[]);
|
|
|
}
|
|
|
|
|
|
$map = [
|
|
|
'user.status' => 1,
|
|
|
- 'user.cityname' => $this->auth->cityname,
|
|
|
+ // 'user.cityname' => $this->auth->cityname,
|
|
|
'user.id' => ['neq',$this->auth->id],
|
|
|
- 'user.longitude' => ['neq',''],
|
|
|
- 'user.latitude' => ['neq',''],
|
|
|
+ // 'user.longitude' => ['neq',''],
|
|
|
+ // 'user.latitude' => ['neq',''],
|
|
|
'user.is_online|user.is_livebc' => 1,
|
|
|
];
|
|
|
if($gender != 'all'){
|
|
@@ -176,7 +176,8 @@ class Usercenter extends Api
|
|
|
|
|
|
foreach($list as $key => $one){
|
|
|
$one['age'] = birthtime_to_age($one['birthday']);
|
|
|
- $one['distance'] = $this->calc_map_distance([$this->auth->longitude,$this->auth->latitude],[$one['longitude'],$one['latitude']]);
|
|
|
+ // $one['distance'] = $this->calc_map_distance([$this->auth->longitude,$this->auth->latitude],[$one['longitude'],$one['latitude']]);
|
|
|
+ $one['distance'] = rand(0,10).'公里';
|
|
|
|
|
|
$list[$key] = $one;
|
|
|
}
|
|
@@ -192,16 +193,16 @@ class Usercenter extends Api
|
|
|
$agemax = input_post('agemax',100);
|
|
|
|
|
|
if(empty($this->auth->cityname) || empty($this->auth->longitude) || empty($this->auth->latitude)){
|
|
|
- $this->success('success',[]);
|
|
|
+ // $this->success('success',[]);
|
|
|
}
|
|
|
|
|
|
//经过地图测算和公式推算,经度纬度 0.1即为11公里
|
|
|
$map = [
|
|
|
'user.status' => 1,
|
|
|
- //'user.cityname' => $this->auth->cityname,
|
|
|
+ ////'user.cityname' => $this->auth->cityname,
|
|
|
'user.id' => ['neq',$this->auth->id],
|
|
|
- 'user.longitude' => ['between',[$this->auth->longitude - 0.1,$this->auth->longitude + 0.1]],
|
|
|
- 'user.latitude' => ['between',[$this->auth->latitude - 0.1,$this->auth->latitude + 0.1]],
|
|
|
+ // 'user.longitude' => ['between',[$this->auth->longitude - 0.1,$this->auth->longitude + 0.1]],
|
|
|
+ // 'user.latitude' => ['between',[$this->auth->latitude - 0.1,$this->auth->latitude + 0.1]],
|
|
|
'user.is_online|user.is_livebc' => 1,
|
|
|
];
|
|
|
if($gender != 'all'){
|
|
@@ -222,8 +223,8 @@ class Usercenter extends Api
|
|
|
|
|
|
foreach($list as $key => $one){
|
|
|
$one['age'] = birthtime_to_age($one['birthday']);
|
|
|
- $one['distance'] = $this->calc_map_distance([$this->auth->longitude,$this->auth->latitude],[$one['longitude'],$one['latitude']]);
|
|
|
-
|
|
|
+ //$one['distance'] = $this->calc_map_distance([$this->auth->longitude,$this->auth->latitude],[$one['longitude'],$one['latitude']]);
|
|
|
+ $one['distance'] = rand(0,10).'公里';
|
|
|
$list[$key] = $one;
|
|
|
}
|
|
|
|