app首页视频封面,上传监控视频封面

This commit is contained in:
chenbo 2024-01-08 16:38:55 +08:00
parent b04c038bd3
commit 19e6a34aab
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ class IndexController extends BaseApiController
$data['device_id'] = $device['id']; $data['device_id'] = $device['id'];
// 监控视频封面 // 监控视频封面
$file = File::where('cid', $device['id'])->order('id', 'desc')->findOrEmpty(); $file = File::where('cid', $device['id'])->order('id', 'desc')->findOrEmpty();
$data['video_cover'] = isset($file['url'])? env('project.project_url').'/'.$file['url']: ''; $data['video_cover'] = isset($file['uri'])? env('project.project_url').'/'.$file['uri']: '';
$landCollection = LandCollection::where('land_id',$params['land_id'])->order('id desc')->findOrEmpty(); $landCollection = LandCollection::where('land_id',$params['land_id'])->order('id desc')->findOrEmpty();
if($landCollection->isEmpty()){ if($landCollection->isEmpty()){
$data['monitor'] = []; $data['monitor'] = [];