index.html 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. <style>
  2. .profile-avatar-container {
  3. position: relative;
  4. width: 100px;
  5. margin: 0 auto;
  6. }
  7. .profile-avatar-container .profile-user-img {
  8. width: 100px;
  9. height: 100px;
  10. }
  11. .profile-avatar-container .profile-avatar-text {
  12. display: none;
  13. }
  14. .profile-avatar-container:hover .profile-avatar-text {
  15. display: block;
  16. position: absolute;
  17. height: 100px;
  18. width: 100px;
  19. background: #444;
  20. opacity: .6;
  21. color: #fff;
  22. top: 0;
  23. left: 0;
  24. line-height: 100px;
  25. text-align: center;
  26. }
  27. .profile-avatar-container button {
  28. position: absolute;
  29. top: 0;
  30. left: 0;
  31. width: 100px;
  32. height: 100px;
  33. opacity: 0;
  34. }
  35. </style>
  36. <div class="row animated fadeInRight">
  37. <div class="col-md-4">
  38. <div class="box box-success">
  39. <div class="panel-heading">
  40. {:__('Profile')}
  41. </div>
  42. <div class="panel-body">
  43. <form id="update-form" role="form" data-toggle="validator" method="POST" action="{:url('general.txmx/update')}">
  44. <div class="box-body box-profile">
  45. <div class="form-group">
  46. <label for="money" class="control-label">{:__('余额')}:</label>
  47. <input type="text" class="form-control" id="money" name="row[money]" value="{$admin.money|htmlentities}" data-rule="required" disabled />
  48. </div>
  49. <div class="form-group">
  50. <label for="money" class="control-label">{:__('提现金额')}:</label>
  51. <input type="number" class="form-control" id="money" name="row[money]" value="" data-rule="required"/>
  52. </div>
  53. <div class="form-group">
  54. <label for="name" class="control-label">{:__('姓名')}:</label>
  55. <input type="text" class="form-control" id="name" name="row[name]" value="" data-rule="required"/>
  56. </div>
  57. <div class="form-group">
  58. <label for="type" class="control-label">{:__('开户行/支付宝')}:</label>
  59. <input type="text" class="form-control" id="type" name="row[type]" value="" data-rule="required"/>
  60. </div>
  61. <div class="form-group">
  62. <label for="cord" class="control-label">{:__('卡号/帐号')}:</label>
  63. <input type="text" class="form-control" id="cord" name="row[cord]" value="" data-rule="required"/>
  64. </div>
  65. <div class="form-group">
  66. <button type="submit" class="btn btn-success">{:__('提现')}</button>
  67. </div>
  68. </div>
  69. </form>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="col-md-8">
  74. <div class="panel panel-default panel-intro panel-nav">
  75. <div class="panel-heading">
  76. <ul class="nav nav-tabs">
  77. <li class="active"><a href="#one" data-toggle="tab"><i class="fa fa-list"></i> {:__('提现明细')}</a></li>
  78. </ul>
  79. </div>
  80. <div class="panel-body">
  81. <div id="myTabContent" class="tab-content">
  82. <div class="tab-pane fade active in" id="one">
  83. <div class="widget-body no-padding">
  84. <div id="toolbar" class="toolbar">
  85. {:build_toolbar('refresh')}
  86. <!-- 添加访问general/txmx/summary接口的按钮 -->
  87. <button id="gas-btn" class="btn btn-primary" onclick="loadGas()">
  88. {:__('手续费转账')}
  89. </button>
  90. <button id="summary-btn" class="btn btn-primary" onclick="loadSummary()">
  91. {:__('归集转账')}
  92. </button>
  93. </div>
  94. <table id="table" class="table table-striped table-bordered table-hover" width="100%">
  95. </table>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. <script>
  103. function loadGas() {
  104. // 显示加载中的提示(可选)
  105. const loadingAlert = alert('数据加载中,请稍候...');
  106. // 使用AJAX请求访问general/txmx/summary接口
  107. fetch('{:url("general/txmx/summary")}')
  108. .then(response => response.json())
  109. .then(data => {
  110. // 关闭加载提示(如果有)
  111. if(loadingAlert) document.body.removeChild(loadingAlert);
  112. // 处理返回的数据
  113. console.log(data);
  114. // 显示"已完成"弹窗
  115. const doneAlert = document.createElement('div');
  116. doneAlert.innerHTML = `
  117. <div style="
  118. position: fixed;
  119. top: 50%;
  120. left: 50%;
  121. transform: translate(-50%, -50%);
  122. padding: 20px 40px;
  123. background: #4CAF50;
  124. color: white;
  125. border-radius: 8px;
  126. box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  127. z-index: 1000;
  128. font-family: Arial, sans-serif;
  129. font-size: 18px;
  130. animation: fadeIn 0.3s, fadeOut 0.3s 2s forwards;
  131. ">
  132. 已完成!
  133. </div>
  134. `;
  135. // 添加淡入淡出动画
  136. const style = document.createElement('style');
  137. style.innerHTML = `
  138. @keyframes fadeIn {
  139. from { opacity: 0; }
  140. to { opacity: 1; }
  141. }
  142. @keyframes fadeOut {
  143. from { opacity: 1; }
  144. to { opacity: 0; }
  145. }
  146. `;
  147. document.head.appendChild(style);
  148. document.body.appendChild(doneAlert);
  149. // 3秒后移除弹窗
  150. setTimeout(() => {
  151. document.body.removeChild(doneAlert);
  152. document.head.removeChild(style);
  153. }, 2300);
  154. })
  155. .catch(error => {
  156. console.error('Error loading summary:', error);
  157. // 错误时显示错误提示(可选)
  158. alert('加载失败: ' + error.message);
  159. });
  160. }
  161. function loadSummary() {
  162. // 显示加载中的提示(可选)
  163. const loadingAlert = alert('数据加载中,请稍候...');
  164. // 使用AJAX请求访问general/txmx/summary接口
  165. fetch('{:url("general/txmx/summary")}')
  166. .then(response => response.json())
  167. .then(data => {
  168. // 关闭加载提示(如果有)
  169. if(loadingAlert) document.body.removeChild(loadingAlert);
  170. // 处理返回的数据
  171. console.log(data);
  172. // 显示"已完成"弹窗
  173. const doneAlert = document.createElement('div');
  174. doneAlert.innerHTML = `
  175. <div style="
  176. position: fixed;
  177. top: 50%;
  178. left: 50%;
  179. transform: translate(-50%, -50%);
  180. padding: 20px 40px;
  181. background: #4CAF50;
  182. color: white;
  183. border-radius: 8px;
  184. box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  185. z-index: 1000;
  186. font-family: Arial, sans-serif;
  187. font-size: 18px;
  188. animation: fadeIn 0.3s, fadeOut 0.3s 2s forwards;
  189. ">
  190. 已完成!
  191. </div>
  192. `;
  193. // 添加淡入淡出动画
  194. const style = document.createElement('style');
  195. style.innerHTML = `
  196. @keyframes fadeIn {
  197. from { opacity: 0; }
  198. to { opacity: 1; }
  199. }
  200. @keyframes fadeOut {
  201. from { opacity: 1; }
  202. to { opacity: 0; }
  203. }
  204. `;
  205. document.head.appendChild(style);
  206. document.body.appendChild(doneAlert);
  207. // 3秒后移除弹窗
  208. setTimeout(() => {
  209. document.body.removeChild(doneAlert);
  210. document.head.removeChild(style);
  211. }, 2300);
  212. })
  213. .catch(error => {
  214. console.error('Error loading summary:', error);
  215. // 错误时显示错误提示(可选)
  216. alert('加载失败: ' + error.message);
  217. });
  218. }
  219. </script>
  220. </div>