|
@@ -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
|
/**
|