Authored by xuqi

cart good structure

@@ -846,7 +846,16 @@ @@ -846,7 +846,16 @@
846 846
847 { 847 {
848 id: 1, 848 id: 1,
  849 + inValid: true, //是否是失效商品,
  850 +
  851 + showCheckbox: true, //是否显示checkbox【赠品和加价购不显示】
  852 + checked: true, //是否选中
  853 +
849 thumb: '', 854 thumb: '',
  855 +
  856 + isAdvanceBuy: true, //是否是加价购商品
  857 + isGift: ture, //是否是赠品
  858 +
850 name: '', 859 name: '',
851 color: '黄色', 860 color: '黄色',
852 size: 'L', 861 size: 'L',
1 -<div class="shopping-cart-good clearfix" data-id={{id}}>  
2 - {{#if isSoldOut}} 1 +<div class="shopping-cart-good clearfix" data-id="{{id}}">
  2 + {{#if inValid}}
3 <span class="few-tag-expire">失效</span> 3 <span class="few-tag-expire">失效</span>
4 - {{^}}  
5 - {{#if isSelected}}  
6 - <span class="checkbox icon-cb-checked iconfont"></span>  
7 - {{^}}  
8 - <span class="checkbox icon-checkbox iconfont"></span>  
9 {{/if}} 4 {{/if}}
  5 +
  6 + {{#if showCheckbox}}
  7 + <span class="checkbox{{#if checked}} icon-cb-checked{{^}} icon-checkbox{{/if}}iconfont"></span>
10 {{/if}} 8 {{/if}}
11 9
12 <div class="info"> 10 <div class="info">
13 - <img class="thumb lazy" data-original={{thumb}}> 11 + <img class="thumb lazy" data-original="{{thumb}}">
14 {{#if isAdvanceBuy}} 12 {{#if isAdvanceBuy}}
15 <p class="few-tag plus-tag">加价购</p> 13 <p class="few-tag plus-tag">加价购</p>
16 - {{^}} 14 + {{/if}}
17 {{#if isGift}} 15 {{#if isGift}}
18 <p class="few-tag gift-tag">赠品</p> 16 <p class="few-tag gift-tag">赠品</p>
19 {{/if}} 17 {{/if}}
20 - {{/if}}  
21 - </a>  
22 18
23 <div class="deps show"> 19 <div class="deps show">
24 <p class="name row">{{name}}</p> 20 <p class="name row">{{name}}</p>
@@ -67,15 +63,5 @@ @@ -67,15 +63,5 @@
67 </p> 63 </p>
68 {{/if}} 64 {{/if}}
69 </div> 65 </div>
70 - <div class="calculate-num hide">  
71 - <div class="calculate">  
72 - <p><i class="iconfont cut">&#xe625;</i><span>{{count}}</span><i class="iconfont add">&#xe624;</i></p>  
73 - <p><span>颜色:{{color}}尺码:{{size}}{{name}}</span><i class="iconfont down">&#xe616;</i></p>  
74 - </div>  
75 - <p><span class="price"> ¥{{price}}</span></p>  
76 - <span class="count">  
77 - ×{{count}}  
78 - </span>  
79 - </div>  
80 </div> 66 </div>
81 </div> 67 </div>