You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.5 KiB
59 lines
1.5 KiB
<?php
|
|
|
|
namespace App\Services\Api;
|
|
|
|
class CameraApiService extends BaseApiService
|
|
{
|
|
|
|
/**
|
|
* @return CameraApiService
|
|
*/
|
|
public static function query(): CameraApiService
|
|
{
|
|
return new self();
|
|
}
|
|
|
|
// 获取车位相机设备变更颜色信息
|
|
public function getCameraBody()
|
|
{
|
|
$url = '/api/device/camera/getBody';
|
|
$Response = $this->getHttp($url);
|
|
if ($Response->successful()) {
|
|
return json_decode($Response->body(), true);
|
|
}
|
|
return [];
|
|
}
|
|
|
|
// 返回变更车位相机设备状态接口
|
|
public function putCameraBody($data)
|
|
{
|
|
$url = '/api/device/camera/getBody';
|
|
$Response = $this->putHttp($url, $data);
|
|
if ($Response->successful()) {
|
|
return json_decode($Response->body(), true);
|
|
}
|
|
return [];
|
|
}
|
|
|
|
// 获取车位相机设备信息
|
|
public function getCameraStatus()
|
|
{
|
|
$url = '/api/device/camera/getStatus';
|
|
$Response = $this->getHttp($url);
|
|
if ($Response->successful()) {
|
|
return json_decode($Response->body(), true);
|
|
}
|
|
return [];
|
|
}
|
|
|
|
// 获取变更车位相机设备状态
|
|
public function putCameraStatus($data)
|
|
{
|
|
$url = '/api/device/camera/getStatus';
|
|
$Response = $this->putHttp($url, $data);
|
|
if ($Response->successful()) {
|
|
return json_decode($Response->body(), true);
|
|
}
|
|
return [];
|
|
}
|
|
}
|
|
|