diff --git a/hcdbqb-management.html b/hcdbqb-management.html index dcc45e9..665621a 100644 --- a/hcdbqb-management.html +++ b/hcdbqb-management.html @@ -1,481 +1,531 @@ - - - - 管理后台 - - - -
- - - - - - - - - - - - - - - - -
#姓名国家/地区代码电话号码微信ID邮箱添加时间是否联系备注操作
-
-
- 每页显示 - - 条 -
+ } + + #noteModal { + display: none; + position: fixed; + inset: 0; + background: rgba(0, 0, 0, 0.45); + align-items: center; + justify-content: center; + z-index: 9999; + } + + #noteModal .dialog { + background: #fff; + padding: 16px; + border-radius: 8px; + width: 90%; + max-width: 520px; + box-sizing: border-box; + } + + #noteModal textarea { + width: 100%; + min-width: 60%; + max-width: 100%; + min-height: 150px; + box-sizing: border-box; + padding: 8px; + border-radius: 6px; + border: 1px solid #ddd; + font-size: 14px; + } + + .toast { + position: fixed; + top: -20px; + left: 50%; + transform: translateX(-50%); + background: #4caf50; + color: #fff; + padding: 10px 16px; + border-radius: 6px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); + font-size: 16px; + opacity: 0; + transition: all 0.3s ease; + z-index: 10000; + pointer-events: none; + } + + .toast.show { + opacity: 1; + top: 20px; + } -
0
+ table th, + table td { + text-align: center; + } + + - + +
+ + + + + + + + + + + + + + + + + +
#姓名WhatsApp国家/地区代码电话号码微信ID邮箱添加时间是否联系备注操作
+
+
+ 每页显示 + + 条
- -
-
-

编辑备注

- -
0
+ + +
+ +
+
+

编辑备注

+ +
- - -
+ "> + +
-
- - - + }); + + // 每页条数变更 + pageSizeSelect.addEventListener("change", () => { + const newSize = parseInt(pageSizeSelect.value, 10); + state.pageSize = newSize; + state.currentPage = 1; + update(); + gotoInput.value = ""; + }); + + async function update() { + const p = Math.max(1, state.currentPage); + state.currentPage = p; + await fetchPage(state.currentPage, state.pageSize); + renderTable(); + renderPagination(); + } + + // 简单安全的文本转义(防 XSS) + function escapeHtml(s) { + return String(s) + .replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """) + .replace(/'/g, "'"); + } + + // 首次渲染 + update(); + + + + \ No newline at end of file