From db09ade51ef0c9f8688448c025e6275c932c740d Mon Sep 17 00:00:00 2001 From: hdm Date: Fri, 2 Sep 2022 09:23:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=85=8D=E7=BD=AE=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E3=80=81=E6=9D=83=E9=99=90=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B5=EF=BC=8C=E5=8E=BB=E9=99=A4=E5=88=86=E9=A1=B5=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/home/controller/Conf.php | 7 ++----- app/home/controller/Role.php | 7 ++----- app/home/view/conf/index.html | 2 +- app/home/view/role/index.html | 17 +---------------- 4 files changed, 6 insertions(+), 27 deletions(-) diff --git a/app/home/controller/Conf.php b/app/home/controller/Conf.php index e9dca9d..c45edf9 100644 --- a/app/home/controller/Conf.php +++ b/app/home/controller/Conf.php @@ -23,11 +23,8 @@ class Conf extends BaseController $param = get_params(); $where = array(); $where[] = ['status', '>=', 0]; - $rows = empty($param['limit']) ? get_config('app . page_size') : $param['limit']; - $content = Db::name('Config') - ->where($where) - ->paginate($rows, false, ['query' => $param]); - return table_assign(0, '', $content); + $list = Db::name('Config')->where($where)->select(); + return to_assign(0, '', $list); } else { return view(); } diff --git a/app/home/controller/Role.php b/app/home/controller/Role.php index 304e77e..40e8f24 100644 --- a/app/home/controller/Role.php +++ b/app/home/controller/Role.php @@ -26,11 +26,8 @@ class Role extends BaseController if (!empty($param['keywords'])) { $where[] = ['id|title|desc', 'like', '%' . $param['keywords'] . '%']; } - $rows = empty($param['limit']) ? get_config('app . page_size') : $param['limit']; - $group = AdminGroup::where($where) - ->order('create_time asc') - ->paginate($rows, false, ['query' => $param]); - return table_assign(0, '', $group); + $list = Db::name('AdminGroup')->where($where)->order('create_time asc')->select(); + return to_assign(0, '', $list); } else { return view(); } diff --git a/app/home/view/conf/index.html b/app/home/view/conf/index.html index a408e7d..485925e 100644 --- a/app/home/view/conf/index.html +++ b/app/home/view/conf/index.html @@ -28,7 +28,7 @@ toolbar: '#toolbarDemo', url: "/home/conf/index", cellMinWidth: 360, - page: true, //开启分页 + page: false, //开启分页 limit: 20, cols: [ [{ diff --git a/app/home/view/role/index.html b/app/home/view/role/index.html index a2efbf3..da13ab5 100644 --- a/app/home/view/role/index.html +++ b/app/home/view/role/index.html @@ -2,12 +2,6 @@ {block name="body"}
-
-
- -
- -
@@ -32,7 +26,7 @@ elem: '#role', toolbar: '#toolbarDemo', url: "/home/role/index", //数据接口 - page: true, //开启分页 + page: false, //开启分页 limit: 20, cols: [[ //表头 { field: 'id', title: 'ID号', align: 'center', width: 80 } @@ -75,15 +69,6 @@ }); } }); - - //监听搜索提交 - form.on('submit(webform)', function (data) { - layui.pageTable.reload({ - where: { keywords: data.field.keywords }, - page: { curr: 1 } - }); - return false; - }); }