123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <title>湖北智慧水运</title>
- <link href="../css/mui.min.css" rel="stylesheet">
- <script type="text/javascript" src="iscroll.js"></script>
- <script type="text/javascript" src="../js/zepto.min.js"></script>
- <script type="text/javascript">
- $(function(){
- var t = 9;
- if(t<10){
- hideJZ();
- }else{
- showJZ();
- }
- })
- var myScroll,
- pullDownEl, pullDownOffset,
- pullUpEl, pullUpOffset,
- generatedCount = 0;
- function pullDownAction () {
- showJZ();
- setTimeout(function () {
- // <-- Simulate network congestion, remove setTimeout from production!
- myScroll.refresh(); // Remember to refresh when contents are loaded (ie: on ajax completion)
- }, 1000); // <-- Simulate network congestion, remove setTimeout from production!
- }
- function pullUpAction () {
- setTimeout(function () { // <-- Simulate network congestion, remove setTimeout from production!
- myScroll.refresh(); // Remember to refresh when contents are loaded (ie: on ajax completion)
- //$("#pullUp").hide();
- }, 1000); // <-- Simulate network congestion, remove setTimeout from production!
- }
- function loaded() {
- pullDownEl = document.getElementById('pullDown');
- pullDownOffset = pullDownEl.offsetHeight;
- pullUpEl = document.getElementById('pullUp');
- pullUpOffset = pullUpEl.offsetHeight;
-
- myScroll = new iScroll('wrapper', {
- useTransition: true,
- topOffset: pullDownOffset,
- onRefresh: function () {
- if (pullDownEl.className.match('loading')) {
- pullDownEl.className = '';
- pullDownEl.querySelector('.pullDownLabel').innerHTML = '下拉刷新...';
- } else if (pullUpEl.className.match('loading')) {
- pullUpEl.className = '';
- pullUpEl.querySelector('.pullUpLabel').innerHTML = '上拉加载更多...';
- }
- },
- onScrollMove: function () {
- if (this.y > 5 && !pullDownEl.className.match('flip')) {
- pullDownEl.className = 'flip';
- pullDownEl.querySelector('.pullDownLabel').innerHTML = '松手刷新...';
- this.minScrollY = 0;
- } else if (this.y < 5 && pullDownEl.className.match('flip')) {
- pullDownEl.className = '';
- pullDownEl.querySelector('.pullDownLabel').innerHTML = '下拉刷新...';
- this.minScrollY = -pullDownOffset;
- } else if (this.y < (this.maxScrollY - 5) && !pullUpEl.className.match('flip')) {
- pullUpEl.className = 'flip';
- pullUpEl.querySelector('.pullUpLabel').innerHTML = '松手加载...';
- this.maxScrollY = this.maxScrollY;
- } else if (this.y > (this.maxScrollY + 5) && pullUpEl.className.match('flip')) {
- pullUpEl.className = '';
- pullUpEl.querySelector('.pullUpLabel').innerHTML = '上拉加载更多...';
- this.maxScrollY = pullUpOffset;
- }
- },
- onScrollEnd: function () {
- if (pullDownEl.className.match('flip')) {
- pullDownEl.className = 'loading';
- pullDownEl.querySelector('.pullDownLabel').innerHTML = '载入中...';
- pullDownAction(); // Execute custom function (ajax call?)
- } else if (pullUpEl.className.match('flip')) {
- pullUpEl.className = 'loading';
- pullUpEl.querySelector('.pullUpLabel').innerHTML = '载入中...';
- pullUpAction(); // Execute custom function (ajax call?)
- }
- }
- });
-
- setTimeout(function () { document.getElementById('wrapper').style.left = '0'; }, 800);
- }
- document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
- document.addEventListener('DOMContentLoaded', function () { setTimeout(loaded, 200); }, false);
- </script>
- <style type="text/css" media="all">
- #header {
- position:absolute; z-index:2;
- top:0; left:0;
- width:100%;
- height:45px;
- line-height:45px;
- padding:0;
- color:#eee;
- font-size:22px;
- padding-left:10px;
- text-align:left;
- color:white;
- background: #2196f3;
- }
- #header a {
- color:#f3f3f3;
- text-decoration:none;
- }
- #wrapper {
- position:absolute; z-index:1;
- top:48px; bottom:0px; left:-9999px;
- width:100%;
- overflow:auto;
- }
- #scroller {
- position:absolute; z-index:1;
- /* -webkit-touch-callout:none;*/
- -webkit-tap-highlight-color:rgba(0,0,0,0);
- width:100%;
- padding:0;
- }
- #myFrame {
- position:absolute;
- top:0; left:0;
- }
- /**
- *
- * Pull down styles
- *
- */
- #pullDown, #pullUp {
- background:#fff;
- height:45px;
- line-height:45px;
- font-weight:bold;
- font-size:14px;
- color:#888;
- padding-left: 50%;
- margin-left:-54.5px;
- }
- #pullDown .pullDownIcon, #pullUp .pullUpIcon {
- display:block; float:left;
- width:40px; height:40px;
- background:url(../images/pull-icon@2x.png) 0 0 no-repeat;
- -webkit-background-size:40px 80px; background-size:40px 80px;
- -webkit-transition-property:-webkit-transform;
- -webkit-transition-duration:250ms;
- }
- #pullDown .pullDownIcon {
- -webkit-transform:rotate(0deg) translateZ(0);
- }
- #pullUp .pullUpIcon {
- -webkit-transform:rotate(-180deg) translateZ(0);
- }
- #pullDown.flip .pullDownIcon {
- -webkit-transform:rotate(-180deg) translateZ(0);
- }
- #pullUp.flip .pullUpIcon {
- -webkit-transform:rotate(0deg) translateZ(0);
- }
- #pullDown.loading .pullDownIcon, #pullUp.loading .pullUpIcon {
- background-position:0 100%;
- -webkit-transform:rotate(0deg) translateZ(0);
- -webkit-transition-duration:0ms;
- -webkit-animation-name:loading;
- -webkit-animation-duration:2s;
- -webkit-animation-iteration-count:infinite;
- -webkit-animation-timing-function:linear;
- }
- @-webkit-keyframes loading {
- from { -webkit-transform:rotate(0deg) translateZ(0); }
- to { -webkit-transform:rotate(360deg) translateZ(0); }
- }
- ul,li{padding: 0px;margin: 0px;}
- </style>
- </head>
- <body>
- <div id="header"><a>待办发文</a></div>
- <div id="wrapper">
- <div id="scroller">
- <div id="pullDown" >
- <div><span class="pullDownIcon"></span><span class="pullDownLabel">下拉刷新...</span></div>
- </div>
- <div id="mui-content">
- <ul id="thelist mui-table-view">
- <li class="mui-table-view-cell mui-media"><a href="dbfwinfo.html" >
- <div class="mui-media-body">
- 发文
- <p class="mui-ellipsis">当前环节:拟稿 拟稿日期:2015-05-02</p>
- </div>
- </a></li>
- <li class="mui-table-view-cell mui-media"><a href="dbfwinfo.html" >
- <div class="mui-media-body">
- 发文
- <p class="mui-ellipsis">当前环节:拟稿 拟稿日期:2015-05-02</p>
- </div>
- </a></li>
- <li class="mui-table-view-cell mui-media"><a href="dbfwinfo.html" >
- <div class="mui-media-body">
- 发文
- <p class="mui-ellipsis">当前环节:拟稿 拟稿日期:2015-05-02</p>
- </div>
- </a></li>
- <li class="mui-table-view-cell mui-media"><a href="dbfwinfo.html" >
- <div class="mui-media-body">
- 发文
- <p class="mui-ellipsis">当前环节:拟稿 拟稿日期:2015-05-02</p>
- </div>
- </a></li>
- <li class="mui-table-view-cell mui-media"><a href="dbfwinfo.html" >
- <div class="mui-media-body">
- 发文
- <p class="mui-ellipsis">当前环节:拟稿 拟稿日期:2015-05-02</p>
- </div>
- </a></li>
- <li class="mui-table-view-cell mui-media"><a href="dbfwinfo.html" >
- <div class="mui-media-body">
- 发文
- <p class="mui-ellipsis">当前环节:拟稿 拟稿日期:2015-05-02</p>
- </div>
- </a></li>
- <li class="mui-table-view-cell mui-media"><a href="dbfwinfo.html" >
- <div class="mui-media-body">
- 发文
- <p class="mui-ellipsis">当前环节:拟稿 拟稿日期:2015-05-02</p>
- </div>
- </a></li>
- <li class="mui-table-view-cell mui-media"><a href="dbfwinfo.html" >
- <div class="mui-media-body">
- 发文
- <p class="mui-ellipsis">当前环节:拟稿 拟稿日期:2015-05-02</p>
- </div>
- </a></li>
- </ul>
- </div>
- <div id="pullUp">
-
- </div>
- </div>
- </div>
- </body>
- </html>
|