fcy il y a 4 ans
Parent
commit
b5b56a84ed
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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℃');
         $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);