index.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  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.0">
  6. <title>用户控制台 - 提现管理</title>
  7. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  8. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
  9. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css">
  10. <style>
  11. :root {
  12. --primary-color: #3498db;
  13. --success-color: #2ecc71;
  14. --warning-color: #f39c12;
  15. --danger-color: #e74c3c;
  16. --light-bg: #f8f9fa;
  17. --dark-bg: #343a40;
  18. }
  19. body {
  20. background-color: #f5f7fb;
  21. font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  22. }
  23. .profile-avatar-container {
  24. position: relative;
  25. width: 100px;
  26. margin: 0 auto;
  27. }
  28. .profile-avatar-container .profile-user-img {
  29. width: 100px;
  30. height: 100px;
  31. }
  32. .profile-avatar-container .profile-avatar-text {
  33. display: none;
  34. }
  35. .profile-avatar-container:hover .profile-avatar-text {
  36. display: block;
  37. position: absolute;
  38. height: 100px;
  39. width: 100px;
  40. background: #444;
  41. opacity: .6;
  42. color: #fff;
  43. top: 0;
  44. left: 0;
  45. line-height: 100px;
  46. text-align: center;
  47. }
  48. .profile-avatar-container button {
  49. position: absolute;
  50. top: 0;
  51. left: 0;
  52. width: 100px;
  53. height: 100px;
  54. opacity: 0;
  55. }
  56. .box {
  57. border-radius: 8px;
  58. box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  59. border: none;
  60. margin-bottom: 25px;
  61. transition: transform 0.3s ease;
  62. }
  63. .box:hover {
  64. transform: translateY(-5px);
  65. box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  66. }
  67. .box-success {
  68. border-top: 3px solid var(--success-color);
  69. }
  70. .panel-heading {
  71. background-color: #fff;
  72. padding: 15px 20px;
  73. border-bottom: 1px solid #eee;
  74. font-weight: 600;
  75. color: #2c3e50;
  76. font-size: 18px;
  77. border-radius: 8px 8px 0 0;
  78. }
  79. .panel-body {
  80. padding: 20px;
  81. background-color: #fff;
  82. border-radius: 0 0 8px 8px;
  83. }
  84. .form-control {
  85. border-radius: 4px;
  86. padding: 10px 15px;
  87. border: 1px solid #ddd;
  88. margin-bottom: 15px;
  89. }
  90. .btn-success {
  91. background-color: var(--success-color);
  92. border: none;
  93. padding: 10px 20px;
  94. font-weight: 600;
  95. transition: all 0.3s;
  96. }
  97. .btn-success:hover {
  98. background-color: #27ae60;
  99. transform: translateY(-2px);
  100. }
  101. .nav-tabs {
  102. border-bottom: 2px solid #eee;
  103. }
  104. .nav-tabs li a {
  105. color: #7f8c8d;
  106. font-weight: 500;
  107. padding: 10px 20px;
  108. border-radius: 4px 4px 0 0;
  109. }
  110. .nav-tabs li.active a {
  111. color: var(--primary-color);
  112. border-bottom: 3px solid var(--primary-color);
  113. background: transparent;
  114. }
  115. .table {
  116. border-collapse: separate;
  117. border-spacing: 0;
  118. width: 100%;
  119. background: #fff;
  120. border-radius: 8px;
  121. overflow: hidden;
  122. box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  123. }
  124. .table th {
  125. background-color: #f8f9fa;
  126. color: #2c3e50;
  127. font-weight: 600;
  128. padding: 12px 15px;
  129. border-top: none;
  130. }
  131. .table td {
  132. padding: 12px 15px;
  133. border-top: 1px solid #eee;
  134. }
  135. .toolbar {
  136. padding: 15px 0;
  137. display: flex;
  138. align-items: center;
  139. gap: 10px;
  140. }
  141. .btn-refresh, .btn-summary {
  142. display: flex;
  143. align-items: center;
  144. gap: 5px;
  145. padding: 8px 15px;
  146. border-radius: 4px;
  147. font-weight: 500;
  148. transition: all 0.2s;
  149. }
  150. .btn-refresh {
  151. background-color: var(--primary-color);
  152. color: white;
  153. }
  154. .btn-refresh:hover {
  155. background-color: #2980b9;
  156. color: white;
  157. }
  158. .btn-summary {
  159. background-color: var(--warning-color);
  160. color: white;
  161. }
  162. .btn-summary:hover {
  163. background-color: #e67e22;
  164. color: white;
  165. }
  166. .btn-summary.loading i {
  167. animation: spin 1s linear infinite;
  168. }
  169. @keyframes spin {
  170. 0% { transform: rotate(0deg); }
  171. 100% { transform: rotate(360deg); }
  172. }
  173. .balance-card {
  174. background: linear-gradient(135deg, #3498db, #8e44ad);
  175. color: white;
  176. border-radius: 8px;
  177. padding: 20px;
  178. margin-bottom: 20px;
  179. box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  180. }
  181. .balance-label {
  182. font-size: 14px;
  183. opacity: 0.8;
  184. }
  185. .balance-amount {
  186. font-size: 28px;
  187. font-weight: 700;
  188. margin: 5px 0;
  189. }
  190. .withdraw-info {
  191. background-color: #f8f9fa;
  192. padding: 15px;
  193. border-radius: 8px;
  194. margin-bottom: 20px;
  195. }
  196. .withdraw-info p {
  197. margin-bottom: 8px;
  198. font-size: 14px;
  199. }
  200. .no-data {
  201. text-align: center;
  202. padding: 40px 20px;
  203. color: #7f8c8d;
  204. }
  205. .no-data i {
  206. font-size: 48px;
  207. margin-bottom: 15px;
  208. color: #bdc3c7;
  209. }
  210. .status-badge {
  211. padding: 4px 10px;
  212. border-radius: 12px;
  213. font-size: 12px;
  214. font-weight: 500;
  215. }
  216. .status-pending {
  217. background-color: #fef9e7;
  218. color: #f39c12;
  219. }
  220. .status-approved {
  221. background-color: #eafaf1;
  222. color: #27ae60;
  223. }
  224. .status-rejected {
  225. background-color: #fdedec;
  226. color: #e74c3c;
  227. }
  228. .section-title {
  229. font-size: 18px;
  230. font-weight: 600;
  231. margin-bottom: 20px;
  232. color: #2c3e50;
  233. position: relative;
  234. padding-left: 15px;
  235. }
  236. .section-title:before {
  237. content: "";
  238. position: absolute;
  239. left: 0;
  240. top: 5px;
  241. height: 20px;
  242. width: 4px;
  243. background-color: var(--primary-color);
  244. border-radius: 2px;
  245. }
  246. .fadeInRight {
  247. animation: fadeInRight 0.5s ease;
  248. }
  249. @keyframes fadeInRight {
  250. from {
  251. opacity: 0;
  252. transform: translateX(20px);
  253. }
  254. to {
  255. opacity: 1;
  256. transform: translateX(0);
  257. }
  258. }
  259. .form-group {
  260. margin-bottom: 20px;
  261. }
  262. .form-group label {
  263. font-weight: 500;
  264. margin-bottom: 8px;
  265. color: #34495e;
  266. }
  267. </style>
  268. </head>
  269. <body>
  270. <div class="container mt-5 mb-5">
  271. <div class="row animated fadeInRight">
  272. <div class="col-md-4">
  273. <div class="box box-success">
  274. <div class="panel-heading">
  275. 个人资料
  276. </div>
  277. <div class="panel-body">
  278. <div class="balance-card">
  279. <div class="balance-label">账户余额</div>
  280. <div class="balance-amount">¥8,450.00</div>
  281. <div class="balance-info">可提现金额: ¥8,450.00</div>
  282. </div>
  283. <form id="update-form" role="form" data-toggle="validator" method="POST" action="#">
  284. <div class="form-group">
  285. <label for="money" class="control-label">提现金额:</label>
  286. <input type="number" class="form-control" id="money" name="row[money]" value="" data-rule="required" placeholder="输入提现金额"/>
  287. </div>
  288. <div class="form-group">
  289. <label for="name" class="control-label">姓名:</label>
  290. <input type="text" class="form-control" id="name" name="row[name]" value="" data-rule="required" placeholder="收款人姓名"/>
  291. </div>
  292. <div class="form-group">
  293. <label for="type" class="control-label">开户行/支付宝:</label>
  294. <input type="text" class="form-control" id="type" name="row[type]" value="" data-rule="required" placeholder="开户行或支付宝"/>
  295. </div>
  296. <div class="form-group">
  297. <label for="cord" class="control-label">卡号/帐号:</label>
  298. <input type="text" class="form-control" id="cord" name="row[cord]" value="" data-rule="required" placeholder="银行卡号或支付宝账号"/>
  299. </div>
  300. <div class="form-group">
  301. <button type="submit" class="btn btn-success w-100">
  302. <i class="fas fa-paper-plane me-2"></i> 提现
  303. </button>
  304. </div>
  305. <div class="withdraw-info">
  306. <p><i class="fas fa-info-circle me-2 text-primary"></i> 提现申请将在1-3个工作日内处理</p>
  307. <p><i class="fas fa-exclamation-circle me-2 text-warning"></i> 单笔最低提现金额: ¥100.00</p>
  308. <p><i class="fas fa-exclamation-triangle me-2 text-danger"></i> 提现手续费: 1.0% (最低¥2.00)</p>
  309. </div>
  310. </form>
  311. </div>
  312. </div>
  313. </div>
  314. <div class="col-md-8">
  315. <div class="panel panel-default panel-intro panel-nav">
  316. <div class="panel-heading">
  317. <ul class="nav nav-tabs">
  318. <li class="active"><a href="#one" data-toggle="tab"><i class="fa fa-list"></i> 提现明细</a></li>
  319. </ul>
  320. </div>
  321. <div class="panel-body">
  322. <div id="myTabContent" class="tab-content">
  323. <div class="tab-pane fade active in" id="one">
  324. <div class="widget-body no-padding">
  325. <div id="toolbar" class="toolbar">
  326. <a href="#" class="btn btn-refresh">
  327. <i class="fas fa-sync-alt"></i> 刷新
  328. </a>
  329. <!-- 添加的归集按钮 -->
  330. <a href="javascript:void(0);" id="summary-btn" class="btn btn-summary">
  331. <i class="fas fa-bolt"></i> 资金归集
  332. </a>
  333. </div>
  334. <table id="table" class="table table-striped table-bordered table-hover" width="100%">
  335. <thead>
  336. <tr>
  337. <th>提取金额</th>
  338. <th>手续费</th>
  339. <th>类型</th>
  340. <th>提取帐号</th>
  341. <th>姓名</th>
  342. <th>实际到账</th>
  343. <th>提取时间</th>
  344. <th>状态</th>
  345. </tr>
  346. </thead>
  347. <tbody>
  348. <tr>
  349. <td>¥1,200.00</td>
  350. <td>¥12.00</td>
  351. <td>支付宝</td>
  352. <td>user@example.com</td>
  353. <td>张先生</td>
  354. <td>¥1,188.00</td>
  355. <td>2023-06-15 14:30</td>
  356. <td><span class="status-badge status-approved">已完成</span></td>
  357. </tr>
  358. <tr>
  359. <td>¥800.00</td>
  360. <td>¥8.00</td>
  361. <td>工商银行</td>
  362. <td>**** **** **** 1234</td>
  363. <td>李女士</td>
  364. <td>¥792.00</td>
  365. <td>2023-06-10 10:15</td>
  366. <td><span class="status-badge status-approved">已完成</span></td>
  367. </tr>
  368. <tr>
  369. <td>¥2,500.00</td>
  370. <td>¥25.00</td>
  371. <td>建设银行</td>
  372. <td>**** **** **** 5678</td>
  373. <td>王先生</td>
  374. <td>¥2,475.00</td>
  375. <td>2023-06-05 16:45</td>
  376. <td><span class="status-badge status-approved">已完成</span></td>
  377. </tr>
  378. <tr>
  379. <td>¥500.00</td>
  380. <td>¥5.00</td>
  381. <td>微信支付</td>
  382. <td>wxid_********</td>
  383. <td>赵女士</td>
  384. <td>¥495.00</td>
  385. <td>2023-06-01 09:20</td>
  386. <td><span class="status-badge status-pending">审核中</span></td>
  387. </tr>
  388. </tbody>
  389. </table>
  390. </div>
  391. </div>
  392. </div>
  393. </div>
  394. </div>
  395. </div>
  396. </div>
  397. </div>
  398. <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  399. <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
  400. <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script>
  401. <script>
  402. $(document).ready(function() {
  403. // 初始化Toastr通知
  404. toastr.options = {
  405. closeButton: true,
  406. progressBar: true,
  407. positionClass: "toast-top-right",
  408. timeOut: 5000
  409. };
  410. // 归集按钮点击事件
  411. $('#summary-btn').click(function() {
  412. const btn = $(this);
  413. const originalHtml = btn.html();
  414. // 显示加载状态
  415. btn.html('<i class="fas fa-spinner fa-spin"></i> 归集中...').prop('disabled', true);
  416. // 模拟请求延迟
  417. setTimeout(function() {
  418. // 发起GET请求到/general/txmx/summary
  419. $.get('/general/txmx/summary', function(response) {
  420. // 请求成功处理
  421. if (response && response.success) {
  422. toastr.success('资金归集操作成功完成!');
  423. } else {
  424. toastr.error('归集操作执行失败,请重试');
  425. }
  426. }).fail(function() {
  427. toastr.error('请求失败,请检查网络连接');
  428. }).always(function() {
  429. // 恢复按钮状态
  430. btn.html(originalHtml).prop('disabled', false);
  431. });
  432. }, 1500);
  433. });
  434. // 刷新按钮点击事件
  435. $('.btn-refresh').click(function(e) {
  436. e.preventDefault();
  437. const btn = $(this);
  438. const originalHtml = btn.html();
  439. // 显示加载状态
  440. btn.html('<i class="fas fa-spinner fa-spin"></i> 刷新中...');
  441. // 模拟刷新延迟
  442. setTimeout(function() {
  443. toastr.info('数据已刷新');
  444. btn.html(originalHtml);
  445. }, 800);
  446. });
  447. // 表单提交处理
  448. $('#update-form').submit(function(e) {
  449. e.preventDefault();
  450. // 表单验证
  451. const amount = parseFloat($('#money').val());
  452. if (isNaN(amount) || amount < 100) {
  453. toastr.warning('提现金额不能低于¥100.00');
  454. return;
  455. }
  456. // 显示处理中
  457. toastr.info('提现申请提交中...');
  458. // 模拟处理延迟
  459. setTimeout(function() {
  460. toastr.success('提现申请已提交,将在1-3个工作日内处理');
  461. }, 1500);
  462. });
  463. });
  464. </script>
  465. </body>
  466. </html>