wallet-transactions.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="Cache-Control" content="no-cache,no-store,no-siteapp,must-revalidate">
  6. <meta http-equiv="pragma" content="no-cache">
  7. <meta http-equiv="expires" content="0">
  8. <meta name="author" content="">
  9. <meta name="description" content=""/>
  10. <meta name="keywords" content="扫码支付,线上投币,运营数据,物联网"/>
  11. <meta name="format-detection" content="telephone=no,email=no">
  12. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
  13. <title>提现记录</title>
  14. <link rel="stylesheet" href="https://cdn.washpayer.com/components/lib/mui.min.css">
  15. <link rel="stylesheet" href="/components/custom/css/common.css">
  16. <link rel="stylesheet" href="/app/css/xyf.common.min.css">
  17. </head>
  18. <body>
  19. <header class="page-head">
  20. <p class="padding-10">累计提现:<em id="withdrawalCount">0</em>次,<em id="withdraw">0.00</em>元</p>
  21. </header>
  22. <div id="pullrefresh" class="mui-scroll-wrapper wallet-bd">
  23. <div class="mui-scroll">
  24. <ul class="mui-table-view"></ul>
  25. </div>
  26. </div>
  27. <script src="https://cdn.washpayer.com/components/lib/jquery.min.js" ></script>
  28. <script src="https://cdn.washpayer.com/components/lib/mui.min.js" ></script>
  29. <script src="/components/custom/js/common.js"></script>
  30. <script src="/app/js/xyf.common.js"></script>
  31. <script>
  32. mui.init({
  33. pullRefresh: {
  34. container: '#pullrefresh',
  35. up: {
  36. contentrefresh: '正在加载...',
  37. contentnomore: '没有更多数据了...',
  38. callback: pullupRefresh
  39. }
  40. }
  41. });
  42. /* 上拉加载具体业务实现*/
  43. var pageIndex = 0;
  44. var total = 0;
  45. function pullupRefresh() {
  46. pageIndex++;
  47. var url = "/dealer/withdrawalsHistoryList";
  48. var data = {"pageIndex": pageIndex, "pageSize": 10};
  49. sendRequest(url,"GET",data,function(res){
  50. if (res.result == 1) {
  51. if (pageIndex == 1) {
  52. total = res.para.total;
  53. if (total == 0) {
  54. $('#pullrefresh').addClass('mui-hidden');
  55. $('.page-head').addClass('mui-hidden');
  56. $("body").append('<div class="nomore"></div>');
  57. }
  58. $("#withdrawalCount").text(total);//累计提现次数
  59. $("#withdraw").text((res.para.withdrawalTotal||0));
  60. }
  61. var length = res.para.dataList.length;
  62. mui('#pullrefresh').pullRefresh().endPullupToRefresh((pageIndex * 10 >= total));//参数为true代表没有更多数据了。
  63. var table = document.body.querySelector('.mui-table-view');
  64. for (var i = 0; i < length; i++) {
  65. var obj = res.para.dataList[i];
  66. var li = document.createElement('li');
  67. var colorStyle = "";
  68. if (obj.statusText == "已提交申请") {
  69. colorStyle = "c-lgreen ";
  70. } else if (obj.statusText == "提现成功") {
  71. colorStyle = "c-green";
  72. } else if (obj.statusText == "处理中") {
  73. colorStyle = "c-lgreen";
  74. } else if (obj.statusText == "提现失败") {
  75. colorStyle = "font-b-4";
  76. } else if (obj.statusText == "提现单关闭") {
  77. colorStyle = "font-b-4";
  78. }
  79. li.className = 'mui-table-view-cell';
  80. li.innerHTML = '<a href="wallet-transactions-details.html?paymentId=' + obj.paymentId + '">' +
  81. '<div class="mui-clearfix"><span>' + obj.bankName +
  82. '</span><span class="font-18 font-b-10 mui-pull-right"><em class="font-12">¥</em>' + obj.amount + '</span>' +
  83. '</div>' +
  84. '<div class="font-13 margin-t-5"><span class="font-b-6">' + obj.withdrawalsDate +
  85. '</span><span class="mui-pull-right ' + colorStyle +
  86. '">' + obj.statusText + (obj.refunded ? '(已退还)' : '') + '</span>' +
  87. '</div>' +
  88. '</a>';
  89. table.appendChild(li);
  90. }
  91. mui('body').on('tap','a',function(){
  92. var href = this.getAttribute('href').trim();
  93. if(href != ''){
  94. goPage(href);
  95. }
  96. });
  97. } else {
  98. mui.toast(res.description);
  99. }
  100. });
  101. }
  102. if (mui.os.plus) {
  103. mui.plusReady(function () {
  104. setTimeout(function () {
  105. mui('#pullrefresh').pullRefresh().pullupLoading();
  106. }, 1000);
  107. });
  108. } else {
  109. mui.ready(function () {
  110. mui('#pullrefresh').pullRefresh().pullupLoading();
  111. });
  112. }
  113. mui('body').on('tap','a',function(){
  114. var href = this.getAttribute('href').trim();
  115. if(href != ''){
  116. goPage(href);
  117. }
  118. });
  119. </script>
  120. </body>
  121. </html>