diff --git a/app/adminapi/logic/vehicle/VehicleLogic.php b/app/adminapi/logic/vehicle/VehicleLogic.php index c2e8897f..3465a1a2 100644 --- a/app/adminapi/logic/vehicle/VehicleLogic.php +++ b/app/adminapi/logic/vehicle/VehicleLogic.php @@ -110,8 +110,8 @@ class VehicleLogic extends BaseLogic } if($data['status'] == 2){ //获取租赁信息 - $rentInfo = VehicleRent::where('car_id',$data['id'])->find(); - $contract = Contract::where('id',$rentInfo['contract_id'])->find(); + $rentInfo = VehicleRent::where('car_id',$data['id'])->findOrEmpty()->toArray(); + $contract = Contract::where('id',$rentInfo['contract_id'])->findOrEmpty(); $rentInfo['contract_file'] = $contract['file']; $data['rent_info'] = !empty($rentInfo) ? $rentInfo : []; //获取物流信息