|
@@ -78,6 +78,11 @@ class Index extends Api
|
|
|
$having_dis = 'distance > '.$distancemin*1000 .' and distance < '.$distancemax*1000;
|
|
|
}
|
|
|
|
|
|
+ //当异地漫游的时候,距离条件作废
|
|
|
+ if($cityname != $this->auth->cityname){
|
|
|
+ $having_dis = '';
|
|
|
+ }
|
|
|
+
|
|
|
$field = [
|
|
|
'user.id',
|
|
|
'user.username',
|
|
@@ -236,7 +241,7 @@ class Index extends Api
|
|
|
);
|
|
|
$query->whereOr($where_tuijian);
|
|
|
})
|
|
|
- ->having($having_dis)
|
|
|
+ //->having($having_dis)推荐完全不受距离限制
|
|
|
->order('user.is_active desc,distance asc')
|
|
|
->autopage()
|
|
|
->select();
|