Authored by 郭成尧

del-old-code

<div class="yoho-page select-coupon-page my-coupon-page">
<div class="coupon-page-title">
<form id="new-coupon" class="new-coupon clearfix" method="POST" action="">
<input type="text" name="couponCode" value="" placeholder="输入优惠券码">
<button type="submit" class="submit">兑换</button>
</form>
<div class="coupon-use-manual">
说明:优惠券码需先兑换成优惠券后再使用,普通优惠券可以和运费券叠加使用。
</div>
<div class="coupon-tab">
<ul class="tab-navs" data-sticky>
<li class="tab-nav pull-left active">
<span data-target="#couponAvailable" data-trigger="tab" data-funCouponAvailable>可用优惠券</span>
</li>
<em class="pull-left">|</em>
<li class="tab-nav pull-left">
<span data-target="#couponUnavailable" data-trigger="tab" data-funCouponUnavailable>不可用优惠券</span>
</li>
</ul>
</div>
</div>
<div class="tab-panels coupon-wrap">
<div id="couponAvailable" class="coupon-list active"></div>
<div id="couponUnavailable" class="coupon-list"></div>
</div>
<div class="use-coupon-btn-group">
<button id="useCoupon" class="pull-left use">使用</button>
<button id="notUseCoupon" class="pull-right not-use">不使用</button>
</div>
</div>
<script id="tmplNoCoupon" type="text/tmpl">
<div class="null">
<i></i>
<p>没有可用优惠券!</p>
</div>
</script>
$couponRadius: 8px;
$rosyPink: #f06a6b;
$backgroudColor: #f2f2f2;
$fontColor: #444;
$fontGrayLight: #e0e0e0;
$fontSizeSmall: 16px;
@define-extend line {
content: "";
position: absolute;
top: 50%;
border-top: 1px solid $fontGrayLight;
width: 120px;
height: 0;
}
@define-extend page-padding {
padding-left: 30px;
padding-right: 30px;
}
.select-coupon-page {
background-color: $backgroudColor;
margin-top: 40px;
.coupon-page-title {
background-color: #fff;
}
.new-coupon {
@extend page-padding;
font-size: 24px;
input {
padding: 0 12px;
width: 400px;
height: 80px;
border: 1px solid #b0b0b0;
border-radius: 0.1rem;
outline: 0;
float: left;
}
.submit {
margin-left: 30px;
width: 130px;
height: 80px;
color: #fff;
background: #b0b0b0;
border-radius: 0.1rem;
border: none;
outline: 0;
float: left;
}
.active {
background: #444;
}
}
.coupon-wrap {
padding-bottom: 100px;
}
.coupon-use-manual {
@extend page-padding;
color: #b0b0b0;
font-size: $fontSizeSmall;
width: 100%;
margin-top: 30px;
}
.coupon-tab {
height: 60px;
line-height: 60px;
margin-top: 30px;
border-top: 1px solid $fontGrayLight;
li {
width: 315px;
text-align: center;
color: $fontGrayLight;
&.active {
color: $fontColor;
}
}
em {
color: $fontGrayLight;
width: 10px;
}
}
.coupon-list {
display: none;
.coupon {
border-radius: $couponRadius;
background-color: #fff;
margin: 30px;
height: 200px;
.coupon-title {
border-top-left-radius: $couponRadius;
border-top-right-radius: $couponRadius;
background-color: $rosyPink;
color: $backgroudColor;
font-size: 24px;
padding: 10px;
}
.coupon-content {
border-top: 4px dotted $rosyPink;
margin-top: -2px;
padding: 20px;
.content-left {
width: 120px;
height: 100px;
border-right: 2px solid $fontColor;
}
.content-left > .value {
width: 100%;
height: 76px;
text-align: center;
font-size: 52px;
line-height: 100px;
color: $fontColor;
}
.content-middle {
width: 360px;
margin-left: 20px;
}
.content-right {
width: 40px;
padding-top: 36px;
}
.content-right > .checkbox {
font-size: 28px;
color: $fontColor;
}
}
}
.not-available {
.coupon-title {
background-color: $fontGrayLight;
}
.coupon-content {
border-top: 4px dotted $fontGrayLight;
}
}
.usable-free {
.coupon-title {
background-color: $fontColor;
}
.coupon-content {
border-top: 4px dotted $fontColor;
}
}
}
.active {
display: block;
}
.use-coupon-btn-group {
@extend page-padding;
width: 100%;
position: fixed;
left: 0;
bottom: 0;
z-index: 2;
background-color: #fff;
padding-top: 20px;
padding-bottom: 20px;
button {
color: #fff;
width: 270px;
height: 70px;
border-radius: $couponRadius;
&.use {
background-color: $fontColor;
}
&.not-use {
background-color: $fontGrayLight;
}
}
}
.disable {
display: none;
}
.null {
position: absolute;
left: 50%;
transform: translateX(-50%);
i {
width: 100%;
height: 120px;
overflow: hidden;
display: block;
background: resolve("home/employ/not.png") center top no-repeat;
background-size: 100%;
}
}
}