|
@@ -28,6 +28,8 @@ class Index extends Api |
|
@@ -28,6 +28,8 @@ class Index extends Api |
28
|
// 无需鉴权的接口,*表示全部
|
28
|
// 无需鉴权的接口,*表示全部
|
29
|
protected $noNeedRight = ['*'];
|
29
|
protected $noNeedRight = ['*'];
|
30
|
protected $token = "";
|
30
|
protected $token = "";
|
|
|
31
|
+ protected $cameraurl = "https://camera.ynzhsk.cn";
|
|
|
32
|
+ protected $govregurl = "http://124.71.107.128:9040";
|
31
|
|
33
|
|
32
|
//前置方法
|
34
|
//前置方法
|
33
|
public function _initialize()
|
35
|
public function _initialize()
|
|
@@ -38,7 +40,7 @@ class Index extends Api |
|
@@ -38,7 +40,7 @@ class Index extends Api |
38
|
}
|
40
|
}
|
39
|
//1.查询摄像头接口
|
41
|
//1.查询摄像头接口
|
40
|
public function getCamera(){
|
42
|
public function getCamera(){
|
41
|
- $url="https://camera.ynzhsk.cn/api/reservoir/hkws/Hardware/getListByReservoir";
|
43
|
+ $url=$this->cameraurl."/api/reservoir/hkws/Hardware/getListByReservoir";
|
42
|
$info =HttpHelper::get($url);
|
44
|
$info =HttpHelper::get($url);
|
43
|
$info = json_decode($info, true);
|
45
|
$info = json_decode($info, true);
|
44
|
if($info['data']){
|
46
|
if($info['data']){
|
|
@@ -193,4 +195,16 @@ class Index extends Api |
|
@@ -193,4 +195,16 @@ class Index extends Api |
193
|
return $this->success($res['message'],$res['data']);
|
195
|
return $this->success($res['message'],$res['data']);
|
194
|
}
|
196
|
}
|
195
|
|
197
|
|
|
|
198
|
+ //-获得水表列表
|
|
|
199
|
+ public function eqpDataWaterCenInfo(){
|
|
|
200
|
+ $id= $this->request->param('id',"");
|
|
|
201
|
+ $token=$this->token;
|
|
|
202
|
+ $url="http://124.71.107.128:9040/screen_eqp_data/v1/eqpDataWaterCenInfo";
|
|
|
203
|
+ //$token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IjE5OTY5MTA2NzEwIiwicGFzc3dvcmQiOiJhMGUxNWM0NDRmOGNiY2NiNTAwM2U1MDk5OGI2OGZhNyIsImV4cCI6MTczMTY2ODA5MSwiaXNzIjoidWltcyJ9.W3RBwrFdidL9ERykKC_gHtjp911xrkNvUKglSes1w7c";
|
|
|
204
|
+ $data=['wid'=>$id];
|
|
|
205
|
+ $res =HttpHelper::postheader($url,$data,"",$token);
|
|
|
206
|
+ $res=json_decode($res,true);
|
|
|
207
|
+ return $this->success($res['message'],$res['data']);
|
|
|
208
|
+ }
|
|
|
209
|
+
|
196
|
} |
210
|
} |