Compare commits
No commits in common. "3eb365c461d834291d2552322c937f9225a09a4f" and "cbabc74ec4f23942982ff58879e3e6470c898185" have entirely different histories.
3eb365c461
...
cbabc74ec4
|
@ -5,7 +5,6 @@ use app\common\enum\notice\NoticeEnum;
|
||||||
use app\common\model\action\Action;
|
use app\common\model\action\Action;
|
||||||
use app\common\model\device\Device;
|
use app\common\model\device\Device;
|
||||||
use app\common\model\device\MonitorThreshold;
|
use app\common\model\device\MonitorThreshold;
|
||||||
use app\common\model\file\File;
|
|
||||||
use app\common\model\land\Land;
|
use app\common\model\land\Land;
|
||||||
use app\common\model\land\LandProduct;
|
use app\common\model\land\LandProduct;
|
||||||
use app\common\model\LandCollection;
|
use app\common\model\LandCollection;
|
||||||
|
@ -49,9 +48,6 @@ class IndexController extends BaseApiController
|
||||||
$device = Device::where('id', $productDevice['device_id'])->findOrEmpty();
|
$device = Device::where('id', $productDevice['device_id'])->findOrEmpty();
|
||||||
$data['video_url'] = $device['video_url'];
|
$data['video_url'] = $device['video_url'];
|
||||||
$data['device_id'] = $device['id'];
|
$data['device_id'] = $device['id'];
|
||||||
// 监控视频封面
|
|
||||||
$file = File::where('cid', $device['id'])->order('id', 'desc')->findOrEmpty();
|
|
||||||
$data['video_cover'] = isset($file['url'])? env('project.project_url').'/'.$file['url']: '';
|
|
||||||
$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'] = [];
|
||||||
|
|
|
@ -44,16 +44,5 @@ class UploadController extends BaseApiController
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function uploadVideoCover()
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
$deviceId = $this->request->param('device_id', '');
|
|
||||||
$result = UploadService::image($deviceId, $this->userId,FileEnum::SOURCE_USER);
|
|
||||||
return $this->success('上传成功', ['url'=>env('project.project_url').'/'.$result['url']]);
|
|
||||||
} catch (Exception $e) {
|
|
||||||
return $this->fail($e->getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue