Merge pull request '租赁详情传值修复' (#92) from zhangwei into dev

Reviewed-on: #92
This commit is contained in:
weiz 2023-10-17 17:56:37 +08:00
commit 4e018e1ecc

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('数据不存在');
}