From e401393ad32465b2fbe29f75746438118d140eff Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Mon, 26 Feb 2024 15:55:31 +0800 Subject: [PATCH] add --- app/adminapi/controller/user/UserController.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/adminapi/controller/user/UserController.php b/app/adminapi/controller/user/UserController.php index 8eb88d1c..72bfdc03 100644 --- a/app/adminapi/controller/user/UserController.php +++ b/app/adminapi/controller/user/UserController.php @@ -131,9 +131,9 @@ class UserController extends BaseAdminController public function villageInfoList() { //分页 - $pageNo = $this->request->get('page_no',1); - $pageSize = $this->request->get('page_size', 25); - $query = VillagerInformation::page($pageNo,$pageSize); + $page_no = $this->request->get('page_no',1); + $page_size = $this->request->get('page_size', 25); + $query = VillagerInformation::page($page_no,$page_size); $name = $this->request->get('name', ''); $contact = $this->request->get('contact', ''); if ($name) { @@ -142,7 +142,9 @@ class UserController extends BaseAdminController if ($contact) { $query->where('contact', '=', $contact); } + $list = $query->select()->toArray(); - return $this->success('成功', compact('list')); + $count = VillagerInformation::count(); + return $this->success('成功', compact('list','count','page_no','page_size')); } } \ No newline at end of file