Authored by yyq

del use less

<div class="type-list clearfix">
<label class="type-item active">全部优惠券</label>
<label class="type-item type-100" data-type="100">店铺券</label>
<label class="type-item type-200" data-type="200">活动券</label>
<label class="type-item type-300" data-type="300">运费券</label>
</div>
<div class="head-msg fw300">{{{headMsg}}}</div>
<div class="list-content">
{{#each usableCoupon}}
... ...
... ... @@ -748,24 +748,6 @@ coupon = {
that.$couponUsableWrap.addClass('hide');
that.$couponUnusableWrap.removeClass('hide');
}
}).on('click', '.type-item', function() {
var $this = $(this);
if ($this.hasClass('active')) {
return;
}
$this.siblings('.active').removeClass('active');
$this.addClass('active');
that.chooseType = $this.data('type');
if (that.chooseType) {
$('.type-content', this.$couponWrap).hide();
$('.type-content.list-' + that.chooseType, this.$couponWrap).show();
} else {
$('.type-content', this.$couponWrap).show();
}
}).on('keyup', '.coupon-code', function() {
var val = $.trim($(this).val());
... ...
... ... @@ -1053,48 +1053,9 @@
padding: 20px;
position: relative;
.type-list {
width: 100%;
padding: 10px 0;
position: absolute;
left: 0;
top: -1px;
background: #fff;
border-bottom: 1px solid #e0e0e0;
> label {
float: left;
min-width: 90px;
height: 30px;
line-height: 30px;
color: #444;
font-size: 12px;
text-align: center;
padding: 0 10px;
box-sizing: border-box;
border: 1px solid #e0e0e0;
margin-left: 40px;
cursor: pointer;
}
> label:first-child {
margin-left: 20px;
}
.active {
color: #fff;
background: #444;
border-color: #444;
}
}
.type-list + .head-msg {
margin-top: 50px;
}
.list-content {
width: 100%;
height: 400px;
height: 450px;
padding-top: 20px;
padding-bottom: 5px;
background: #f5f5f5;
... ...