From 125a336220d28d83b752e9f544344e0d3bcf9e29 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 18 Sep 2025 17:14:59 +0800 Subject: [PATCH] 1 --- app/custom/svc/svc_task_list.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/custom/svc/svc_task_list.go b/app/custom/svc/svc_task_list.go index 8d0d89a..96bafc6 100644 --- a/app/custom/svc/svc_task_list.go +++ b/app/custom/svc/svc_task_list.go @@ -246,8 +246,11 @@ func TaskDetailNotice(c *gin.Context) { if args["type"] != "" { sess.And("type=?", args["type"]) } - size := utils.StrToInt(args["size"]) + size := 10 p := utils.StrToInt(args["p"]) + if p == 0 { + p = 1 + } sess.Limit(size, (p-1)*size).OrderBy("id desc").Find(&data) list := make([]map[string]string, 0) for _, v := range data {