|
|
@@ -52,13 +52,10 @@ class ServiceOrderLogic extends BaseLogic
|
|
|
{
|
|
|
// 查询服务区所有的地点
|
|
|
$rules = ServiceArea::field(['id', 'province', 'city','county', 'area_name', 'electronic_fence'])->select()->toArray();
|
|
|
- $point=['lng'=> $params['lat'],'lat'=> $params['lon']];
|
|
|
- Log::info('point:'.json_encode($point));
|
|
|
+ $point=['lng'=> $params['lon'],'lat'=> $params['lat']];
|
|
|
foreach ($rules as $value){
|
|
|
foreach ($value['electronic_fence'] as $polygon) {
|
|
|
- Log::info('polygon:'.json_encode($polygon));
|
|
|
if (isPointInPolygon($point, $polygon)) {
|
|
|
- Log::info('polygon-ok:'.json_encode([$polygon,$value]));
|
|
|
return [
|
|
|
'city'=>$value['city'],
|
|
|
'county'=>$value['county'],
|