From 5d3d667143bd41cc8d9bedd86a630f9247b2abeb Mon Sep 17 00:00:00 2001 From: Karson Date: Wed, 28 Feb 2024 11:59:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E9=A1=B5=E9=80=89?= =?UTF-8?q?=E4=B8=ADall=E5=90=8E=E5=88=B7=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/controller/Backend.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/common/controller/Backend.php b/application/common/controller/Backend.php index d4c38b8d..e7924a0a 100644 --- a/application/common/controller/Backend.php +++ b/application/common/controller/Backend.php @@ -269,7 +269,8 @@ class Backend extends Controller $sort = $this->request->get("sort", !empty($this->model) && $this->model->getPk() ? $this->model->getPk() : 'id'); $order = $this->request->get("order", "DESC"); $offset = $this->request->get("offset/d", 0); - $limit = $this->request->get("limit/d", 999999); + $limit = $this->request->get("limit/d", 0); + $limit = $limit ?: 999999; //新增自动计算页码 $page = $limit ? intval($offset / $limit) + 1 : 1; if ($this->request->has("page")) {