update
This commit is contained in:
parent
0932758165
commit
2c0a5ef054
|
@ -37,8 +37,13 @@ class IndexController extends BaseApiController
|
||||||
|
|
||||||
public function index(): Json
|
public function index(): Json
|
||||||
{
|
{
|
||||||
|
$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();
|
$land = Land::where('user_id',$this->userId)->order('id desc')->findOrEmpty();
|
||||||
|
}
|
||||||
if($land->isEmpty()){
|
if($land->isEmpty()){
|
||||||
return $this->success('请求成功',[]);
|
return $this->success('请求成功',[]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\api\controller;
|
||||||
|
|
||||||
|
class monitorController extends BaseApiController
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue