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

352 lines
7.7 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. .tab-container {
  9. max-width: 1200px;
  10. margin: 0 0 12px 0;
  11. padding: 0 16px;
  12. }
  13. .tabs {
  14. display: flex;
  15. gap: 50px;
  16. padding: 4px;
  17. border-radius: 8px;
  18. width: fit-content;
  19. }
  20. .tab {
  21. padding: 10px 20px;
  22. border-radius: 6px;
  23. border: none;
  24. background: transparent;
  25. color: #131212;
  26. font-weight: 700;
  27. cursor: pointer;
  28. transition: all 0.3s ease;
  29. font-size: 16px;
  30. white-space: nowrap;
  31. }
  32. .tab:hover {
  33. background: rgba(46, 125, 50, 0.1);
  34. color: #25D366;
  35. }
  36. .tab.active {
  37. background: #BAF7D0;
  38. color: #0E4322;
  39. box-shadow: 0 2px 4px rgba(46, 125, 50, 0.3);
  40. }
  41. body {
  42. font-family: Arial, sans-serif;
  43. padding: 24px;
  44. background: #f7f8fb;
  45. color: #222;
  46. }
  47. .card {
  48. background: #fff;
  49. padding: 16px;
  50. border-radius: 8px;
  51. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  52. margin: auto;
  53. }
  54. table {
  55. width: 100%;
  56. border-collapse: collapse;
  57. margin-top: 12px;
  58. }
  59. th,
  60. td {
  61. padding: 10px 12px;
  62. border-bottom: 1px solid #eee;
  63. text-align: left;
  64. font-size: 14px;
  65. }
  66. th {
  67. background: #fafafa;
  68. font-weight: 600;
  69. }
  70. .controls {
  71. display: flex;
  72. gap: 12px;
  73. align-items: center;
  74. flex-wrap: wrap;
  75. }
  76. .pagination {
  77. display: flex;
  78. gap: 6px;
  79. align-items: center;
  80. margin-left: auto;
  81. flex-wrap: wrap;
  82. }
  83. .btn {
  84. padding: 6px 10px;
  85. border-radius: 6px;
  86. border: 1px solid #ddd;
  87. background: #fff;
  88. cursor: pointer;
  89. user-select: none;
  90. }
  91. .btn:disabled {
  92. opacity: 0.5;
  93. cursor: default;
  94. }
  95. .btn.primary {
  96. background: #007bff;
  97. color: #fff;
  98. border-color: #007bff;
  99. }
  100. .btn.whatsapp {
  101. background: #25D366;
  102. color: #fff;
  103. border-color: #25D366;
  104. }
  105. .status-btn {
  106. padding: 4px 8px;
  107. border-radius: 6px;
  108. border: 1px solid #ccc;
  109. cursor: pointer;
  110. }
  111. .status-0 {
  112. background: red;
  113. color: #fff;
  114. }
  115. .status-1 {
  116. background: #2f9e44;
  117. color: #fff;
  118. border-color: #2f9e44;
  119. }
  120. .btn.active {
  121. background: #007bff;
  122. color: #fff;
  123. border-color: #007bff;
  124. }
  125. select,
  126. input[type="number"] {
  127. padding: 6px;
  128. border-radius: 6px;
  129. border: 1px solid #ddd;
  130. }
  131. .small {
  132. font-size: 13px;
  133. color: #666;
  134. }
  135. @media (max-width: 640px) {
  136. .tabs {
  137. flex-wrap: wrap;
  138. width: 100%;
  139. }
  140. .tab {
  141. flex: 1;
  142. min-width: 120px;
  143. text-align: center;
  144. }
  145. .controls {
  146. flex-direction: column;
  147. align-items: flex-start;
  148. }
  149. .pagination {
  150. margin-left: 0;
  151. }
  152. }
  153. #noteModal {
  154. display: none;
  155. position: fixed;
  156. inset: 0;
  157. background: rgba(0, 0, 0, 0.45);
  158. align-items: center;
  159. justify-content: center;
  160. z-index: 9999;
  161. }
  162. #noteModal .dialog {
  163. background: #fff;
  164. padding: 16px;
  165. border-radius: 8px;
  166. width: 90%;
  167. max-width: 520px;
  168. box-sizing: border-box;
  169. }
  170. #noteModal textarea {
  171. width: 100%;
  172. min-width: 60%;
  173. max-width: 100%;
  174. min-height: 150px;
  175. box-sizing: border-box;
  176. padding: 8px;
  177. border-radius: 6px;
  178. border: 1px solid #ddd;
  179. font-size: 14px;
  180. }
  181. .toast {
  182. position: fixed;
  183. top: -20px;
  184. left: 50%;
  185. transform: translateX(-50%);
  186. background: #4caf50;
  187. color: #fff;
  188. padding: 10px 16px;
  189. border-radius: 6px;
  190. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  191. font-size: 16px;
  192. opacity: 0;
  193. transition: all 0.3s ease;
  194. z-index: 10000;
  195. pointer-events: none;
  196. }
  197. .toast.show {
  198. opacity: 1;
  199. top: 20px;
  200. }
  201. table th,
  202. table td {
  203. text-align: center;
  204. }
  205. /* 登录验证样式 */
  206. #loginCheckModal {
  207. display: none;
  208. position: fixed;
  209. inset: 0;
  210. background: rgba(0, 0, 0, 0.7);
  211. align-items: center;
  212. justify-content: center;
  213. z-index: 99999;
  214. }
  215. #loginCheckModal .dialog {
  216. background: #fff;
  217. padding: 30px;
  218. border-radius: 12px;
  219. width: 90%;
  220. max-width: 400px;
  221. text-align: center;
  222. box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  223. }
  224. #loginCheckModal h3 {
  225. margin: 0 0 16px;
  226. color: #e74c3c;
  227. font-size: 20px;
  228. }
  229. #loginCheckModal p {
  230. margin: 0 0 24px;
  231. color: #666;
  232. line-height: 1.5;
  233. }
  234. #loginCheckModal .btn {
  235. padding: 10px 20px;
  236. font-size: 16px;
  237. }
  238. </style>
  239. <script type="module" crossorigin src="./management.js"></script>
  240. <link rel="modulepreload" crossorigin href="./request.js">
  241. <link rel="modulepreload" crossorigin href="./member.js">
  242. </head>
  243. <body>
  244. <!-- 登录验证模态框 -->
  245. <div id="loginCheckModal">
  246. <div class="dialog">
  247. <h3>访问被拒绝</h3>
  248. <p>您尚未登录或登录已过期,请先登录系统。</p>
  249. <button class="btn primary" id="goToLoginBtn">前往登录页面</button>
  250. </div>
  251. </div>
  252. <div class="tab-container">
  253. <div class="tabs">
  254. <button class="tab active" data-tab="win-us-stock">赢在美股导流</button>
  255. <button class="tab" data-tab="deepchart">DeepChart导流</button>
  256. <button class="tab" data-tab="content-config">内容配置</button>
  257. </div>
  258. </div>
  259. <div class="card">
  260. <table aria-describedby="tableDesc">
  261. <thead>
  262. <tr>
  263. <th style="width: 20px">#</th>
  264. <th style="width: 60px">姓名</th>
  265. <th style="width: 80px">WhatsApp</th>
  266. <th style="width: 80px">国家/地区代码</th>
  267. <th style="width: 110px">电话号码</th>
  268. <th style="width: 110px">微信ID</th>
  269. <th style="width: 110px">邮箱</th>
  270. <th style="width: 100px">报名意向</th>
  271. <th style="width: 80px">获客来源</th>
  272. <th style="width: 130px">来源地址</th>
  273. <th style="width: 150px">添加时间</th>
  274. <th style="width: 90px">是否联系</th>
  275. <th style="width: 90px">备注</th>
  276. <th style="width: 70px">操作</th>
  277. </tr>
  278. </thead>
  279. <tbody id="tableBody"></tbody>
  280. </table>
  281. <div class="controls" style="margin-bottom: 8px; margin-top: 12px">
  282. <div class="small">
  283. 每页显示
  284. <select id="pageSizeSelect">
  285. <option value="20" selected>20</option>
  286. <option value="50">50</option>
  287. <option value="100">100</option>
  288. <option value="200">200</option>
  289. </select>
  290. </div>
  291. <div class="small"><span id="totalCount">0</span></div>
  292. <div class="pagination" id="pagination"></div>
  293. </div>
  294. <!-- 备注编辑模态 -->
  295. <div id="noteModal">
  296. <div class="dialog">
  297. <h3 style="margin: 0 0 8px">编辑备注</h3>
  298. <textarea id="noteTextarea" rows="6" placeholder="输入备注..."></textarea>
  299. <div style="
  300. margin-top: 10px;
  301. display: flex;
  302. justify-content: flex-end;
  303. gap: 8px;
  304. ">
  305. <button class="btn" id="noteCancelBtn">取消</button>
  306. <button class="btn primary" id="noteSaveBtn">保存</button>
  307. </div>
  308. </div>
  309. </div>
  310. </div>
  311. <div id="toast" class="toast"></div>
  312. </body>
  313. </html>