This commit is contained in:
weiz 2023-11-25 13:42:20 +08:00
parent 0932758165
commit 2c0a5ef054
2 changed files with 15 additions and 2 deletions

View File

@ -37,8 +37,13 @@ class IndexController extends BaseApiController
public function index(): Json
{
//获取土地信息
$land = Land::where('user_id',$this->userId)->order('id desc')->findOrEmpty();
$params = $this->request->get('land_id');
//获取土地信息
if(isset($params['land_id']) && $params['land_id'] !=''){
$land = Land::where('user_id',$this->userId)->where('id',$params['land_id'])->order('id desc')->findOrEmpty();
}else{
$land = Land::where('user_id',$this->userId)->order('id desc')->findOrEmpty();
}
if($land->isEmpty()){
return $this->success('请求成功',[]);
}

View File

@ -0,0 +1,8 @@
<?php
namespace app\api\controller;
class monitorController extends BaseApiController
{
}