Browse Source

接口限制优化

master
wanghongjun 2 years ago
parent
commit
6cd412740d
  1. 4
      application/api/controller/Smartlock.php

4
application/api/controller/Smartlock.php

@ -22,7 +22,7 @@ class Smartlock extends Base
$json = $request->getContent(); $json = $request->getContent();
$param = json_decode($json, true); $param = json_decode($json, true);
if (empty($accessToken)) throw new \Exception('AccessToken参数,不能为空'); if (empty($accessToken)) throw new \Exception('Header参数:AccessToken,不能为空');
if (empty($param['deviceSerial'])) throw new \Exception('deviceSerial参数,不能为空'); if (empty($param['deviceSerial'])) throw new \Exception('deviceSerial参数,不能为空');
$curlData = YingShiSdk::DeviceStatus($accessToken,$param['deviceSerial']); $curlData = YingShiSdk::DeviceStatus($accessToken,$param['deviceSerial']);
@ -49,7 +49,7 @@ class Smartlock extends Base
$json = $request->getContent(); $json = $request->getContent();
$param = json_decode($json, true); $param = json_decode($json, true);
if (empty($accessToken)) throw new \Exception('AccessToken参数,不能为空'); if (empty($accessToken)) throw new \Exception('Header参数:AccessToken,不能为空');
if (empty($param['deviceSerial'])) throw new \Exception('deviceSerial参数,不能为空'); if (empty($param['deviceSerial'])) throw new \Exception('deviceSerial参数,不能为空');
$curlData = YingShiSdk::DeviceInfo($accessToken,$param['deviceSerial']); $curlData = YingShiSdk::DeviceInfo($accessToken,$param['deviceSerial']);

Loading…
Cancel
Save