作者 郭文星

123

... ... @@ -160,6 +160,7 @@ class Index extends Api
$res =HttpHelper::postheader($url,$data,"",$token);
$res=json_decode($res,true);
return $this->success($res['message'],$res['data']);
}
//-获得设备数据详情
public function getAllSupplyStatistics(){
... ...
... ... @@ -30,8 +30,8 @@ class User extends Api
//获取token
public function tokenLogin(){
$appKey = config("site.appKey");
$appSecret = config("site.appSecret");
$appKey ="waterPro_54989312";
$appSecret ="bef381707451606b34c1f9b4b18bd5d7";
$url="/api/access_token";
$postdata=[
"appKey"=>$appKey,
... ... @@ -42,7 +42,7 @@ class User extends Api
if($jsondata['code']==200){
return $jsondata['data'];
}else{
return $this->error("请求失败");
return $this->error("请求失败".$jsondata['msg'],$jsondata['data']);
}
}
... ...