作者 郭文星

1231

... ... @@ -99,13 +99,8 @@ class Index extends Api
$res =HttpHelper::postheader($url,$data,"",$token);
$res=json_decode($res,true);
if($res){
$WaterCenInfourl="http://124.71.107.128:9040/screen_eqp_data/v1/eqpDataWaterCenInfo";
//$token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IjE5OTY5MTA2NzEwIiwicGFzc3dvcmQiOiJhMGUxNWM0NDRmOGNiY2NiNTAwM2U1MDk5OGI2OGZhNyIsImV4cCI6MTczMTY2ODA5MSwiaXNzIjoidWltcyJ9.W3RBwrFdidL9ERykKC_gHtjp911xrkNvUKglSes1w7c";
$WaterCenIndata=['wid'=>$res['data']['id']];
$WaterCenInfourlres =HttpHelper::postheader($WaterCenInfourl,$WaterCenIndata,"",$token);
$WaterCenInfourlres=json_decode($WaterCenInfourlres,true);
$res['data']['dayPct']=$WaterCenInfourlres['dayPct'];
$res['data']['total']=$WaterCenInfourlres['total'];
$ress= $this->eqpDataWaterCenInfo($id);
print_r($ress);
}
return $this->success($res['message'],$res['data']);
}
... ... @@ -205,8 +200,7 @@ class Index extends Api
}
//-获得水表列表
public function eqpDataWaterCenInfo(){
$id= $this->request->param('id',"");
public function eqpDataWaterCenInfo($id){
$token=$this->token;
$url="http://124.71.107.128:9040/screen_eqp_data/v1/eqpDataWaterCenInfo";
//$token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IjE5OTY5MTA2NzEwIiwicGFzc3dvcmQiOiJhMGUxNWM0NDRmOGNiY2NiNTAwM2U1MDk5OGI2OGZhNyIsImV4cCI6MTczMTY2ODA5MSwiaXNzIjoidWltcyJ9.W3RBwrFdidL9ERykKC_gHtjp911xrkNvUKglSes1w7c";
... ...