Compare commits
2 Commits
0932758165
...
96b754ef4a
Author | SHA1 | Date |
---|---|---|
weiz | 96b754ef4a | |
weiz | 2c0a5ef054 |
|
@ -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('请求成功',[]);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
class monitorController extends BaseApiController
|
||||
{
|
||||
|
||||
}
|
Loading…
Reference in New Issue