Authored by 黄涛

add small

<div class="coupon-list">
<div class="small-coupon-list">
<ul>
{{#each coupon}}
{{#if @first}}
<li>
<a class="left">券:</a>
<a class="left small-pre">&nbsp;&nbsp;&nbsp;&nbsp;券:</a>
</li>
{{/if}}
{{!大于三条记录}}
{{#if_cond @index '==' 3}}
<li>
<a class="left more-coupon more-desc">更多</a>
<a class="left more-coupon small-suf">更多</a>
</li>
{{/if_cond}}
{{!大于三条记录不显示}}
<li class="{{#if_cond @index '>=' 3}}hide{{/if_cond}}">
<div class="small"
<li class="{{#if_cond @index '<' 3}}more-coupon{{/if_cond}} {{#if_cond @index '>=' 3}}hide{{/if_cond}}">
<div class="small coupon-item"
data-id="{{couponId}}"
data-name="{{couponName}}"
data-amount="{{amount}}"
... ...
... ... @@ -60,6 +60,23 @@ bindEvent.add(function() {
var Alert = require('../common/dialog').Alert;
var $moreCoupon = $('.more-coupon');
var $coupons = $('.coupon-item').map(function() {
var $this = $(this);
return {
id: $this.data('id'),
name: $this.data('name'),
amount: $this.data('amount'),
status: $this.data('status')
};
}).get();
$moreCoupon.on('click', function() {
});
function imgShow(src) {
$imgShow.attr('src', src);
}
... ...
... ... @@ -229,14 +229,38 @@
}
}
.coupon-list {
.small-coupon-list {
height: 18px;
margin-top: 10px;
.small-pre {
line-height: 18px;
font-size: 12px;
color: #999;
}
.small-suf {
line-height: 18px;
font-size: 12px;
color: red;
}
.small-desc {
line-height: 18px;
font-size: 12px;
color: white;
margin-left: 8px;
cursor: pointer;
}
.small {
float: left;
color: white !important;
width: 86px;
height: 18px;
font-size: 12px;
background: resolve("product/coupon-small.png") no-repeat;
margin-right: 20px;
}
}
... ...