Compare commits
No commits in common. "d51397ef95b75db31952175acadc6c6eefa7d837" and "73182f382cd4c85ccef47409f298b0b68a350236" have entirely different histories.
d51397ef95
...
73182f382c
|
@ -3,7 +3,6 @@ namespace app\api\controller;
|
||||||
|
|
||||||
use app\common\enum\notice\NoticeEnum;
|
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\land\Land;
|
use app\common\model\land\Land;
|
||||||
use app\common\model\land\LandProduct;
|
use app\common\model\land\LandProduct;
|
||||||
use app\common\model\monitor\MonitorData;
|
use app\common\model\monitor\MonitorData;
|
||||||
|
@ -23,7 +22,6 @@ class IndexController extends BaseApiController
|
||||||
|
|
||||||
public array $notNeedLogin = ['code','suYuan'];
|
public array $notNeedLogin = ['code','suYuan'];
|
||||||
|
|
||||||
//溯源首页
|
|
||||||
public function index(): Json
|
public function index(): Json
|
||||||
{
|
{
|
||||||
$params = $this->request->get(['land_id']);
|
$params = $this->request->get(['land_id']);
|
||||||
|
@ -68,35 +66,16 @@ class IndexController extends BaseApiController
|
||||||
'create_time' => $monitor['create_time']
|
'create_time' => $monitor['create_time']
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
$device = ProductDevice::where('product_id',$landProduct['product_id'])->where('device_type',3)->findOrEmpty();
|
||||||
|
// if($device->isEmpty()){
|
||||||
|
// $data['monitor']['video_monitor_data'] = '';
|
||||||
|
// }else{
|
||||||
|
// $data['monitor']['video_monitor_data'] = '';
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
return $this->success('请求成功',$data);
|
return $this->success('请求成功',$data);
|
||||||
}
|
}
|
||||||
|
|
||||||
//视频监控
|
|
||||||
public function video() {
|
|
||||||
$params = $this->request->get(['land_id']);
|
|
||||||
if(empty($params['land_id'])){
|
|
||||||
return $this->fail('参数错误');
|
|
||||||
}
|
|
||||||
//获取土地绑定的产品
|
|
||||||
$landProduct = LandProduct::where('land_id',$params['land_id'])->findOrEmpty();
|
|
||||||
if($landProduct->isEmpty()){
|
|
||||||
return $this->fail('当前土地未绑定设备产品');
|
|
||||||
}
|
|
||||||
//获取监控设备
|
|
||||||
$productDevice = ProductDevice::where('product_id',$landProduct['product_id'])->where('device_type',3)->findOrEmpty();
|
|
||||||
if($productDevice->isEmpty()){
|
|
||||||
return $this->fail('当前土地未绑定监控设备');
|
|
||||||
}
|
|
||||||
//获取设备编号
|
|
||||||
$device = Device::where('id',$productDevice['device_id'])->findOrEmpty();
|
|
||||||
if($device->isEmpty()){
|
|
||||||
return $this->fail('监控设备信息错误');
|
|
||||||
}
|
|
||||||
//获取监控数据
|
|
||||||
//todo
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取短信验证码
|
// 获取短信验证码
|
||||||
public function code(): Json
|
public function code(): Json
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue