浏览代码

Merge branch 'master' of http://121.36.46.135:3000/huangzhidong/guoyao-jiankang

hzd 1 年之前
父节点
当前提交
edba129456
共有 1 个文件被更改,包括 26 次插入2 次删除
  1. 26 2
      application/api/controller/screen/Index.php

+ 26 - 2
application/api/controller/screen/Index.php

@@ -18,8 +18,8 @@ class Index extends Controller
 
         $token = input('token','','trim');
 
-        $str = think_decrypt($token);
-//        $str = '1|3';
+//        $str = think_decrypt($token);
+        $str = '1|3';
         $data = $str?explode('|',$str):[];
         if(count($data) != 2){
             HelpHander::error('参数错误');
@@ -68,4 +68,28 @@ class Index extends Controller
         HelpHander::success($data);
     }
 
+    public function getMonitor(){
+        $list = Db::name('monitor')
+            ->where('org_id',$this->orgId)
+            ->where('del',0)
+            ->where('enable',0)
+            ->limit(10)
+            ->order('id desc')
+            ->select();
+        $data = [
+            'info'=>isset($list[0])?$list[0]:null,
+            'info1'=>isset($list[1])?$list[1]:null,
+            'info2'=>isset($list[2])?$list[2]:null,
+            'info3'=>isset($list[3])?$list[3]:null,
+            'info4'=>isset($list[4])?$list[4]:null,
+            'info5'=>isset($list[5])?$list[5]:null,
+            'info6'=>isset($list[6])?$list[6]:null,
+            'info7'=>isset($list[7])?$list[7]:null,
+            'info8'=>isset($list[8])?$list[8]:null,
+            'info9'=>isset($list[9])?$list[9]:null,
+        ];
+
+        HelpHander::success($data);
+    }
+
 }