| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514 | 
							- <!DOCTYPE html>
 
- <html>
 
- 	<head>
 
- 		<meta charset="UTF-8">
 
- 		<title>我的券包</title>
 
- 		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
 
- 		<meta name="apple-mobile-web-app-capable" content="yes">
 
- 		<meta name="apple-mobile-web-app-status-bar-style" content="black">
 
- 		<link rel="stylesheet" type="text/css" href="css/mui.min.css?v=2018111001" />
 
- 		<link rel="stylesheet" type="text/css" href="css/iconfont.css?v=2018111001" />
 
- 		<link rel="stylesheet" type="text/css" href="css/style.css?v=2018111001" />
 
- 		<style>
 
- 			.my-yhq-list {
 
- 				background-color: transparent;
 
- 				padding: 0 15px;
 
- 			}
 
- 			
 
- 			.my-yhq-list:before,
 
- 			.my-yhq-list:after {
 
- 				display: none;
 
- 			}
 
- 			
 
- 			.my-yhq-list .my-yhq-cell {
 
- 				margin: 13px 0;
 
- 				position: relative;
 
- 			}
 
- 			
 
- 			.my-yhq-list .my-yhq-cell:last-child {
 
- 				margin-bottom: 0;
 
- 			}
 
- 			
 
- 			.my-yhq-list .fixed-box {
 
- 				position: absolute;
 
- 				left: 0;
 
- 				top: 0;
 
- 				width: 100%;
 
- 				height: 100%;
 
- 			}
 
- 			
 
- 			.my-yhq-list .table {
 
- 				display: table;
 
- 				height: 100%;
 
- 				width: 100%;
 
- 			}
 
- 			
 
- 			.my-yhq-list .left-cell {
 
- 				display: table-cell;
 
- 				width: 69%;
 
- 				height: 100%;
 
- 				padding: 15px 10px;
 
- 			}
 
- 			
 
- 			.my-yhq-list .right-cell {
 
- 				display: table-cell;
 
- 				width: 28%;
 
- 				height: 100%;
 
- 				text-align: right;
 
- 				padding-right: 14px;
 
- 				vertical-align: middle;
 
- 			}
 
- 			
 
- 			.my-yhq-list .left-cell .tit {
 
- 				font-size: 15px;
 
- 			}
 
- 			
 
- 			.my-yhq-list .left-cell .time {
 
- 				font-size: 12px;
 
- 				margin-bottom: 0;
 
- 				margin-top: 10px;
 
- 				color: #999;
 
- 			}
 
- 			
 
- 			.my-yhq-list .left-cell .condition {
 
- 				position: absolute;
 
- 				left: 10px;
 
- 				bottom: 15px;
 
- 				font-size: 12px;
 
- 				color: #999;
 
- 			}
 
- 			
 
- 			.my-yhq-list .right-cell .money {
 
- 				color: #fff;
 
- 				margin: 5px 0;
 
- 			}
 
- 			
 
- 			.my-yhq-list .right-cell .money>span {
 
- 				font-size: 20px;
 
- 				color: #63ccde;
 
- 			}
 
- 			
 
- 			.my-yhq-list .right-cell .my-btn {
 
- 				color: #fff;
 
- 				padding: 8px 10px;
 
- 				font-size: 14px;
 
- 				border-radius: 5px;
 
- 			}
 
- 			
 
- 			.my-yhq-list .right-cell .my-btn:active {
 
- 				background-color: rgba(0, 0, 0, .5);
 
- 			}
 
- 			
 
- 			.grayscale {
 
- 				color: #807f80 !important;
 
- 			}
 
- 			
 
- 			.my-yhq-list .right-cell .my-btn.grayscale {
 
- 				opacity: 0;
 
- 			}
 
- 			
 
- 			.mui-table-view-chevron .mui-table-view-cell {
 
- 				padding-right: 15px;
 
- 			}
 
- 			
 
- 			.mui-segmented-control .mui-control-item {
 
- 				line-height: 1;
 
- 				height: 50px;
 
- 				vertical-align: bottom;
 
- 				border: 0;
 
- 				border-bottom: 0;
 
- 				color: #444;
 
- 				background-color: transparent !important;
 
- 				padding-bottom: 3px;
 
- 			}
 
- 			
 
- 			.mui-segmented-control .mui-control-item.mui-active {
 
- 				background-color: transparent !important;
 
- 				border-bottom: 0;
 
- 			}
 
- 			
 
- 			.mui-segmented-control .mui-control-item.mui-active:after {
 
- 				content: '';
 
- 				width: 70px;
 
- 				height: 2px;
 
- 				background: #63CCDE;
 
- 				position: absolute;
 
- 				left: 50%;
 
- 				bottom: 0;
 
- 				margin-left: -35px;
 
- 			}
 
- 			
 
- 			.tab-yhq-list .mui-control-item.mui-active {
 
- 				color: #1cc9f4 !important;
 
- 				border-bottom: 0;
 
- 			}
 
- 			
 
- 			.tab-yhq-list {
 
- 				background: #fff;
 
- 				border: 0;
 
- 				border-bottom: 1px solid rgba(0, 0, 0, .1);
 
- 				position: fixed;
 
- 				left: 0;
 
- 				top: 0;
 
- 				width: 100%;
 
- 				z-index: 10;
 
- 			}
 
- 			
 
- 			.tab-yhq-list .mui-control-item {
 
- 				position: relative;
 
- 			}
 
- 			
 
- 			.mui-control-item.mui-active .mui-tab-label {
 
- 				color: #1cc9f4;
 
- 			}
 
- 			
 
- 			.tab-yhq-list .mui-control-item {
 
- 				color: #a1a1a1;
 
- 			}
 
- 			
 
- 			.mui-control-content {
 
- 				margin-top: 70px;
 
- 			}
 
- 			
 
- 			.icon-all>span:first-child {
 
- 				min-width: 28px;
 
- 				min-height: 25px;
 
- 				background-size: 100%;
 
- 				position: absolute;
 
- 				top: 16px;
 
- 				left: 50%;
 
- 				-webkit-transform: translateX(-50%);
 
- 				transform: translateX(-50%);
 
- 			}
 
- 			
 
- 			.icon-all.mui-active>span:first-child {}
 
- 			
 
- 			.icon-noused>span:first-child {
 
- 				min-width: 25px;
 
- 				min-height: 25px;
 
- 				background-size: 100%;
 
- 				position: absolute;
 
- 				top: 16px;
 
- 				left: 50%;
 
- 				-webkit-transform: translateX(-50%);
 
- 				transform: translateX(-50%);
 
- 			}
 
- 			
 
- 			.icon-noused.mui-active>span:first-child {}
 
- 			
 
- 			.icon-used>span:first-child {
 
- 				min-width: 25px;
 
- 				min-height: 25px;
 
- 				background-size: 100%;
 
- 				position: absolute;
 
- 				top: 16px;
 
- 				left: 50%;
 
- 				-webkit-transform: translateX(-50%);
 
- 				transform: translateX(-50%);
 
- 			}
 
- 			
 
- 			.icon-used.mui-active>span:first-child {}
 
- 			
 
- 			.icon-overdue>span:first-child {
 
- 				min-width: 25px;
 
- 				min-height: 25px;
 
- 				background-size: 100%;
 
- 				position: absolute;
 
- 				top: 16px;
 
- 				left: 50%;
 
- 				-webkit-transform: translateX(-50%);
 
- 				transform: translateX(-50%);
 
- 			}
 
- 			
 
- 			.icon-overdue.mui-active>span:first-child {}
 
- 			
 
- 			.mui-scroll-wrapper {
 
- 				padding-top: 10px;
 
- 				bottom: 100px;
 
- 			}
 
- 			
 
- 			.middle-center {
 
- 				display: table-cell;
 
- 				text-align: center;
 
- 				vertical-align: middle;
 
- 				color: #fff;
 
- 			}
 
- 			
 
- 			.right-bottom {
 
- 				position: absolute;
 
- 				right: 15px;
 
- 				bottom: 15px;
 
- 				color: #fff;
 
- 			}
 
- 			
 
- 			.coupon-href {
 
- 				text-align: center;
 
- 				width: 120px;
 
- 				margin: 0 auto;
 
- 				position: fixed;
 
- 				bottom: 80px;
 
- 				left: 50%;
 
- 				margin-left: -60px;
 
- 				text-decoration: underline;
 
- 				font-size: 12px;
 
- 				color: #666;
 
- 			}
 
- 			
 
- 			.see-details {
 
- 				color: #63ccde;
 
- 				margin-left: 20px;
 
- 			}
 
- 		</style>
 
- 		<script type="text/javascript">
 
- 			// 屏蔽分享
 
- 			window.hiddenAllWechatMenu = true;
 
- 		</script>
 
- 	</head>
 
- 	<body style="background: #fff;">
 
- 		<div class="loading-bg">
 
- 			<div class="mui-loading">
 
- 				<div class="mui-spinner">
 
- 				</div>
 
- 				  加载中...
 
- 			</div>
 
- 		</div>
 
- 		<nav class="mui-bar mui-bar-tab" id="footer-bar">
 
- 			<a class="mui-tab-item  ">
 
- 				<div class="iconfont">
 
- 					<svg class="icon" aria-hidden="true">
 
- 					  <use xlink:href="#icon-kang-hui"></use>
 
- 					</svg>
 
- 				</div>
 
- 				<span class="mui-tab-label">首页</span>
 
- 			</a>
 
- 			<a class="mui-tab-item go_gwc">
 
- 				<div class="iconfont icon-gouwuche-num">
 
- 					<svg class="icon" aria-hidden="true">
 
- 					  <use xlink:href="#icon-ji-hui"></use>
 
- 					</svg>
 
- 					<span class="mui-badge">0</span>
 
- 				</div>
 
- 				<span class="mui-tab-label">购物车</span>
 
- 			</a>
 
- 			<a class="mui-tab-item ">
 
- 				<div class="iconfont">
 
- 					<svg class="icon" aria-hidden="true">
 
- 					  <use xlink:href="#icon-yi-hui"></use>
 
- 					</svg>
 
- 				</div>
 
- 				<span class="mui-tab-label">订单</span>
 
- 			</a>
 
- 			<a class="mui-tab-item mui-active-select">
 
- 				<div class="iconfont">
 
- 					<svg class="icon" aria-hidden="true">
 
- 					  <use xlink:href="#icon-W-qing"></use>
 
- 					</svg>
 
- 				</div>
 
- 				<span class="mui-tab-label">我的</span>
 
- 			</a>
 
- 		</nav>
 
- 		<div class="mui-content">
 
- 			<div id="pullrefresh_yhq_list" class="mui-content mui-scroll-wrapper" style="background: #fff;">
 
- 				
 
- 				<div class="mui-scroll">
 
- 					<ul class="my-yhq-list">
 
- 						
 
- 						<!-- <li class="my-yhq-cell">
 
- 							<img width="100%" src="images/yhq_used_bg.png" />
 
- 							<div class="fixed-box">
 
- 								<div class="table go_web_link" url="#">
 
- 									<div class="left-cell">
 
- 										<span class="tit">滤芯兑换券</span>
 
- 										<p class="time">与其他产品下单时方可可用</p>
 
- 										<span class="condition">有效期至2019-11-24</span>
 
- 									</div>
 
- 									<div class="right-cell">
 
- 										<div class="money">
 
- 											<span>T1/T2</span>
 
- 										</div>
 
- 									</div>
 
- 								</div>
 
- 							</div>
 
- 						</li>
 
- 						<li class="my-yhq-cell">
 
- 							<img width="100%" src="images/yhq_noused_bg.png" />
 
- 							<div class="fixed-box">
 
- 								<div class="table go_web_link" url="#">
 
- 									<div class="left-cell">
 
- 										<span class="tit">优惠券</span>
 
- 										<p class="time">满500元可使用</p>
 
- 										<span class="condition">有效期至2019-11-24</span>
 
- 									</div>
 
- 									<div class="right-cell">
 
- 										<div class="money">
 
- 											<span>¥500</span>
 
- 										</div>
 
- 									</div>
 
- 								</div>
 
- 							</div>
 
- 						</li>
 
- 						<li class="my-yhq-cell">
 
- 							<img width="100%" src="images/yhq_used_bg.png" />
 
- 							<div class="fixed-box">
 
- 								<div class="table go_web_link" url="#">
 
- 									<div class="left-cell">
 
- 										<span class="tit">用户关注券</span>
 
- 										<p class="time">仅部分产品可用<u class="see-details">查看详情</u></p>
 
- 										<span class="condition">有效期至2019-11-24</span>
 
- 									</div>
 
- 									<div class="right-cell">
 
- 										<div class="money">
 
- 											<span>¥500</span>
 
- 										</div>
 
- 									</div>
 
- 								</div>
 
- 							</div>
 
- 						</li> -->
 
- 						
 
- 					</ul>
 
- 				</div>
 
- 			</div>
 
- 		</div>
 
- 		<script type="text/javascript" src="js/mui.min.js"></script>
 
- 		<script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
 
- 		<script type="text/javascript" src="js/main.js"></script>
 
- 		<script src="js/iconfont.js"></script>
 
- 		<script>
 
- 			var tabindex = 0,
 
- 				pageNumber = 0,
 
- 				pagesize = 10;
 
- 			mui.init({
 
- 				pullRefresh: {
 
- 					container: '#pullrefresh_yhq_list',
 
- 					down: {
 
- 						//callback: pulldownRefresh
 
- 					},
 
- 					up: {
 
- 						contentrefresh: '正在加载...',
 
- 						contentnomore: '没有更多数据了!',
 
- 						callback: pullupRefresh
 
- 					}
 
- 				}
 
- 			});
 
- 			/**
 
- 			 * 上拉加载具体业务实现
 
- 			 */
 
- 			function pullupRefresh() {
 
- 				++pageNumber;
 
- 				var btnArray = ['否', '是'];
 
- 				var src = '';
 
- 				if(tabindex == 1) {
 
- 					src = base_path + '/coupon/couponItemList?useStatus=1';
 
- 				} else {
 
- 					src = base_path + '/coupon/couponItemList?useStatus=2';
 
- 				}
 
- 				$.ajax(src, {
 
- 					data: {},
 
- 					dataType: 'json',
 
- 					type: 'post',
 
- 					timeout: 15000,
 
- 					xhrFields: {
 
- 						withCredentials: true
 
- 					},
 
- 					crossDomain: true,
 
- 					success: function(dt) {
 
- 						if(dt.isRedirect) {
 
- 							location.href = dt.redirectURL;
 
- 						} else {
 
- 							if(dt.status) {
 
- 								var table = document.body.querySelector('.my-yhq-list');
 
- 								
 
- 								if(pageNumber == 1 && tabindex == 2){
 
- 									var li = document.createElement('li');
 
- 									li.className = 'my-yhq-cell';
 
- 									li.innerHTML = '<img width="100%" src="images/yhq_used_bg.png" />'+
 
- 										'<div class="fixed-box">'+
 
- 										'	<div class="table go_web_link" url="#">'+
 
- 										'		<div class="left-cell">'+
 
- 										'		<span class="tit">滤芯套装优惠</span>'+
 
- 										'		<p class="time">会员购买滤芯套装优惠100元</p>'+
 
- 										'		<span class="condition"></span>'+
 
- 										'	</div>'+
 
- 										'	<div class="right-cell">'+
 
- 										'		<div class="money">'+
 
- 										'			<span></span>'+
 
- 										'		</div>'+
 
- 										'	</div>'+
 
- 										'</div>';
 
- 									table.appendChild(li);
 
- 								}
 
- 								
 
- 								
 
- 								mui(dt.data.itemList).each(function(index) {
 
- 									var li = document.createElement('li');
 
- 									var re_moeny = '';
 
- 									if(this.couponType == 1){
 
- 										re_moeny = accDiv(this.couponReduce, 100)+'元'
 
- 									}else if(this.couponType == 2){
 
- 										re_moeny =  "-" + (100 - this.couponReduce) + "%"
 
- 									}else if(this.couponType == 3){
 
- 										re_moeny =  "T1/T2"
 
- 									}
 
- 									
 
- 									li.className = 'my-yhq-cell';
 
- 									li.innerHTML = '<img width="100%" src="images/yhq_used_bg.png" />'+
 
- 										'<div class="fixed-box">'+
 
- 										'	<div class="table go_web_link" url="#">'+
 
- 										'		<div class="left-cell">'+
 
- 										'		<span class="tit">'+ this.couponName +'</span>'+
 
- 										'		<p class="time">'+ cufte(this.couponItemRemark) +'</p>'+
 
- 										'		<span class="condition">有效期至'+ this.couponUseEndDate +'</span>'+
 
- 										'	</div>'+
 
- 										'	<div class="right-cell">'+
 
- 										'		<div class="money">'+
 
- 										'			<span>'+ re_moeny +'</span>'+
 
- 										'		</div>'+
 
- 										'	</div>'+
 
- 										'</div>';
 
- 									table.appendChild(li);
 
- 								})
 
- 								
 
- 								if(pageNumber == 1 && tabindex == 1 && dt.data.itemList.length == 0 ){
 
- 									mui('#pullrefresh_yhq_list').pullRefresh().disablePullupToRefresh();
 
- 									var li = document.createElement('li');
 
- 									li.className = 'my-yhq-cell';
 
- 									li.innerHTML = '<img style="width:100px;display:block;margin:60px auto 20px auto;" src="images/null-3.png" /><h6 class="mui-text-center">暂无任何优惠券哟!</h6>';
 
- 									table.appendChild(li);
 
- 								}
 
- 								
 
- 								mui('#pullrefresh_yhq_list').pullRefresh().disablePullupToRefresh();
 
- 							} else {
 
- 								mui.confirm(dt.message + '是否重新加载页面?', '提示', btnArray, function(e) {
 
- 									if(e.index == 1) {}
 
- 								})
 
- 							}
 
- 						}
 
- 					},
 
- 					error: function(xhr, type, errorThrown) {
 
- 						console.log(xhr)
 
- 					}
 
- 				})
 
- 			}
 
- 			mui.ready(function() {
 
- 				tabindex = getParam("type");
 
- 				
 
- 				if(tabindex == 2){
 
- 					document.title = '会员专享';
 
- 				}
 
- 				
 
- 				mui('#pullrefresh_yhq_list').pullRefresh().pullupLoading();
 
- 				console.log("页面加载完毕")
 
- 				document.querySelector('.loading-bg').style.display = 'none';
 
- 			});
 
- 			$(document).on('tap', '.coupon-href', function() {
 
- 				location.href = 'coupon_dec.html';
 
- 			});
 
- 			$(document).on('tap', '.go_web_link', function() {
 
- 				location.href = $(this).attr("url");
 
- 			});
 
- 		</script>
 
- 	</body>
 
- </html>
 
 
  |