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
+
+
+
-
+
@@ -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(双行)