修改预约兼容性

This commit is contained in:
liu 2024-07-10 10:59:37 +08:00
parent fdd0f89543
commit 281e6d567f

View File

@ -93,10 +93,17 @@ class SystemStoreLists extends BaseAdminDataLists implements ListsSearchInterfac
}
}else{
foreach ($data as &$value){
$value['distance'] = haversineDistance($value['latitude'],$value['longitude'],$latitude,$longitude);
if($latitude && $longitude){
foreach ($data as &$value){
$value['distance'] = haversineDistance($value['latitude'],$value['longitude'],$latitude,$longitude);
}
}else{
foreach ($data as &$values){
$values['distance'] = 0;
}
}
}
usort($data, function ($a, $b) {