Commit e2860ae2 authored by luhongguang's avatar luhongguang

Merge branch 'jielong' of https://git.yidian-inc.com:8021/bp/goods into jielong

parents 7ed04d8a 32eb02e5
......@@ -165,15 +165,19 @@ class TakePlaceService
return $list;
}
//按距离返回自提点列表
$sort = [];
if(!empty($list) && is_array($list)) {
foreach ($list as &$item) {
if($item['longitude'] && $item['latitude']) {
$item['distance'] = Geo::geoDistance($lat,$lng,$item['longitude'],$item['latitude'],true);
$sort[] = $item['distance'];
}else {
$item['distance'] = '';
}
}
unset($item);
//按距离排序
array_multisort($sort, SORT_ASC, $list);
return $list;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment