Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 
 
 

173 рядки
5.8 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 src="js/tools.js"></script>
  13. <style>
  14. .mui-control-item span {
  15. display: block;
  16. margin: 0;
  17. padding: 0;
  18. font-size: 20px;
  19. }
  20. </style>
  21. <script type="text/javascript">
  22. mui.plusReady(function() {
  23. CheckLogin();
  24. document.getElementById("bank").addEventListener("tap", function() {
  25. mui.openWindow({
  26. url: 'bankcard.html',
  27. id: 'bankcard',
  28. show: {
  29. aniShow: 'pop-in'
  30. }
  31. });
  32. });
  33. document.getElementById("faf").addEventListener("tap", function() {
  34. mui.openWindow({
  35. url: 'fafang.html',
  36. id: 'fafang',
  37. show: {
  38. aniShow: 'pop-in'
  39. }
  40. });
  41. });
  42. GetData();
  43. });
  44. function jsonDateFormatDate(strDate) { //json日期格式转换为正常格式
  45. if(strDate != undefined && strDate != null) {
  46. var date = eval('new Date(' + strDate.replace(/\d+(?=-[^-]+$)/,
  47. function(a) {
  48. return parseInt(a, 10) - 1;
  49. }).match(/\d+/g) + ')');
  50. return formatDate(date);
  51. } else {
  52. return '';
  53. }
  54. }
  55. function GetData() {
  56. var table = document.getElementById("table");
  57. //server data
  58. var xhr = new plus.net.XMLHttpRequest();
  59. xhr.responseType = "json";
  60. xhr.onreadystatechange = function() {
  61. switch(xhr.readyState) {
  62. case 4:
  63. if(xhr.status == 200) {
  64. GetDataCount();
  65. table.innerHTML = "";
  66. table.innerText = "";
  67. if(xhr.response.msg != null && xhr.response.msg.length > 0) {
  68. for(var i = 0; i < xhr.response.msg.length; i++) {
  69. //load list
  70. var dataobject = xhr.response.msg;
  71. var li = document.createElement('li');
  72. li.className = 'mui-table-view-cell mui-media';
  73. li.innerHTML = '<a>' +
  74. '<div class="mui-media-body">' +
  75. '' + dataobject[i].user_id + '' +
  76. '<span style="width: 25%; color:#C70F1A; text-align: left; float: right;">' + jsonDateFormatDate(dataobject[i].create_date) + '</span>' +
  77. '<p style="font-size: 14px;">' + dataobject[i].scores_name + '<span>(' + dataobject[i].scores_num + ')</span></p>' +
  78. '</div>' +
  79. '</a>';
  80. table.appendChild(li, table.firstChild);
  81. }
  82. } else {}
  83. plus.nativeUI.closeWaiting();
  84. } else {
  85. plus.nativeUI.closeWaiting();
  86. plus.nativeUI.toast('世界上最遥远的距离就是没有网络。');
  87. }
  88. break;
  89. default:
  90. break;
  91. }
  92. }
  93. xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=getScoresInfo&content={'logname':'" + users.phone + "','app':'2'}"));
  94. xhr.send();
  95. plus.nativeUI.showWaiting("数据加载中...");
  96. mui.post(api+'/user/integradetail',{data:users.ID},function(res){
  97. if(res.code=="200"){
  98. plus.nativeUI.closeWaiting();
  99. for(var i = 0; i < res.data.length; i++) {
  100. //load list
  101. var dataobject = res.data[i];
  102. var li = document.createElement('li');
  103. li.className = 'mui-table-view-cell mui-media';
  104. li.innerHTML = '<a>' +
  105. '<div class="mui-media-body">' +
  106. '' + users.username + '' +
  107. '<span style="width: 25%; color:#C70F1A; text-align: left; float: right;">' + jsonDateFormatDate(dataobject.createDate) + '</span>' +
  108. '<p style="font-size: 14px;">' + dataobject.scorename + '<span>(' + dataobject.scoresNum + ')</span></p>' +
  109. '</div>' +
  110. '</a>';
  111. table.appendChild(li, table.firstChild);
  112. }
  113. }
  114. },'json')
  115. }
  116. function GetDataCount() {//
  117. plus.nativeUI.showWaiting("数据加载中...");
  118. mui.post(api+'/user/detailInfo',{data:users.ID},function(res){
  119. if(res.code=="200"){
  120. plus.nativeUI.closeWaiting();
  121. document.getElementById("jlcount").innerText=res.data.getcount;
  122. document.getElementById("mxcount").innerText=res.data.allcount;
  123. }
  124. },'json')
  125. }
  126. </script>
  127. </head>
  128. <body>
  129. <header class="mui-bar mui-bar-nav">
  130. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  131. <h1 class="mui-title">招生奖励</h1>
  132. </header>
  133. <div class="mui-content">
  134. <div id="slider" class="mui-slider">
  135. <div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
  136. <a class="mui-control-item mui-active" href="#item1mobile">
  137. <span id="jlcount">0</span>我的奖励
  138. </a>
  139. <a class="mui-control-item" href="#item2mobile">
  140. <span id="mxcount">0</span>奖励明细
  141. </a>
  142. </div>
  143. <div id="sliderProgressBar" class="mui-slider-progress-bar mui-col-xs-6"></div>
  144. <div class="mui-slider-group">
  145. <div id="item1mobile" class="mui-slider-item mui-control-content mui-active">
  146. <ul class="mui-table-view" style="margin-top: 25px;" id="bank">
  147. <li class="mui-table-view-cell">
  148. <a class="mui-navigate-right"><img style="max-width: 20px; height: 20px;" class="mui-pull-left" src="images/card.png">&nbsp;银行卡</a>
  149. </li>
  150. </ul>
  151. <ul class="mui-table-view" style="margin-top: 25px;" id="faf">
  152. <li class="mui-table-view-cell">
  153. <a class="mui-navigate-right"><img style="max-width: 20px; height: 20px;" class="mui-pull-left" src="images/jiangli.png">&nbsp;奖励发放</a>
  154. </li>
  155. </ul>
  156. </div>
  157. <div id="item2mobile" class="mui-slider-item mui-control-content">
  158. <ul class="mui-table-view" id="table">
  159. </ul>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. </body>
  165. </html>