正在显示
1 个修改的文件
包含
4 行增加
和
0 行删除
@@ -69,9 +69,13 @@ class AesController extends HomeBaseController{ | @@ -69,9 +69,13 @@ class AesController extends HomeBaseController{ | ||
69 | $MACAddress=$this->request->param('MACAddress'); | 69 | $MACAddress=$this->request->param('MACAddress'); |
70 | $strKey=Db::name('equipment')->where('mac_address',$MACAddress)->find(); | 70 | $strKey=Db::name('equipment')->where('mac_address',$MACAddress)->find(); |
71 | if (!empty($strKey)){ | 71 | if (!empty($strKey)){ |
72 | + if ($strKey['electricity']==0){ | ||
73 | + $this->apiResponse(302,'设备电量低'); | ||
74 | + }else{ | ||
72 | $key="ff0ca2".$MACAddress."5500ef"; | 75 | $key="ff0ca2".$MACAddress."5500ef"; |
73 | $lockKey=$this->ToArray($key); | 76 | $lockKey=$this->ToArray($key); |
74 | $this->apiResponse(200,'success',$lockKey); | 77 | $this->apiResponse(200,'success',$lockKey); |
78 | + } | ||
75 | }else{ | 79 | }else{ |
76 | $this->apiResponse(301,'MAC地址未认证'); | 80 | $this->apiResponse(301,'MAC地址未认证'); |
77 | } | 81 | } |
-
请 注册 或 登录 后发表评论