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.
 
 
 
 
 
 

102 lines
3.5 KiB

  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title></title>
  6. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <link href="css/mui.min.css" rel="stylesheet" />
  8. <link href="css/style.css" rel="stylesheet" />
  9. <script src="js/mui.min.js"></script>
  10. <script src="js/serverurl.js"></script>
  11. <script src="js/userinfos.js"></script>
  12. <script type="text/javascript">
  13. mui.plusReady(function() {
  14. CheckLogin();
  15. GetData();
  16. });
  17. function jsonDateFormatDate(strDate) { //json日期格式转换为正常格式
  18. if(strDate != undefined && strDate != null) {
  19. var date = eval('new Date(' + strDate.replace(/\d+(?=-[^-]+$)/,
  20. function(a) {
  21. return parseInt(a, 10) - 1;
  22. }).match(/\d+/g) + ')');
  23. return formatDate(date);
  24. } else {
  25. return '';
  26. }
  27. }
  28. function GetData() {
  29. var table = document.getElementById("table");
  30. //server data
  31. // var xhr = new plus.net.XMLHttpRequest();
  32. // xhr.responseType = "json";
  33. // xhr.onreadystatechange = function() {
  34. // switch(xhr.readyState) {
  35. // case 4:
  36. // if(xhr.status == 200) {
  37. // table.innerHTML = "";
  38. // table.innerText = "";
  39. // if(xhr.response.msg != null && xhr.response.msg.length > 0) {
  40. // for(var i = 0; i < xhr.response.msg.length; i++) {
  41. // //load list
  42. // var dataobject = xhr.response.msg[i];
  43. // var li = document.createElement('li');
  44. // li.className = 'mui-table-view-cell mui-media';
  45. // li.innerHTML = '<a>' +
  46. // '<div class="mui-media-body">' +
  47. // '年度:'+year+'<br/>' +
  48. // '<span style="color:#C70F1A;">金额: '+dataobject[i].scoresNum+'<br/></span> 发放时间: '+jsonDateFormatDateTime(dataobject[i].createDate)+' <br/> 发放银行卡: '+dataobject[i].bankNumber+'' +
  49. // '</div>' +
  50. // '</a>';
  51. // table.appendChild(li, table.firstChild);
  52. // }
  53. // } else {}
  54. // plus.nativeUI.closeWaiting();
  55. // } else {
  56. // plus.nativeUI.closeWaiting();
  57. // plus.nativeUI.toast('世界上最遥远的距离就是没有网络。');
  58. // }
  59. // break;
  60. // default:
  61. // break;
  62. // }
  63. // }
  64. // xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=getRewardLists&content={'userID':'" + users.ID + "'}"));
  65. // xhr.send();
  66. plus.nativeUI.showWaiting("数据加载中...");
  67. mui.post(api+'/user/integradetail',{data:users.ID},function(res){
  68. if(res.code=="200"){
  69. plus.nativeUI.closeWaiting();
  70. console.log(JSON.stringify(res.data))
  71. for(var i = 0; i < res.data.length; i++) {
  72. //load list
  73. var dataobject = res.data[i];
  74. var li = document.createElement('li');
  75. li.className = 'mui-table-view-cell mui-media';//
  76. li.innerHTML = '<a>' +
  77. '<div class="mui-media-body">' +
  78. '年度:'+dataobject.year+'<br/>' +
  79. '<span style="color:#C70F1A;">金额: '+dataobject.scoresNum+'<br/></span> 发放时间: '+jsonDateFormatDateTime(dataobject.createDate)+' <br/> 发放银行卡: '+dataobject.bankNumber+'' +
  80. '</div>' +
  81. '</a>';
  82. table.appendChild(li, table.firstChild);
  83. }
  84. }
  85. },'json')
  86. }
  87. </script>
  88. </head>
  89. <body>
  90. <header class="mui-bar mui-bar-nav">
  91. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  92. <h1 class="mui-title">奖励发放</h1>
  93. </header>
  94. <div class="mui-content">
  95. <ul class="mui-table-view" id="table">
  96. </ul>
  97. </div>
  98. </body>
  99. </html>