fcy %!s(int64=4) %!d(string=hai) anos
pai
achega
b5b56a84ed
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      application/web/controller/IndexController.php

+ 1 - 1
application/web/controller/IndexController.php

@@ -210,7 +210,7 @@ class IndexController extends MainController
        // $arr = array(1 => '80℃', 2 => '2:100℃', 3 => '130℃');
        // $arr = array(1 => '80℃', 2 => '2:100℃', 3 => '130℃');
         $sta = array('在线', '报警', '不在线', '未配置');
         $sta = array('在线', '报警', '不在线', '未配置');
         foreach ($deviceinfo as $k => &$v) {
         foreach ($deviceinfo as $k => &$v) {
-            $v['STATUS'] = $sta[$v['STATUS']];
+            $v['STATUS'] = $sta[is_null($v['STATUS'])? 3:$v['STATUS']];
         }
         }
 
 
         $this->api_return_json(compact('deviceinfo'), 1);
         $this->api_return_json(compact('deviceinfo'), 1);