diff --git a/app/api/controller/IndexController.php b/app/api/controller/IndexController.php index 4d0e24e4..a93e3482 100644 --- a/app/api/controller/IndexController.php +++ b/app/api/controller/IndexController.php @@ -44,6 +44,9 @@ class IndexController extends BaseApiController if($landProduct->isEmpty()){ $data['monitor'] = []; }else{ + $productDevice = ProductDevice::where('product_id',$landProduct['product_id'])->findOrEmpty(); + $device = Device::where('id', $productDevice['device_id'])->findOrEmpty(); + $data['video_url'] = $device['video_url']; $landCollection = LandCollection::where('land_id',$params['land_id'])->order('id desc')->findOrEmpty(); if($landCollection->isEmpty()){ $data['monitor'] = [];