update #15

Merged
weiz merged 1 commits from zhangwei into dev 2023-11-25 13:43:18 +08:00
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
{
}