Browse Source

金家渠内网摄像头链接

任敬轩 2 years ago
parent
commit
587f70a8fd
1 changed files with 7 additions and 1 deletions
  1. 7 1
      Modules/Camera/Services/CameraServices.php

+ 7 - 1
Modules/Camera/Services/CameraServices.php

@@ -1751,7 +1751,13 @@ class CameraServices
             ]
         );
         $haikang   = new HaiKangController();
-        $result['data'] = ['camera_id' => $camera_id,'url' => $haikang->getCamerasUrl()];
+        $result_hk = $haikang->getCamerasUrl()
+        if ($result_hk['data']['url']) {
+            $result['data'] = ['camera_id' => $camera_id,'url' => $result_hk['data']['url']];
+        }else{
+            $result['status'] = false;
+            $result['msg']    = ApiEnum::HK_REQUEST_FAIL;
+        }
 
         return $result;
     }