| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432 | <!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"><meta content="IE=edge" http-equiv="X-UA-Compatible"><meta content="initial-scale=1.0, width=device-width" name="viewport"><title>湖北智慧水运</title><link href="../css/mui.min.css" rel="stylesheet"><script type="text/javascript" src="../js/iscroll.js" charset="utf-8"></script><script type="text/javascript" src="../js/zepto.min.js"></script>\<style>	.Hdel{		position:absolute;		right:-70px;		width:70px;		height: 64px;		background-color: red;		top: 0px;		color: white;  		padding-top: 21px;  		text-align: center;	}	.Hdel a{		 color: white;	}</style><script type="text/javascript">var page =1; var rows =10;  var sPosx = 0; //记录触碰时的x位置 var sPosy = 0; //记录触碰时的y位置  var mPosx = 0; //记录滑动时的x位置 var mPosy = 0; //记录滑动时的y位置  var nChangx = 0;//记录滑动结束时的x位置 var nChangy = 0;//记录滑动结束时的y位置  var statusname = {"1":"草稿","2":"已发送"} $(function(){	  $.ajax({	         type: 'post',	         url: '../../yjcontroller/findCgxAll.do',	         data:{uid:"402881e44e86c26d014e86c9ae8c0008",page:page,rows:rows,code:getQueryString("code")},	         dataType: 'json',	         success: function(data){	        	 console.log(data)	        		 var result = '';	        	 if(data.length==0)	        	 {layer.open({	      			    shade:false, 					    content: '没有相关数据', 					    style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center', 					    time: 1 					});	        		 $('.lists').html('');	        		 return;	        	 }	                for(var i = 0; i < data.length; i++){	                	  result +=   '<li class="mui-table-view-cell mui-media"><a href="xiangqingemailCG.html?id='+data[i].id+'" >'+							'<div class="mui-media-body">'+data[i].title+							'<p class="mui-ellipsis">收件人:<span style="color:rgb(33, 150, 243);">'+data[i].receiveUserName+'</span>  发件日期:<span style="color:rgb(33, 150, 243);">'+todata(data[i].sendDate)+'</span> 状态:<span style="color:rgb(33, 150, 243);">'+statusname[data[i].status]+'</span></p>'+						'</div>'+				'</a><div class="Hdel" id="'+data[i].id+'"><a onclick="delbyid(\''+data[i].id+'\');">删除</a></div></li>';	                }	                    $('.lists').html('');	                    $('.lists').prepend(result);	                    if(data.length>=rows){	         			 showJZ();	         			}else{	         			 hideJZ();	         			}	                    Hdel();	                     myScroll.refresh();	         }	      });	 });/* 	 	 function  aaa(){	  $.ajax({        type: 'post',        url: '../../yjcontroller/viewFj.do',        data:{uid:"402881e44e86c26d014e86c9ae8c0008",page:page,rows:rows},        dataType: 'json',        success: function(data){       	 var result = '';               for(var i = 0; i < data.length; i++){            	   result +=   '<li class="mui-table-view-cell mui-media"><a href="xiangqingemailCG.html?id='+data[i].id+'" >'+					'<div class="mui-media-body">'+data[i].title+					'<p class="mui-ellipsis">收件人:<span style="color:rgb(33, 150, 243);">'+data[i].receiveUserName+'</span>  发件日期:<span style="color:rgb(33, 150, 243);">'+todata(data[i].sendDate)+'</span> 状态:<span style="color:rgb(33, 150, 243);">'+statusname[data[i].status]+'</span></p>'+				'</div>'+		'</a><div class="Hdel" id="'+data[i].id+'"><a onclick="delbyid(\''+data[i].id+'\');">删除</a></div></li>';               }               	if(data.length<rows){					hideJZ();					}else{						showJZ();					}                   $('.lists').html('');                   $('.lists').prepend(result);                   Hdel();                   myScroll.refresh();	        	}        })	 } */ var myScroll,	pullDownEl, pullDownOffset,	pullUpEl, pullUpOffset,	generatedCount = 0;function pullDownAction () {		page = 1;    	rows = 10;    	 $.ajax({	         type: 'post',	         url: '../../yjcontroller/findCgxAll.do',	         data:{uid:"402881e44e86c26d014e86c9ae8c0008",page:page,rows:rows},	         dataType: 'json',	         success: function(data){	        	 console.log(data)	        		 var result = '';	        	 if(data.length==0)	        	 {layer.open({	      			    shade:false, 					    content: '没有相关数据', 					    style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center', 					    time: 1 					});	        		 $('.lists').html('');	        		 return;	        	 }	                for(var i = 0; i < data.length; i++){	                	  result +=   '<li class="mui-table-view-cell mui-media"><a href="xiangqingemailCG.html?id='+data[i].id+'" >'+							'<div class="mui-media-body">'+data[i].title+							'<p class="mui-ellipsis">收件人:<span style="color:rgb(33, 150, 243);">'+data[i].receiveUserName+'</span>  发件日期:<span style="color:rgb(33, 150, 243);">'+todata(data[i].sendDate)+'</span> 状态:<span style="color:rgb(33, 150, 243);">'+statusname[data[i].status]+'</span></p>'+						'</div>'+				'</a><div class="Hdel" id="'+data[i].id+'"><a onclick="delbyid(\''+data[i].id+'\');">删除</a></div></li>';	                }	                    $('.lists').html('');	                    $('.lists').prepend(result);	                    if(data.length>=rows){	         			 showJZ();	         			}else{	         			 hideJZ();	         			}	                    Hdel();	                     myScroll.refresh();	         }	      });}function pullUpAction () {		page+=1;		 $.ajax({	         type: 'post',	         url: '../../yjcontroller/findCgxAll.do',	         data:{uid:"402881e44e86c26d014e86c9ae8c0008",page:page,rows:rows},	         dataType: 'json',	         success: function(data){	        	 console.log(data)	        		 var result = '';	        	 if(data.length==0)	        	 {layer.open({	      			    shade:false, 					    content: '没有相关数据', 					    style: 'background-color:rgba(0,0,0,0.5); color:white; border:none;font-size:20px;text-align:center', 					    time: 1 					});	        		 $('.lists').html('');	        		 return;	        	 }	                for(var i = 0; i < data.length; i++){	                	  result +=   '<li class="mui-table-view-cell mui-media"><a href="xiangqingemailCG.html?id='+data[i].id+'" >'+							'<div class="mui-media-body">'+data[i].title+							'<p class="mui-ellipsis">收件人:<span style="color:rgb(33, 150, 243);">'+data[i].receiveUserName+'</span>  发件日期:<span style="color:rgb(33, 150, 243);">'+todata(data[i].sendDate)+'</span> 状态:<span style="color:rgb(33, 150, 243);">'+statusname[data[i].status]+'</span></p>'+						'</div>'+				'</a><div class="Hdel" id="'+data[i].id+'"><a onclick="delbyid(\''+data[i].id+'\');">删除</a></div></li>';	                }	                    $('.lists').append(result);	                    if(data.length<rows){	                     	 wcJZ();	                		  myScroll.refresh();	                      }	         }	      });}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);}function delbyid(id){	$.ajax({        type: 'post',        url: '../../yjcontroller/deleteMailUser.do',         data:{        	 mailIds:id,        	 id:"402881e44e86c26d014e86c9ae8c0008"        	 },        dataType: 'json',        success: function(data){        	if(data.resultCode){        		$("#"+id).parent().remove();        	}        }	});}function Hdel(){	   $(".mui-table-view-cell").each(function(){		this.addEventListener('touchmove', function(event) {		     // 如果这个元素的位置内只有一个手指的话		    if (event.targetTouches.length == 1) {		     event.preventDefault();// 阻止浏览器默认事件,重要 	    		        var touch = event.targetTouches[0];	    		        mPosx = touch.pageX;	    		        mPosy = touch.pageY;		        }		}, false);				this.addEventListener('touchend', function(event) {		     // 如果这个元素的位置内只有一个手指的话		     if (event.changedTouches.length == 1) {		    	 event.preventDefault();// 阻止浏览器默认事件,重要 	    			var touch = event.changedTouches[0];	    		       nChangx = touch.pageX;	    		       nChangy = touch.pageY;	    		       if(nChangx - sPosx < -150){	    		    	    $(".Hdel").animate({right: '-70px'}, "slow");	    		       		$(this).find(".Hdel").animate({right:'0px'},'50');	    		        }else if(nChangx - sPosx > 50){	    		        	$(this).find(".Hdel").animate({right:'-70'},'50');	    		        }		     }		}, false);				this.addEventListener('touchstart', function(event) {		     // 如果这个元素的位置内只有一个手指的话		    if (event.targetTouches.length == 1) {		     event.preventDefault();// 阻止浏览器默认事件,重要 	    		        var touch = event.targetTouches[0];	    		        sPosx = touch.pageX;	    		        sPosy = touch.pageY;		        }			}, false);			});	}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;	text-align:center;	  color:white;    background: #2196f3;}#header a {	color:white;	text-decoration:none;}#wrapper {	position:absolute; z-index:1;	top: 45px; 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" class="lists">		</ul>		</div>		<div id="pullUp">					</div>	</div></div></body></html>
 |