This commit is contained in:
unknown 2023-09-01 11:17:35 +08:00
parent 42e34baa6e
commit f3e5f60bac

View File

@ -98,14 +98,15 @@ class VehicleLogic extends BaseLogic
}else{ }else{
$position = []; $position = [];
foreach($gpsCarHistory['data'] as $k=> $v){ foreach($gpsCarHistory['data'] as $k=> $v){
$position[$k]['lat'] = $v['latc']; $position[$k]['latitude'] = $v['latc'];
$position[$k]['lon'] = $v['lonc']; $position[$k]['longitude'] = $v['lonc'];
} }
$data['track_info'] = $position; $data['track_info'] = $position;
} }
} }
//获取车辆使用情况 //获取车辆使用情况
$data['travel_info'] = []; $data['travel_info'] = [];
if($data['status'] == 2){ if($data['status'] == 2){
//获取租赁信息 //获取租赁信息
$rentInfo = VehicleRent::where('car_id',$data['id'])->find(); $rentInfo = VehicleRent::where('car_id',$data['id'])->find();