From dba0e47999717d49b4d54926d4f10141f0420c65 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Mon, 30 Oct 2023 13:41:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=BA=E4=BA=8B=E8=B0=83?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Common.php | 4 ++-- app/api/controller/NoteIndex.php | 4 ++-- app/api/controller/UserPersonal.php | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/api/controller/Common.php b/app/api/controller/Common.php index 10609b1..502f89b 100644 --- a/app/api/controller/Common.php +++ b/app/api/controller/Common.php @@ -74,8 +74,8 @@ class Common extends ApiController $param = get_params(); $where[] = ['a.status', '=', 1]; $where[] = ['a.id', '>', 1]; - if (!empty($param['keywords'])) { - $where[] = ['a.name', 'like', '%' . $param['keywords'] . '%']; + if (!empty($param['keyword'])) { + $where[] = ['a.name', 'like', '%' . $param['keyword'] . '%']; } if(!empty($param['ids'])){ $where[] = ['a.id', 'notin', $param['ids']]; diff --git a/app/api/controller/NoteIndex.php b/app/api/controller/NoteIndex.php index 9336510..7c22c0e 100644 --- a/app/api/controller/NoteIndex.php +++ b/app/api/controller/NoteIndex.php @@ -28,8 +28,8 @@ class NoteIndex extends ApiController $this->checkAuth(); $param = get_params(); $where = array(); - if (!empty($param['keywords'])) { - $where[] = ['a.title', 'like', '%' . $param['keywords'] . '%']; + if (!empty($param['keyword'])) { + $where[] = ['a.title', 'like', '%' . $param['keyword'] . '%']; } $where[] = ['a.status', '=', 1]; $rows = empty($param['limit']) ? get_config('app.page_size') : $param['limit']; diff --git a/app/api/controller/UserPersonal.php b/app/api/controller/UserPersonal.php index 767349f..eb45a4e 100644 --- a/app/api/controller/UserPersonal.php +++ b/app/api/controller/UserPersonal.php @@ -28,8 +28,8 @@ class UserPersonal extends ApiController { $param = get_params(); $where = []; - if (!empty($param['keywords'])) { - $where[] = ['u.name|p.remark|a.title|b.title','like', '%' . $param['keywords'] . '%']; + if (!empty($param['keyword'])) { + $where[] = ['u.name|p.remark|a.title|b.title','like', '%' . $param['keyword'] . '%']; } $where[] = ['p.status','=', 1]; $rows = empty($param['limit']) ? get_config('app.page_size') : $param['limit']; @@ -91,8 +91,8 @@ class UserPersonal extends ApiController if (request()->isAjax()) { $param = get_params(); $where = array(); - if (!empty($param['keywords'])) { - $where['u.name|p.remark'] = ['like', '%' . $param['keywords'] . '%']; + if (!empty($param['keyword'])) { + $where['u.name|p.remark'] = ['like', '%' . $param['keyword'] . '%']; } $where['p.status'] = array('eq', 1); $rows = empty($param['limit']) ? get_config('app.page_size') : $param['limit'];