From cb3ad3bebe6a526a96e97e00e7a7a9ea4c33d22c Mon Sep 17 00:00:00 2001 From: pggiroro Date: Mon, 26 Feb 2024 15:06:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E9=A1=B5=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- restful.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/restful.go b/restful.go index 7eab5b5..61d7153 100644 --- a/restful.go +++ b/restful.go @@ -158,7 +158,7 @@ func (conf *RecordConfig) API_list_page(w http.ResponseWriter, r *http.Request) if pageNumInt > 0 { totalPageCount = (totalCount / pageSizeInt) + 1 //总页数 remainCount := totalCount % pageSizeInt //分页后剩余条数 - if remainCount == 0 { + if remainCount == 0 && totalPageCount != 1 { totalPageCount = totalCount / pageSizeInt } if pageNumInt > totalPageCount { @@ -245,7 +245,7 @@ func (conf *RecordConfig) API_list_recording_page(w http.ResponseWriter, r *http if pageNumInt > 0 { totalPageCount = (totalCount / pageSizeInt) + 1 //总页数 remainCount := totalCount % pageSizeInt //分页后剩余条数 - if remainCount == 0 { + if remainCount == 0 && totalPageCount != 1 { totalPageCount = totalCount / pageSizeInt } if pageNumInt > totalPageCount {