-
- 每页显示
-
- 条
-
+ }
+
+ #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 |
+ 邮箱 |
+ 添加时间 |
+ 是否联系 |
+ 备注 |
+ 操作 |
+
+
+
+
+
+
+ 每页显示
+
+ 条
-
-
-
+
+
+
+
编辑备注
+
+
-
-
-
+ ">
+
+
-
-
-
-
+ });
+
+ // 每页条数变更
+ 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();
+
+