From 7dda3fbda8129ddbe3573fe8b3e57d0aeb9e23cd Mon Sep 17 00:00:00 2001 From: Lemon <15040771@qq.com> Date: Fri, 18 Sep 2020 14:08:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=82=E5=9C=BA=E6=8E=92=E5=BA=8F=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/v3/Implementations/LocationService.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Service/v3/Implementations/LocationService.php b/app/Service/v3/Implementations/LocationService.php index 0151b69..8db6f55 100644 --- a/app/Service/v3/Implementations/LocationService.php +++ b/app/Service/v3/Implementations/LocationService.php @@ -84,8 +84,9 @@ class LocationService implements LocationServiceInterface } } - $res = collect($res->toArray())->sortBy(function ($res, $key) { - return $res['distance_num']; + $res = collect($res->toArray())->map(function ($res, $key) { + $markets = collect($res)->sortBy('distance_num'); + return $markets; }); return $res;