fixed
This commit is contained in:
parent
32fcb1700d
commit
27fd838861
|
@ -8,7 +8,7 @@ use think\response\Json;
|
||||||
|
|
||||||
class SuYuanController extends BaseAdminController
|
class SuYuanController extends BaseAdminController
|
||||||
{
|
{
|
||||||
public array $notNeedLogin = ['areaLists','areaDetail','monitorDetail','imageUpload'];
|
public array $notNeedLogin = ['areaLists','areaDetail','monitorDetail','imageUpload','monitorList'];
|
||||||
|
|
||||||
//添加种植基地
|
//添加种植基地
|
||||||
public function addArea(): Json
|
public function addArea(): Json
|
||||||
|
@ -114,14 +114,23 @@ class SuYuanController extends BaseAdminController
|
||||||
return $this->fail('参数错误');
|
return $this->fail('参数错误');
|
||||||
}
|
}
|
||||||
$data = Db::name('environmental_data')->where('production_base_id',$params['id'])->where('flag',$params['flag'])->order('id desc')->findOrEmpty();
|
$data = Db::name('environmental_data')->where('production_base_id',$params['id'])->where('flag',$params['flag'])->order('id desc')->findOrEmpty();
|
||||||
if(empty($data)){
|
|
||||||
return $this->success('请求成功',[]);
|
|
||||||
}
|
|
||||||
$content = Db::name('production_base')->where('id',$data['production_base_id'])->field('content')->findOrEmpty();
|
|
||||||
$data['content'] = $content['content'];
|
|
||||||
return $this->success('请求成功',$data);
|
return $this->success('请求成功',$data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function monitorList() {
|
||||||
|
$params = $this->request->get(['id','flag']);
|
||||||
|
if(empty($params['id']) || empty($params['flag'])){
|
||||||
|
return $this->fail('参数错误');
|
||||||
|
}
|
||||||
|
$data = Db::name('environmental_data')->where('production_base_id',$params['id'])->where('flag',$params['flag'])->limit(6)->select();
|
||||||
|
$content = Db::name('production_base')->where('id',$params['id'])->field('content')->findOrEmpty();
|
||||||
|
$result = [];
|
||||||
|
foreach ($data as $v) {
|
||||||
|
|
||||||
|
}
|
||||||
|
dump($data);die;
|
||||||
|
}
|
||||||
|
|
||||||
//上传图片
|
//上传图片
|
||||||
public function imageUpload(): Json
|
public function imageUpload(): Json
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue