From 3f5284e067d6d249f065a74da933b425028807d3 Mon Sep 17 00:00:00 2001 From: hubian <908234780@qq.com> Date: Fri, 24 Apr 2026 12:24:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BB=9F=E8=AE=A1=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E6=94=B9=E4=B8=80=E8=A1=8C=E6=98=BE=E7=A4=BA+=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=B8=8A=E6=96=B9=E5=A2=9E=E5=8A=A0=E7=BF=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xian_favor/api.py | 97 ++++++++++++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 39 deletions(-) diff --git a/xian_favor/api.py b/xian_favor/api.py index 06073a4..f21948c 100644 --- a/xian_favor/api.py +++ b/xian_favor/api.py @@ -1491,46 +1491,21 @@ INDEX_TEMPLATE = ''' - -
-
-
-
-
总条目
-

0

-
-
-
-
-
-
-
待处理
-

0

-
-
-
-
-
-
-
进行中
-

0

-
-
-
-
-
-
-
已完成
-

0

-
-
-
+ +
+ 总条目: 0 + 待处理: 0 + 进行中: 0 + 已完成: 0
+ +
+
- +
@@ -2689,16 +2664,60 @@ function renderItems(items) { `}).join(''); } -// 渲染分页 +// 渲染分页(顶部和底部) function renderPagination(total, page) { - const container = document.getElementById('pagination'); + const containerBottom = document.getElementById('pagination'); + const containerTop = document.getElementById('paginationTop'); const totalPages = Math.ceil(total / pageSize); + // 清空顶部容器 + if (containerTop) containerTop.innerHTML = ''; + if (totalPages <= 1) { - container.innerHTML = ''; + containerBottom.innerHTML = ''; return; } + // 顶部:显示总数 + 简洁翻页 + if (containerTop) { + let topHtml = `共 ${total} 条,第 ${page}/${totalPages} 页`; + topHtml += ''; + containerTop.innerHTML = topHtml; + } + + // 底部:完整翻页 let html = ''; - container.innerHTML = html; + containerBottom.innerHTML = html; } // 显示模式:single(单行)或 double(双行)