物联网后台管理
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.
 
 
 
 
 

39 lines
851 B

<?php
namespace app\api\controller;
use app\common\YingShiSdk\YingShiSdk;
class YingShiDevice extends Base
{
public function deviceStatus()
{
try {
$curlData = YingShiSdk::DeviceStatus();
if (!is_array($curlData)) throw new \Exception("cURL Error #:" . $curlData);
return $this->jsonSuccess('操作成功',$curlData);
} catch (\Exception $e) {
return $this->jsonError($e->getMessage());
}
}
public function deviceInfo()
{
try {
$curlData = YingShiSdk::DeviceInfo();
if (!is_array($curlData)) throw new \Exception("cURL Error #:" . $curlData);
return $this->jsonSuccess('操作成功',$curlData);
} catch (\Exception $e) {
return $this->jsonError($e->getMessage());
}
}
}