Authored by 黄涛

add small

1 -<div class="coupon-list"> 1 +<div class="small-coupon-list">
2 <ul> 2 <ul>
3 {{#each coupon}} 3 {{#each coupon}}
4 4
5 {{#if @first}} 5 {{#if @first}}
6 <li> 6 <li>
7 - <a class="left">券:</a> 7 + <a class="left small-pre">&nbsp;&nbsp;&nbsp;&nbsp;券:</a>
8 </li> 8 </li>
9 {{/if}} 9 {{/if}}
10 10
11 {{!大于三条记录}} 11 {{!大于三条记录}}
12 {{#if_cond @index '==' 3}} 12 {{#if_cond @index '==' 3}}
13 <li> 13 <li>
14 - <a class="left more-coupon more-desc">更多</a> 14 + <a class="left more-coupon small-suf">更多</a>
15 </li> 15 </li>
16 {{/if_cond}} 16 {{/if_cond}}
17 17
18 {{!大于三条记录不显示}} 18 {{!大于三条记录不显示}}
19 - <li class="{{#if_cond @index '>=' 3}}hide{{/if_cond}}">  
20 - <div class="small" 19 + <li class="{{#if_cond @index '<' 3}}more-coupon{{/if_cond}} {{#if_cond @index '>=' 3}}hide{{/if_cond}}">
  20 + <div class="small coupon-item"
21 data-id="{{couponId}}" 21 data-id="{{couponId}}"
22 data-name="{{couponName}}" 22 data-name="{{couponName}}"
23 data-amount="{{amount}}" 23 data-amount="{{amount}}"
@@ -60,6 +60,23 @@ bindEvent.add(function() { @@ -60,6 +60,23 @@ bindEvent.add(function() {
60 60
61 var Alert = require('../common/dialog').Alert; 61 var Alert = require('../common/dialog').Alert;
62 62
  63 + var $moreCoupon = $('.more-coupon');
  64 +
  65 + var $coupons = $('.coupon-item').map(function() {
  66 + var $this = $(this);
  67 +
  68 + return {
  69 + id: $this.data('id'),
  70 + name: $this.data('name'),
  71 + amount: $this.data('amount'),
  72 + status: $this.data('status')
  73 + };
  74 + }).get();
  75 +
  76 + $moreCoupon.on('click', function() {
  77 +
  78 + });
  79 +
63 function imgShow(src) { 80 function imgShow(src) {
64 $imgShow.attr('src', src); 81 $imgShow.attr('src', src);
65 } 82 }
@@ -229,14 +229,38 @@ @@ -229,14 +229,38 @@
229 } 229 }
230 } 230 }
231 231
232 - .coupon-list { 232 + .small-coupon-list {
  233 +
  234 + height: 18px;
  235 + margin-top: 10px;
  236 +
  237 + .small-pre {
  238 + line-height: 18px;
  239 + font-size: 12px;
  240 + color: #999;
  241 + }
  242 +
  243 + .small-suf {
  244 + line-height: 18px;
  245 + font-size: 12px;
  246 + color: red;
  247 + }
  248 +
  249 + .small-desc {
  250 + line-height: 18px;
  251 + font-size: 12px;
  252 + color: white;
  253 + margin-left: 8px;
  254 + cursor: pointer;
  255 + }
  256 +
233 .small { 257 .small {
234 float: left; 258 float: left;
235 color: white !important; 259 color: white !important;
236 width: 86px; 260 width: 86px;
237 height: 18px; 261 height: 18px;
238 - font-size: 12px;  
239 background: resolve("product/coupon-small.png") no-repeat; 262 background: resolve("product/coupon-small.png") no-repeat;
  263 + margin-right: 20px;
240 } 264 }
241 } 265 }
242 266