From 00f71306b5c4c4bb3e83ec418ae6bbfb58e37fc7 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 1 Jul 2024 09:41:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(UserShipLists):=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AD=89=E7=BA=A7=E9=99=90=E5=88=B6=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/user/UserController.php | 2 +- app/common/lists/user/UserShipLists.php | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/api/controller/user/UserController.php b/app/api/controller/user/UserController.php index 82e0e16be..12a550175 100644 --- a/app/api/controller/user/UserController.php +++ b/app/api/controller/user/UserController.php @@ -279,7 +279,7 @@ class UserController extends BaseApiController $user['address_info']=$address; return $this->success('ok',$user->toArray()); }else{ - return $this->fail('用户不存在'); + return $this->fail('用户不存在',[],0,0); } } return $this->success('ok',[]); diff --git a/app/common/lists/user/UserShipLists.php b/app/common/lists/user/UserShipLists.php index 8356504b1..325f25b35 100644 --- a/app/common/lists/user/UserShipLists.php +++ b/app/common/lists/user/UserShipLists.php @@ -37,12 +37,10 @@ class UserShipLists extends BaseAdminDataLists public function lists(): array { - $field = "id,title"; + $field = "id,title,limit"; $arr=[]; - if($this->request->__get('id')){ - $this->searchWhere[]=['id','in',[1,4]]; - }else{ - $arr[]=['id'=>0,'title'=>'一般用户']; + if(!$this->request->__get('id')){ + $arr[]=['id'=>0,'title'=>'一般用户','limit'=>0]; } $lists = UserShip::where($this->searchWhere) ->limit($this->limitOffset, $this->limitLength)