市场夺宝奇兵
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.

297 lines
6.4 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. .btn.whatsapp {
  68. background: #25D366;
  69. color: #fff;
  70. border-color: #25D366;
  71. }
  72. .status-btn {
  73. padding: 4px 8px;
  74. border-radius: 6px;
  75. border: 1px solid #ccc;
  76. cursor: pointer;
  77. }
  78. .status-0 {
  79. background: red;
  80. color: #fff;
  81. }
  82. .status-1 {
  83. background: #2f9e44;
  84. color: #fff;
  85. border-color: #2f9e44;
  86. }
  87. .btn.active {
  88. background: #007bff;
  89. color: #fff;
  90. border-color: #007bff;
  91. }
  92. select,
  93. input[type="number"] {
  94. padding: 6px;
  95. border-radius: 6px;
  96. border: 1px solid #ddd;
  97. }
  98. .small {
  99. font-size: 13px;
  100. color: #666;
  101. }
  102. @media (max-width: 640px) {
  103. .controls {
  104. flex-direction: column;
  105. align-items: flex-start;
  106. }
  107. .pagination {
  108. margin-left: 0;
  109. }
  110. }
  111. #noteModal {
  112. display: none;
  113. position: fixed;
  114. inset: 0;
  115. background: rgba(0, 0, 0, 0.45);
  116. align-items: center;
  117. justify-content: center;
  118. z-index: 9999;
  119. }
  120. #noteModal .dialog {
  121. background: #fff;
  122. padding: 16px;
  123. border-radius: 8px;
  124. width: 90%;
  125. max-width: 520px;
  126. box-sizing: border-box;
  127. }
  128. #noteModal textarea {
  129. width: 100%;
  130. min-width: 60%;
  131. max-width: 100%;
  132. min-height: 150px;
  133. box-sizing: border-box;
  134. padding: 8px;
  135. border-radius: 6px;
  136. border: 1px solid #ddd;
  137. font-size: 14px;
  138. }
  139. .toast {
  140. position: fixed;
  141. top: -20px;
  142. left: 50%;
  143. transform: translateX(-50%);
  144. background: #4caf50;
  145. color: #fff;
  146. padding: 10px 16px;
  147. border-radius: 6px;
  148. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  149. font-size: 16px;
  150. opacity: 0;
  151. transition: all 0.3s ease;
  152. z-index: 10000;
  153. pointer-events: none;
  154. }
  155. .toast.show {
  156. opacity: 1;
  157. top: 20px;
  158. }
  159. table th,
  160. table td {
  161. text-align: center;
  162. }
  163. /* 登录验证样式 */
  164. #loginCheckModal {
  165. display: none;
  166. position: fixed;
  167. inset: 0;
  168. background: rgba(0, 0, 0, 0.7);
  169. align-items: center;
  170. justify-content: center;
  171. z-index: 99999;
  172. }
  173. #loginCheckModal .dialog {
  174. background: #fff;
  175. padding: 30px;
  176. border-radius: 12px;
  177. width: 90%;
  178. max-width: 400px;
  179. text-align: center;
  180. box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  181. }
  182. #loginCheckModal h3 {
  183. margin: 0 0 16px;
  184. color: #e74c3c;
  185. font-size: 20px;
  186. }
  187. #loginCheckModal p {
  188. margin: 0 0 24px;
  189. color: #666;
  190. line-height: 1.5;
  191. }
  192. #loginCheckModal .btn {
  193. padding: 10px 20px;
  194. font-size: 16px;
  195. }
  196. </style>
  197. <script type="module" crossorigin src="./management.js"></script>
  198. <link rel="modulepreload" crossorigin href="./member.js">
  199. </head>
  200. <body>
  201. <!-- 登录验证模态框 -->
  202. <div id="loginCheckModal">
  203. <div class="dialog">
  204. <h3>访问被拒绝</h3>
  205. <p>您尚未登录或登录已过期,请先登录系统。</p>
  206. <button class="btn primary" id="goToLoginBtn">前往登录页面</button>
  207. </div>
  208. </div>
  209. <div class="card">
  210. <table aria-describedby="tableDesc">
  211. <thead>
  212. <tr>
  213. <th style="width: 30px">#</th>
  214. <th style="width: 60px">姓名</th>
  215. <th style="width: 80px">WhatsApp</th>
  216. <th style="width: 90px">国家/地区代码</th>
  217. <th style="width: 110px">电话号码</th>
  218. <th style="width: 110px">微信ID</th>
  219. <th style="width: 110px">邮箱</th>
  220. <th style="width: 70px">获客来源</th>
  221. <th style="width: 130px">来源地址</th>
  222. <th style="width: 150px">添加时间</th>
  223. <th style="width: 90px">是否联系</th>
  224. <th style="width: 90px">备注</th>
  225. <th style="width: 100px">操作</th>
  226. </tr>
  227. </thead>
  228. <tbody id="tableBody"></tbody>
  229. </table>
  230. <div class="controls" style="margin-bottom: 8px; margin-top: 12px">
  231. <div class="small">
  232. 每页显示
  233. <select id="pageSizeSelect">
  234. <option value="20" selected>20</option>
  235. <option value="50">50</option>
  236. <option value="100">100</option>
  237. <option value="200">200</option>
  238. </select>
  239. </div>
  240. <div class="small"><span id="totalCount">0</span></div>
  241. <div class="pagination" id="pagination"></div>
  242. </div>
  243. <!-- 备注编辑模态 -->
  244. <div id="noteModal">
  245. <div class="dialog">
  246. <h3 style="margin: 0 0 8px">编辑备注</h3>
  247. <textarea id="noteTextarea" rows="6" placeholder="输入备注..."></textarea>
  248. <div style="
  249. margin-top: 10px;
  250. display: flex;
  251. justify-content: flex-end;
  252. gap: 8px;
  253. ">
  254. <button class="btn" id="noteCancelBtn">取消</button>
  255. <button class="btn primary" id="noteSaveBtn">保存</button>
  256. </div>
  257. </div>
  258. </div>
  259. </div>
  260. <div id="toast" class="toast"></div>
  261. </body>
  262. </html>