Authored by biao

Merge branch 'feature/cart' of http://git.dev.yoho.cn/web/yohobuy into fix/cart

@@ -79,22 +79,18 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { @@ -79,22 +79,18 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
79 }); 79 });
80 }).on('touchstart', '.icon-edit', function() { 80 }).on('touchstart', '.icon-edit', function() {
81 81
82 - //var $this = $(this);  
83 - //  
84 - //var $cartgood = $this.closest('.shopping-cart-good');  
85 - //  
86 - ////var id = $this.closest('.shopping-cart-good').data('id');  
87 - //  
88 - //var $viewGood = $cartgood.find('.deps');  
89 - // $editGoot = $cartgood.find('.calculate-num');  
90 - //  
91 - //if ($viewGood.hasClass('show')) {  
92 - // $viewGood.removeClass('show').addClass('hide');  
93 - // $editGoot.removeClass('hide').addClass('show');  
94 - //} else {  
95 - // $viewGood.removeClass('hide').addClass('show');  
96 - // $editGoot.removeClass('show').addClass('hide');  
97 - //} 82 + var $this = $(this),
  83 + $cartgood = $this.closest('.shopping-cart-good'),
  84 + $viewGood = $cartgood.find('.deps'),
  85 + $editGoot = $cartgood.find('.calculate-num');
  86 +
  87 + if ($viewGood.hasClass('show')) {
  88 + $viewGood.removeClass('show').addClass('hide');
  89 + $editGoot.removeClass('hide').addClass('show');
  90 + } else {
  91 + $viewGood.removeClass('hide').addClass('show');
  92 + $editGoot.removeClass('show').addClass('hide');
  93 + }
98 94
99 95
100 }).on('touchstart', '.icon-del', function(e) { 96 }).on('touchstart', '.icon-del', function(e) {
1 <div class="shopping-cart-good clearfix" data-id={{id}}> 1 <div class="shopping-cart-good clearfix" data-id={{id}}>
2 <span class="checkbox icon-cb-checked iconfont"></span> 2 <span class="checkbox icon-cb-checked iconfont"></span>
  3 + <!-- {{#if isSoldOut}}
  4 +<p class="">失效</p>
  5 + {{^}}
  6 + {{#if isGift}}
  7 + {{^}}
  8 +<span class="checkbox icon-cb-checked iconfont"></span>
  9 + {{/if}}
  10 +
  11 + {{/if}}-->
3 <div class="info"> 12 <div class="info">
4 <img class="thumb lazy" data-original={{thumb}}> 13 <img class="thumb lazy" data-original={{thumb}}>
  14 + <!--
  15 + <a class="" href="{{url}}">
  16 + <img class="thumb lazy" data-original="{{thumb}}">
  17 + </a>
  18 + {{#if isAdvanceBuy}}
  19 + <p class="few-tag">加价购</p>
  20 + {{^}}
  21 + {{#if isGift}}
  22 + <p class="few-tag">赠品</p>
  23 + {{/if}}
  24 + {{/if}}
  25 + {{#if isSoldOut}}
  26 + <p class="few-tag">失效</p>
  27 + {{/if}}
  28 +
  29 + -->
5 30
6 <div class="deps show"> 31 <div class="deps show">
7 <p class="name row">{{name}}</p> 32 <p class="name row">{{name}}</p>