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

interface

@@ -72,7 +72,8 @@ class AesController extends HomeBaseController{ @@ -72,7 +72,8 @@ class AesController extends HomeBaseController{
72 if ($strKey['electricity']==0){ 72 if ($strKey['electricity']==0){
73 $this->apiResponse(302,'设备电量低'); 73 $this->apiResponse(302,'设备电量低');
74 }else{ 74 }else{
75 - $key="ff0ca2".$strKey['']."5500ef"; 75 + $strMac=$this->macToStr($strKey['mac_address']);
  76 + $key="ff0ca2".$strMac."5500ef";
76 $lockKey=$this->ToArray($key); 77 $lockKey=$this->ToArray($key);
77 $this->apiResponse(200,'success',$lockKey); 78 $this->apiResponse(200,'success',$lockKey);
78 } 79 }
@@ -82,8 +83,13 @@ class AesController extends HomeBaseController{ @@ -82,8 +83,13 @@ class AesController extends HomeBaseController{
82 83
83 } 84 }
84 85
85 - public function macToStr(){  
86 - 86 + public function macToStr($mac){
  87 + $mac_address=explode(":",$mac);
  88 + $strMac="";
  89 + foreach ($mac_address as $k=>$v){
  90 + $strMac.=$v;
  91 + }
  92 + return $strMac;
87 } 93 }
88 94
89 /** 95 /**
@@ -58,6 +58,7 @@ class UsersController extends HomeBaseController{ @@ -58,6 +58,7 @@ class UsersController extends HomeBaseController{
58 $this->apiResponse(301,'未支付押金'); 58 $this->apiResponse(301,'未支付押金');
59 } 59 }
60 } 60 }
  61 +
61 /** 62 /**
62 * @title 用户使用状态验证 63 * @title 用户使用状态验证
63 * @description 判断用户当前是否在使用设备 64 * @description 判断用户当前是否在使用设备