作者 董瑞恩
1 个管道 的构建 通过 耗费 0 秒

interface

@@ -71,12 +71,14 @@ class AesController extends HomeBaseController{ @@ -71,12 +71,14 @@ class AesController extends HomeBaseController{
71 if (!empty($strKey)){ 71 if (!empty($strKey)){
72 if ($strKey['electricity']==0){ 72 if ($strKey['electricity']==0){
73 $this->apiResponse(302,'设备电量低'); 73 $this->apiResponse(302,'设备电量低');
74 - }else{ 74 + }
  75 + if ($strKey['use']==1){
  76 + $this->apiResponse(303,'当前设备正在使用');
  77 + }
75 $strMac=$this->macToStr($strKey['mac_address']); 78 $strMac=$this->macToStr($strKey['mac_address']);
76 $key="ff0ca2".$strMac."5500ef"; 79 $key="ff0ca2".$strMac."5500ef";
77 $lockKey=$this->ToArray($key); 80 $lockKey=$this->ToArray($key);
78 $this->apiResponse(200,'success',$lockKey); 81 $this->apiResponse(200,'success',$lockKey);
79 - }  
80 }else{ 82 }else{
81 $this->apiResponse(301,'MAC地址未认证'); 83 $this->apiResponse(301,'MAC地址未认证');
82 } 84 }