From 91cb8c2bba33ad265bc40519df4a49b09d8472c3 Mon Sep 17 00:00:00 2001 From: Lemon <15040771@qq.com> Date: Wed, 9 Sep 2020 21:19:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/v3/OrderOnlineController.php | 2 +- app/Service/v3/Implementations/LocationService.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Controller/v3/OrderOnlineController.php b/app/Controller/v3/OrderOnlineController.php index ecab40c..554a029 100644 --- a/app/Controller/v3/OrderOnlineController.php +++ b/app/Controller/v3/OrderOnlineController.php @@ -93,7 +93,7 @@ class OrderOnlineController extends BaseController ]) ->select('id') ->first(); - // $res['location'] = $this->userAddressService->getAddressAndDistributionRrice($address->id,$marketId); + $res['location'] = $this->userAddressService->getAddressAndDistributionRrice($address->id,$marketId); //返回预约送达时间 数组 $res['appointment_time'] = $this->appointmentTimeService->do(); // diff --git a/app/Service/v3/Implementations/LocationService.php b/app/Service/v3/Implementations/LocationService.php index 671cf71..a80a062 100644 --- a/app/Service/v3/Implementations/LocationService.php +++ b/app/Service/v3/Implementations/LocationService.php @@ -94,7 +94,8 @@ class LocationService implements LocationServiceInterface $resultArr = json_decode($result,true); if($resultArr['status'] > 0) { - throw new ErrorCodeException(ErrorCode::LOCATION_ERROR,$resultArr['message']); + return 1000; + //throw new ErrorCodeException(ErrorCode::LOCATION_ERROR,$resultArr['message']); } $distance = $resultArr['result']['routes'][0]['distance']; return $distance;