新增获取空闲车辆接口
This commit is contained in:
parent
09fa3183e4
commit
b5a1930e48
@ -14,7 +14,7 @@ use think\response\Json;
|
|||||||
*/
|
*/
|
||||||
class VehicleController extends BaseApiController
|
class VehicleController extends BaseApiController
|
||||||
{
|
{
|
||||||
public array $notNeedLogin = ['getCarLocal','getCarHistory','addSelfCar','updateVehicleRent','cancelRent'];
|
public array $notNeedLogin = ['getCarLocal','getCarHistory','addSelfCar','updateVehicleRent','cancelRent','getFreeCars'];
|
||||||
|
|
||||||
//获取车辆当前位置
|
//获取车辆当前位置
|
||||||
public function getCarLocal():Json {
|
public function getCarLocal():Json {
|
||||||
@ -149,4 +149,10 @@ class VehicleController extends BaseApiController
|
|||||||
return $this->fail('失败');
|
return $this->fail('失败');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取空闲车辆
|
||||||
|
public function getFreeCars() {
|
||||||
|
$data = Vehicle::field('id,pic,license')->where('status',0)->where('type',0)->select();
|
||||||
|
return $this->success('请求成功',$data->toArray());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user