...
|
...
|
@@ -28,6 +28,8 @@ class Index extends Api |
|
|
// 无需鉴权的接口,*表示全部
|
|
|
protected $noNeedRight = ['*'];
|
|
|
protected $token = "";
|
|
|
protected $cameraurl = "https://camera.ynzhsk.cn";
|
|
|
protected $govregurl = "http://124.71.107.128:9040";
|
|
|
|
|
|
//前置方法
|
|
|
public function _initialize()
|
...
|
...
|
@@ -38,7 +40,7 @@ class Index extends Api |
|
|
}
|
|
|
//1.查询摄像头接口
|
|
|
public function getCamera(){
|
|
|
$url="https://camera.ynzhsk.cn/api/reservoir/hkws/Hardware/getListByReservoir";
|
|
|
$url=$this->cameraurl."/api/reservoir/hkws/Hardware/getListByReservoir";
|
|
|
$info =HttpHelper::get($url);
|
|
|
$info = json_decode($info, true);
|
|
|
if($info['data']){
|
...
|
...
|
@@ -193,4 +195,16 @@ class Index extends Api |
|
|
return $this->success($res['message'],$res['data']);
|
|
|
}
|
|
|
|
|
|
//-获得水表列表
|
|
|
public function eqpDataWaterCenInfo(){
|
|
|
$id= $this->request->param('id',"");
|
|
|
$token=$this->token;
|
|
|
$url="http://124.71.107.128:9040/screen_eqp_data/v1/eqpDataWaterCenInfo";
|
|
|
//$token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IjE5OTY5MTA2NzEwIiwicGFzc3dvcmQiOiJhMGUxNWM0NDRmOGNiY2NiNTAwM2U1MDk5OGI2OGZhNyIsImV4cCI6MTczMTY2ODA5MSwiaXNzIjoidWltcyJ9.W3RBwrFdidL9ERykKC_gHtjp911xrkNvUKglSes1w7c";
|
|
|
$data=['wid'=>$id];
|
|
|
$res =HttpHelper::postheader($url,$data,"",$token);
|
|
|
$res=json_decode($res,true);
|
|
|
return $this->success($res['message'],$res['data']);
|
|
|
}
|
|
|
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|