From a4d38872057edd1f8e6e5b58d0816d07ca659e70 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Wed, 27 Dec 2023 18:10:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/IndexController.php | 3 +++ 1 file changed, 3 insertions(+) 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'] = [];