index.html 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
  6. <meta name="apple-mobile-web-app-capable" content="yes">
  7. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  8. <title>湖北智慧水运</title>
  9. <link href="../css/mui.min.css" rel="stylesheet">
  10. <script type="text/javascript" src="iscroll.js"></script>
  11. <script type="text/javascript" src="../js/zepto.min.js"></script>
  12. <script type="text/javascript">
  13. $(function(){
  14. var t = 9;
  15. if(t<10){
  16. hideJZ();
  17. }else{
  18. showJZ();
  19. }
  20. })
  21. var myScroll,
  22. pullDownEl, pullDownOffset,
  23. pullUpEl, pullUpOffset,
  24. generatedCount = 0;
  25. function pullDownAction () {
  26. showJZ();
  27. setTimeout(function () {
  28. // <-- Simulate network congestion, remove setTimeout from production!
  29. myScroll.refresh(); // Remember to refresh when contents are loaded (ie: on ajax completion)
  30. }, 1000); // <-- Simulate network congestion, remove setTimeout from production!
  31. }
  32. function pullUpAction () {
  33. setTimeout(function () { // <-- Simulate network congestion, remove setTimeout from production!
  34. myScroll.refresh(); // Remember to refresh when contents are loaded (ie: on ajax completion)
  35. //$("#pullUp").hide();
  36. }, 1000); // <-- Simulate network congestion, remove setTimeout from production!
  37. }
  38. function loaded() {
  39. pullDownEl = document.getElementById('pullDown');
  40. pullDownOffset = pullDownEl.offsetHeight;
  41. pullUpEl = document.getElementById('pullUp');
  42. pullUpOffset = pullUpEl.offsetHeight;
  43. myScroll = new iScroll('wrapper', {
  44. useTransition: true,
  45. topOffset: pullDownOffset,
  46. onRefresh: function () {
  47. if (pullDownEl.className.match('loading')) {
  48. pullDownEl.className = '';
  49. pullDownEl.querySelector('.pullDownLabel').innerHTML = '下拉刷新...';
  50. } else if (pullUpEl.className.match('loading')) {
  51. pullUpEl.className = '';
  52. pullUpEl.querySelector('.pullUpLabel').innerHTML = '上拉加载更多...';
  53. }
  54. },
  55. onScrollMove: function () {
  56. if (this.y > 5 && !pullDownEl.className.match('flip')) {
  57. pullDownEl.className = 'flip';
  58. pullDownEl.querySelector('.pullDownLabel').innerHTML = '松手刷新...';
  59. this.minScrollY = 0;
  60. } else if (this.y < 5 && pullDownEl.className.match('flip')) {
  61. pullDownEl.className = '';
  62. pullDownEl.querySelector('.pullDownLabel').innerHTML = '下拉刷新...';
  63. this.minScrollY = -pullDownOffset;
  64. } else if (this.y < (this.maxScrollY - 5) && !pullUpEl.className.match('flip')) {
  65. pullUpEl.className = 'flip';
  66. pullUpEl.querySelector('.pullUpLabel').innerHTML = '松手加载...';
  67. this.maxScrollY = this.maxScrollY;
  68. } else if (this.y > (this.maxScrollY + 5) && pullUpEl.className.match('flip')) {
  69. pullUpEl.className = '';
  70. pullUpEl.querySelector('.pullUpLabel').innerHTML = '上拉加载更多...';
  71. this.maxScrollY = pullUpOffset;
  72. }
  73. },
  74. onScrollEnd: function () {
  75. if (pullDownEl.className.match('flip')) {
  76. pullDownEl.className = 'loading';
  77. pullDownEl.querySelector('.pullDownLabel').innerHTML = '载入中...';
  78. pullDownAction(); // Execute custom function (ajax call?)
  79. } else if (pullUpEl.className.match('flip')) {
  80. pullUpEl.className = 'loading';
  81. pullUpEl.querySelector('.pullUpLabel').innerHTML = '载入中...';
  82. pullUpAction(); // Execute custom function (ajax call?)
  83. }
  84. }
  85. });
  86. setTimeout(function () { document.getElementById('wrapper').style.left = '0'; }, 800);
  87. }
  88. document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
  89. document.addEventListener('DOMContentLoaded', function () { setTimeout(loaded, 200); }, false);
  90. </script>
  91. <style type="text/css" media="all">
  92. #header {
  93. position:absolute; z-index:2;
  94. top:0; left:0;
  95. width:100%;
  96. height:45px;
  97. line-height:45px;
  98. padding:0;
  99. color:#eee;
  100. font-size:22px;
  101. padding-left:10px;
  102. text-align:left;
  103. color:white;
  104. background: #2196f3;
  105. }
  106. #header a {
  107. color:#f3f3f3;
  108. text-decoration:none;
  109. }
  110. #wrapper {
  111. position:absolute; z-index:1;
  112. top:48px; bottom:0px; left:-9999px;
  113. width:100%;
  114. overflow:auto;
  115. }
  116. #scroller {
  117. position:absolute; z-index:1;
  118. /* -webkit-touch-callout:none;*/
  119. -webkit-tap-highlight-color:rgba(0,0,0,0);
  120. width:100%;
  121. padding:0;
  122. }
  123. #myFrame {
  124. position:absolute;
  125. top:0; left:0;
  126. }
  127. /**
  128. *
  129. * Pull down styles
  130. *
  131. */
  132. #pullDown, #pullUp {
  133. background:#fff;
  134. height:45px;
  135. line-height:45px;
  136. font-weight:bold;
  137. font-size:14px;
  138. color:#888;
  139. padding-left: 50%;
  140. margin-left:-54.5px;
  141. }
  142. #pullDown .pullDownIcon, #pullUp .pullUpIcon {
  143. display:block; float:left;
  144. width:40px; height:40px;
  145. background:url(../images/pull-icon@2x.png) 0 0 no-repeat;
  146. -webkit-background-size:40px 80px; background-size:40px 80px;
  147. -webkit-transition-property:-webkit-transform;
  148. -webkit-transition-duration:250ms;
  149. }
  150. #pullDown .pullDownIcon {
  151. -webkit-transform:rotate(0deg) translateZ(0);
  152. }
  153. #pullUp .pullUpIcon {
  154. -webkit-transform:rotate(-180deg) translateZ(0);
  155. }
  156. #pullDown.flip .pullDownIcon {
  157. -webkit-transform:rotate(-180deg) translateZ(0);
  158. }
  159. #pullUp.flip .pullUpIcon {
  160. -webkit-transform:rotate(0deg) translateZ(0);
  161. }
  162. #pullDown.loading .pullDownIcon, #pullUp.loading .pullUpIcon {
  163. background-position:0 100%;
  164. -webkit-transform:rotate(0deg) translateZ(0);
  165. -webkit-transition-duration:0ms;
  166. -webkit-animation-name:loading;
  167. -webkit-animation-duration:2s;
  168. -webkit-animation-iteration-count:infinite;
  169. -webkit-animation-timing-function:linear;
  170. }
  171. @-webkit-keyframes loading {
  172. from { -webkit-transform:rotate(0deg) translateZ(0); }
  173. to { -webkit-transform:rotate(360deg) translateZ(0); }
  174. }
  175. ul,li{padding: 0px;margin: 0px;}
  176. </style>
  177. </head>
  178. <body>
  179. <div id="header"><a>待办发文</a></div>
  180. <div id="wrapper">
  181. <div id="scroller">
  182. <div id="pullDown" >
  183. <div><span class="pullDownIcon"></span><span class="pullDownLabel">下拉刷新...</span></div>
  184. </div>
  185. <div id="mui-content">
  186. <ul id="thelist mui-table-view">
  187. <li class="mui-table-view-cell mui-media"><a href="dbfwinfo.html" >
  188. <div class="mui-media-body">
  189. 发文
  190. <p class="mui-ellipsis">当前环节:拟稿 拟稿日期:2015-05-02</p>
  191. </div>
  192. </a></li>
  193. <li class="mui-table-view-cell mui-media"><a href="dbfwinfo.html" >
  194. <div class="mui-media-body">
  195. 发文
  196. <p class="mui-ellipsis">当前环节:拟稿 拟稿日期:2015-05-02</p>
  197. </div>
  198. </a></li>
  199. <li class="mui-table-view-cell mui-media"><a href="dbfwinfo.html" >
  200. <div class="mui-media-body">
  201. 发文
  202. <p class="mui-ellipsis">当前环节:拟稿 拟稿日期:2015-05-02</p>
  203. </div>
  204. </a></li>
  205. <li class="mui-table-view-cell mui-media"><a href="dbfwinfo.html" >
  206. <div class="mui-media-body">
  207. 发文
  208. <p class="mui-ellipsis">当前环节:拟稿 拟稿日期:2015-05-02</p>
  209. </div>
  210. </a></li>
  211. <li class="mui-table-view-cell mui-media"><a href="dbfwinfo.html" >
  212. <div class="mui-media-body">
  213. 发文
  214. <p class="mui-ellipsis">当前环节:拟稿 拟稿日期:2015-05-02</p>
  215. </div>
  216. </a></li>
  217. <li class="mui-table-view-cell mui-media"><a href="dbfwinfo.html" >
  218. <div class="mui-media-body">
  219. 发文
  220. <p class="mui-ellipsis">当前环节:拟稿 拟稿日期:2015-05-02</p>
  221. </div>
  222. </a></li>
  223. <li class="mui-table-view-cell mui-media"><a href="dbfwinfo.html" >
  224. <div class="mui-media-body">
  225. 发文
  226. <p class="mui-ellipsis">当前环节:拟稿 拟稿日期:2015-05-02</p>
  227. </div>
  228. </a></li>
  229. <li class="mui-table-view-cell mui-media"><a href="dbfwinfo.html" >
  230. <div class="mui-media-body">
  231. 发文
  232. <p class="mui-ellipsis">当前环节:拟稿 拟稿日期:2015-05-02</p>
  233. </div>
  234. </a></li>
  235. </ul>
  236. </div>
  237. <div id="pullUp">
  238. </div>
  239. </div>
  240. </div>
  241. </body>
  242. </html>