feat : site
This commit is contained in:
@@ -42,6 +42,9 @@ class SiteListService extends BaseService
|
||||
if (empty($list['data'])) return $this->return->success('success', ['list' => $list]);
|
||||
|
||||
foreach ($list['data'] as &$item) {
|
||||
$item['gap'] = 0;
|
||||
if (empty($this->request->input('lng')) || empty($this->request->input('lat'))) continue;
|
||||
|
||||
$item['gap'] = SystemUtil::calculateDistance(
|
||||
['lng' => $this->request->input('lng'),'lat' => $this->request->input('lat')],
|
||||
['lng' => $item['lng'], 'lat' => $item['lat']]
|
||||
|
||||
Reference in New Issue
Block a user