市场夺宝奇兵
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

222 lines
5.6 KiB

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width,initial-scale=1" />
  6. <title>管理后台</title>
  7. <style>
  8. body {
  9. font-family: Arial, sans-serif;
  10. padding: 24px;
  11. background: #f7f8fb;
  12. color: #222;
  13. }
  14. .card {
  15. background: #fff;
  16. padding: 16px;
  17. border-radius: 8px;
  18. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  19. margin: auto;
  20. }
  21. table {
  22. width: 100%;
  23. border-collapse: collapse;
  24. margin-top: 12px;
  25. }
  26. th,
  27. td {
  28. padding: 10px 12px;
  29. border-bottom: 1px solid #eee;
  30. text-align: left;
  31. font-size: 14px;
  32. }
  33. th {
  34. background: #fafafa;
  35. font-weight: 600;
  36. }
  37. .controls {
  38. display: flex;
  39. gap: 12px;
  40. align-items: center;
  41. flex-wrap: wrap;
  42. }
  43. .pagination {
  44. display: flex;
  45. gap: 6px;
  46. align-items: center;
  47. margin-left: auto;
  48. flex-wrap: wrap;
  49. }
  50. .btn {
  51. padding: 6px 10px;
  52. border-radius: 6px;
  53. border: 1px solid #ddd;
  54. background: #fff;
  55. cursor: pointer;
  56. user-select: none;
  57. }
  58. .btn:disabled {
  59. opacity: 0.5;
  60. cursor: default;
  61. }
  62. .btn.primary {
  63. background: #007bff;
  64. color: #fff;
  65. border-color: #007bff;
  66. }
  67. .status-btn {
  68. padding: 4px 8px;
  69. border-radius: 6px;
  70. border: 1px solid #ccc;
  71. cursor: pointer;
  72. }
  73. .status-0 {
  74. background: red;
  75. color: #fff;
  76. }
  77. .status-1 {
  78. background: #2f9e44;
  79. color: #fff;
  80. border-color: #2f9e44;
  81. }
  82. .btn.active {
  83. background: #007bff;
  84. color: #fff;
  85. border-color: #007bff;
  86. }
  87. select,
  88. input[type="number"] {
  89. padding: 6px;
  90. border-radius: 6px;
  91. border: 1px solid #ddd;
  92. }
  93. .small {
  94. font-size: 13px;
  95. color: #666;
  96. }
  97. @media (max-width: 640px) {
  98. .controls {
  99. flex-direction: column;
  100. align-items: flex-start;
  101. }
  102. .pagination {
  103. margin-left: 0;
  104. }
  105. }
  106. #noteModal {
  107. display: none;
  108. position: fixed;
  109. inset: 0;
  110. background: rgba(0, 0, 0, 0.45);
  111. align-items: center;
  112. justify-content: center;
  113. z-index: 9999;
  114. }
  115. #noteModal .dialog {
  116. background: #fff;
  117. padding: 16px;
  118. border-radius: 8px;
  119. width: 90%;
  120. max-width: 520px;
  121. box-sizing: border-box;
  122. }
  123. #noteModal textarea {
  124. width: 100%;
  125. min-width: 60%;
  126. max-width: 100%;
  127. min-height: 150px;
  128. box-sizing: border-box;
  129. padding: 8px;
  130. border-radius: 6px;
  131. border: 1px solid #ddd;
  132. font-size: 14px;
  133. }
  134. .toast {
  135. position: fixed;
  136. top: -20px;
  137. left: 50%;
  138. transform: translateX(-50%);
  139. background: #4caf50;
  140. color: #fff;
  141. padding: 10px 16px;
  142. border-radius: 6px;
  143. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  144. font-size: 16px;
  145. opacity: 0;
  146. transition: all 0.3s ease;
  147. z-index: 10000;
  148. pointer-events: none;
  149. }
  150. .toast.show {
  151. opacity: 1;
  152. top: 20px;
  153. }
  154. table th,
  155. table td {
  156. text-align: center;
  157. }
  158. </style>
  159. <script type="module" crossorigin src="./management.js"></script>
  160. <link rel="modulepreload" crossorigin href="./member.js">
  161. </head>
  162. <body>
  163. <div class="card">
  164. <table aria-describedby="tableDesc">
  165. <thead>
  166. <tr>
  167. <th style="width: 40px">#</th>
  168. <th style="width: 100px">姓名</th>
  169. <th style="width: 90px">国家/地区代码</th>
  170. <th style="width: 120px">电话号码</th>
  171. <th style="width: 120px">微信ID</th>
  172. <th style="width: 150px">邮箱</th>
  173. <th style="width: 160px">添加时间</th>
  174. <th style="width: 100px">是否联系</th>
  175. <th style="width: 160px">备注</th>
  176. <th style="width: 100px">操作</th>
  177. </tr>
  178. </thead>
  179. <tbody id="tableBody"></tbody>
  180. </table>
  181. <div class="controls" style="margin-bottom: 8px; margin-top: 12px">
  182. <div class="small">
  183. 每页显示
  184. <select id="pageSizeSelect">
  185. <option value="20" selected>20</option>
  186. <option value="50">50</option>
  187. <option value="100">100</option>
  188. <option value="200">200</option>
  189. </select>
  190. </div>
  191. <div class="small"><span id="totalCount">0</span></div>
  192. <div class="pagination" id="pagination"></div>
  193. </div>
  194. <!-- 备注编辑模态 -->
  195. <div id="noteModal">
  196. <div class="dialog">
  197. <h3 style="margin: 0 0 8px">编辑备注</h3>
  198. <textarea
  199. id="noteTextarea"
  200. rows="6"
  201. placeholder="输入备注..."
  202. ></textarea>
  203. <div
  204. style="
  205. margin-top: 10px;
  206. display: flex;
  207. justify-content: flex-end;
  208. gap: 8px;
  209. "
  210. >
  211. <button class="btn" id="noteCancelBtn">取消</button>
  212. <button class="btn primary" id="noteSaveBtn">保存</button>
  213. </div>
  214. </div>
  215. </div>
  216. </div>
  217. <div id="toast" class="toast"></div>
  218. </body>
  219. </html>