更新 app/api/controller/IndexController.php

修复错误
This commit is contained in:
mkm 2023-12-20 18:13:12 +08:00
parent f6f4e5e007
commit 4e86efbab4
1 changed files with 2 additions and 2 deletions

View File

@ -70,8 +70,8 @@ class IndexController extends BaseApiController
'create_time' => $landCollection['create_time']
];
$monitorThreshold = MonitorThreshold::select();
if($monitorThreshold){
$monitorThreshold=$monitorThreshold->toArray()[0];
if($monitorThreshold->toArray()!=null){
$monitorThreshold=$monitorThreshold[0];
}else{
$monitorThreshold=[];
}