Няма описание

WorkAnn.html 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>公告通知</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  9. <!--标准mui.css-->
  10. <link rel="stylesheet" href="../css/mui.min.css">
  11. <!--App自定义的css-->
  12. <!--<link rel="stylesheet" type="text/css" href="css/app.css" />-->
  13. <style>
  14. .mui-table h4,
  15. .mui-table h5,
  16. .mui-table .mui-h5,
  17. .mui-table .mui-h6,
  18. .mui-table p {
  19. margin-top: 0;
  20. }
  21. .mui-table h4 {
  22. line-height: 21px;
  23. font-size: 16px;
  24. font-weight: 500;
  25. }
  26. .mui-table .oa-icon {
  27. position: absolute;
  28. right: 0;
  29. bottom: 0;
  30. }
  31. .mui-table .oa-icon-star-filled {
  32. color: #f14e41;
  33. }
  34. .mui-bar-nav {
  35. background-color: #00a1cb;
  36. }
  37. .hy_loading {
  38. position: fixed;
  39. left: 0;
  40. top: 0;
  41. width: 100%;
  42. height: 100%;
  43. background-color: rgba(0, 0, 0, .3);
  44. z-index: 9998;
  45. transition: all .2s;
  46. }
  47. .hy_loading .loading_img {
  48. position: absolute;
  49. left: 0;
  50. top: 0;
  51. bottom: 0;
  52. right: 0;
  53. overflow: hidden;
  54. margin: auto;
  55. width: 60px;
  56. height: 24px;
  57. z-index: 9999;
  58. }
  59. </style>
  60. </head>
  61. <body>
  62. <div class="hy_loading" id="hy_loading">
  63. <img class="loading_img" src="../images/loading-0.gif" alt="加载中" />
  64. </div>
  65. <div class="mui-content mui-content mui-scroll-wrapper" id="pullrefresh">
  66. <div class="mui-scroll">
  67. <ul class="mui-table-view" id="order_list">
  68. <!--<li class="mui-table-view-cell">
  69. <div class="mui-input-row mui-search">
  70. <input type="search" class="mui-input-clear go_search" placeholder="请输入关键字" style="margin-bottom: 0;">
  71. </div>
  72. <div class="mui-btn mui-btn-primary turnGo">更多</div>
  73. </li>-->
  74. </ul>
  75. </div>
  76. </div>
  77. </body>
  78. <script src="../js/zepto.js"></script>
  79. <script src="../Script/Common/huayi.config.js"></script>
  80. <script src="../Script/Common/huayi.http.js"></script>
  81. <script src="../js/mui.min.js"></script>
  82. <script>
  83. var page = 1; //页数
  84. var pageSize = 10; //每页显示条目
  85. var total; //数据总条数
  86. var token = localStorage.getItem("T"); //获取本地存储
  87. Ajax();
  88. mui.init({
  89. swipeBack: false,
  90. pullRefresh: {
  91. container: '#pullrefresh',
  92. up: {
  93. contentrefresh: "正在加载...", //可选,正在加载状态时,上拉加载控件上显示的标题内容
  94. contentnomore: '没有更多数据了', //可选,请求完毕若没有更多数据时显示的提醒内容;
  95. callback: pullupRefresh
  96. }
  97. }
  98. });
  99. //下拉刷新
  100. function pullupRefresh() {
  101. setTimeout(function() {
  102. mui('#pullrefresh').pullRefresh().endPullupToRefresh((page++ >= Math.ceil(total / 10)));
  103. $.ajax({
  104. type: "get",
  105. url: huayi.config.callcenter_url + 'Notice/GetList',
  106. dataType: 'json', //服务器返回json格式数据
  107. data: {
  108. openid: helper.cookies.get("openid"),
  109. page: page,
  110. pagesize: pageSize
  111. },
  112. success: function(data) {
  113. total = data.total;
  114. var a = "";
  115. $(data.rows).each(function(i, n) {
  116. var T = n.F_CreateOn.substring(0, n.F_CreateOn.indexOf(' '));
  117. a = '<li class="mui-table-view-cell order" index=' + n.F_NoticeId + '>' +
  118. '<div class="mui-table">' +
  119. '<div class="mui-table-cell mui-col-xs-8">' +
  120. '<h4 class="mui-ellipsis">' + n.F_Title + '</h4>' +
  121. '<span class="mui-h5">' + T + '</span>' +
  122. '</div>' +
  123. '<div class="mui-table-cell mui-col-xs-4 mui-text-right">' +
  124. ' <a class="mui-navigate-right"></a>' +
  125. '</div>' +
  126. '</div>' +
  127. '</li>'
  128. $(a).appendTo($("#order_list"));
  129. })
  130. },
  131. })
  132. }, 1000);
  133. }
  134. //初次加载
  135. function Ajax() {
  136. $(".order").remove();
  137. $.ajax({
  138. type: "get",
  139. url: huayi.config.callcenter_url + 'Notice/GetList',
  140. dataType: 'json', //服务器返回json格式数据
  141. data: {
  142. openid: helper.cookies.get("openid"),
  143. page: page,
  144. pagesize: pageSize
  145. },
  146. success: function(data) {
  147. if(document.getElementById('hy_loading')){
  148. document.getElementById('hy_loading').style.opacity = 0;
  149. document.getElementById('hy_loading').remove();
  150. }
  151. total = data.total;
  152. var a = "";
  153. $(data.rows).each(function(i, n) {
  154. var T = n.F_CreateOn.substring(0, n.F_CreateOn.indexOf(' '));
  155. a = '<li class="mui-table-view-cell order" index=' + n.F_NoticeId + '>' +
  156. '<div class="mui-table">' +
  157. '<div class="mui-table-cell mui-col-xs-8">' +
  158. '<h4 class="mui-ellipsis">' + n.F_Title + '</h4>' +
  159. '<span class="mui-h5">' + T + '</span>' +
  160. '</div>' +
  161. '<div class="mui-table-cell mui-col-xs-4 mui-text-right">' +
  162. ' <a class="mui-navigate-right"></a>' +
  163. '</div>' +
  164. '</div>' +
  165. '</li>'
  166. $(a).appendTo($("#order_list"));
  167. })
  168. //详情
  169. $('.order').on('tap', function() {
  170. var index = $(this).attr("index");
  171. window.location.href = "AnnDeal.html?index=" + index;
  172. })
  173. },
  174. })
  175. }
  176. </script>
  177. </html>