Browse Source

确认订单

master
Lemon 5 years ago
parent
commit
91cb8c2bba
  1. 2
      app/Controller/v3/OrderOnlineController.php
  2. 3
      app/Service/v3/Implementations/LocationService.php

2
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();
//

3
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;

Loading…
Cancel
Save