fcy 4 rokov pred
rodič
commit
b5b56a84ed

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

@@ -210,7 +210,7 @@ class IndexController extends MainController
        // $arr = array(1 => '80℃', 2 => '2:100℃', 3 => '130℃');
         $sta = array('在线', '报警', '不在线', '未配置');
         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);