From b5324fda0c74c69d58cfeb85f05d1546e4eb1c46 Mon Sep 17 00:00:00 2001 From: xing Date: Sat, 8 Oct 2022 14:12:10 +0800 Subject: [PATCH] fix bug --- actions/index.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/index.go b/actions/index.go index ad09963..66a9766 100644 --- a/actions/index.go +++ b/actions/index.go @@ -143,7 +143,7 @@ func (h *indexHandle) parseParams() { h.page = pa } } - if common.TotalRaw > 0 && h.getTotalPage(common.TotalRaw) < h.page*h.page { + if common.TotalRaw > 0 && common.TotalRaw < (h.page-1)*h.pageSize { h.page = 1 } if h.page > 1 && (h.category != "" || h.search != "" || month != "") {