正在显示
1 个修改的文件
包含
12 行增加
和
2 行删除
| @@ -122,7 +122,8 @@ class Index extends Api | @@ -122,7 +122,8 @@ class Index extends Api | ||
| 122 | //-获得设备数据详情 | 122 | //-获得设备数据详情 |
| 123 | public function eqpData7DayList(){ | 123 | public function eqpData7DayList(){ |
| 124 | $id= $this->request->param('id',""); | 124 | $id= $this->request->param('id',""); |
| 125 | - $token=$this->token; | 125 | + $user=new User(); |
| 126 | + $token=$user->uimsApitoken(); | ||
| 126 | $url="https://wq.screen.xp.yn.cn/api/screen_eqp_data/v1/eqpData7DayList"; | 127 | $url="https://wq.screen.xp.yn.cn/api/screen_eqp_data/v1/eqpData7DayList"; |
| 127 | $data=['wid'=>"$id"]; | 128 | $data=['wid'=>"$id"]; |
| 128 | $res =HttpHelper::postheader($url,$data,"",$token); | 129 | $res =HttpHelper::postheader($url,$data,"",$token); |
| @@ -193,7 +194,7 @@ class Index extends Api | @@ -193,7 +194,7 @@ class Index extends Api | ||
| 193 | return $res; | 194 | return $res; |
| 194 | } | 195 | } |
| 195 | 196 | ||
| 196 | - //-获得水表列表 | 197 | + //-获得水表数量 |
| 197 | public function getInstrumentcount(){ | 198 | public function getInstrumentcount(){ |
| 198 | $user=new User(); | 199 | $user=new User(); |
| 199 | $token=$user->uimsApitoken(); | 200 | $token=$user->uimsApitoken(); |
| @@ -208,4 +209,13 @@ class Index extends Api | @@ -208,4 +209,13 @@ class Index extends Api | ||
| 208 | } | 209 | } |
| 209 | } | 210 | } |
| 210 | 211 | ||
| 212 | + //获取水厂列表 | ||
| 213 | + public function test(){ | ||
| 214 | + $user=new User(); | ||
| 215 | + $token=$user->uimsApitoken(); | ||
| 216 | + $url="http://121.37.218.20:9011/data_api/v1/insListAll"; | ||
| 217 | + $res =HttpHelper::getheader($url,"","",$token); | ||
| 218 | + $res=json_decode($res,true); | ||
| 219 | + return $this->success($res['message'],$res['data']); | ||
| 220 | + } | ||
| 211 | } | 221 | } |
-
请 注册 或 登录 后发表评论