租赁详情传值修复

This commit is contained in:
unknown 2023-10-17 17:56:15 +08:00
parent 91dc1b31c3
commit 038a1fc148

View File

@ -437,10 +437,11 @@ class VehicleController extends BaseApiController
$id = $this->request->get('car_id');
//获取数据
if(!empty($id) && $id != 'undefined'){
$data = VehicleRent::where('id',$id)->where('status',2)->findOrEmpty();
$data = VehicleRent::where('car_id',$id)->where('status',2)->findOrEmpty();
}else{
$data = VehicleRent::where('rent_company_id',$this->userInfo['company_id'])->where('status',2)->findOrEmpty();
}
dump($data);die;
if($data->isEmpty()){
return $this->fail('数据不存在');
}