From 86345d50f9f8222484d0bf7643710bb9f4541673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A7=89?= Date: Mon, 13 Nov 2023 23:28:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=A1=B5=E9=BB=98=E8=AE=A4=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/main.go b/bin/main.go index 505ef1a..25898df 100644 --- a/bin/main.go +++ b/bin/main.go @@ -331,7 +331,7 @@ func main() { // 获取图片列表 var images ListView var image_list []Image - images.Page, images.PageSize = stringToInt(r.URL.Query().Get("page"), 1), stringToInt(r.URL.Query().Get("pageSize"), 10) + images.Page, images.PageSize = stringToInt(r.URL.Query().Get("page"), 1), stringToInt(r.URL.Query().Get("pageSize"), 20) rows, err := mysqlConnection.Database.Query("SELECT id, width, height, content, update_time, create_time, user_id, article_id, article_category_top_id, praise_count, collect_count FROM web_images"+conditions.String()+" LIMIT ?, ?", (images.Page-1)*images.PageSize, images.PageSize) if err != nil { log.Println("获取图片列表失败", err) @@ -499,7 +499,7 @@ func main() { // 获取标签列表 var tags ListView - tags.Page, tags.PageSize = stringToInt(r.FormValue("page"), 1), stringToInt(r.FormValue("pageSize"), 10) + tags.Page, tags.PageSize = stringToInt(r.FormValue("page"), 1), stringToInt(r.FormValue("pageSize"), 20) rows, err := mysqlConnection.Database.Query("SELECT id, name, update_time, create_time FROM web_tags"+conditions+" ORDER BY id DESC LIMIT ?, ?", (tags.Page-1)*tags.PageSize, tags.PageSize) if err != nil { log.Println(err)