Browse Source

市场距离排序

master
Lemon 5 years ago
parent
commit
296f76508a
  1. 9
      app/Service/v3/Implementations/LocationService.php

9
app/Service/v3/Implementations/LocationService.php

@ -83,13 +83,8 @@ class LocationService implements LocationServiceInterface
$m->distance = '';
}
}
$res = collect($res->toArray())->map(function ($res, $key) {
$markets = collect($res)->sortBy('distance_num');
return $markets;
});
return $res;
$res = collect($res)->sortBy('distance_num');
return $res->values()->all();
}
public function getNearestMarket($lng,$lat)

Loading…
Cancel
Save