Authored by 梁志锋

购物车功能

@@ -78,6 +78,23 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { @@ -78,6 +78,23 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
78 tip.show('网络错误'); 78 tip.show('网络错误');
79 }); 79 });
80 }).on('touchstart', '.icon-edit', function() { 80 }).on('touchstart', '.icon-edit', function() {
  81 + //var $this = $(this);
  82 + //
  83 + //var $cartgood = $this.closest('.shopping-cart-good');
  84 + //
  85 + ////var id = $this.closest('.shopping-cart-good').data('id');
  86 + //
  87 + //var $viewGood = $cartgood.find('.deps');
  88 + // $editGoot = $cartgood.find('.calculate-num');
  89 + //
  90 + //if ($viewGood.hasClass('show')) {
  91 + // $viewGood.removeClass('show').addClass('hide');
  92 + // $editGoot.removeClass('hide').addClass('show');
  93 + //} else {
  94 + // $viewGood.removeClass('hide').addClass('show');
  95 + // $editGoot.removeClass('show').addClass('hide');
  96 + //}
  97 +
81 98
82 }).on('touchstart', '.icon-del', function(e) { 99 }).on('touchstart', '.icon-del', function(e) {
83 var $this = $(this); 100 var $this = $(this);
@@ -151,7 +168,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() { @@ -151,7 +168,7 @@ $('.cart-goods').on('touchstart', '.checkbox', function() {
151 168
152 169
153 $('.btn-balance').on('touchend', function() { 170 $('.btn-balance').on('touchend', function() {
154 - window.location.href = '/shoppingCart/orderEnsure?cartType='; 171 + window.location.href = '/shoppingCart/orderEnsure?cartType='+'ordinary';
155 }); 172 });
156 173
157 $('.down').on('touchend', function() { 174 $('.down').on('touchend', function() {
@@ -199,25 +199,13 @@ @@ -199,25 +199,13 @@
199 font-size: 52em / $pxConvertRem; 199 font-size: 52em / $pxConvertRem;
200 font-weight: bold; 200 font-weight: bold;
201 } 201 }
202 - .count{ 202 + .count {
203 position: absolute; 203 position: absolute;
204 right: 20rem / $pxConvertRem;; 204 right: 20rem / $pxConvertRem;;
205 top: 20rem / $pxConvertRem;; 205 top: 20rem / $pxConvertRem;;
206 font-size: 52em / $pxConvertRem; 206 font-size: 52em / $pxConvertRem;
207 -  
208 - .good-detail-img {  
209 -  
210 - .few-tag {  
211 - position: absolute;  
212 - bottom: 0;  
213 - width: 100%;  
214 - height: 28rem / $pxConvertRem;  
215 - background: #ffac5b;  
216 - font-size: 18rem / $pxConvertRem;  
217 - color: #fff;  
218 - line-height: 28rem / $pxConvertRem;  
219 - text-align: center;  
220 } 207 }
  208 +
221 } 209 }
222 } 210 }
223 211
@@ -66,7 +66,6 @@ @@ -66,7 +66,6 @@
66 <a href="">随便逛逛</a> 66 <a href="">随便逛逛</a>
67 </div> 67 </div>
68 {{> product/recommend-for-you}} 68 {{> product/recommend-for-you}}
69 - {{> shopping-cart/chose-panel}}  
70 </div> 69 </div>
71 70
72 {{> shopping-cart/chose-panel}} 71 {{> shopping-cart/chose-panel}}
@@ -9,10 +9,6 @@ @@ -9,10 +9,6 @@
9 9
10 {{/if}} 10 {{/if}}
11 11
12 - <div class="info">  
13 - <img class="thumb lazy" data-original={{thumb}}>  
14 - <!-- <div class="deps">  
15 -  
16 <div class=""> 12 <div class="">
17 <a class="" href="{{url}}"> 13 <a class="" href="{{url}}">
18 <img class="thumb lazy" data-original="{{thumb}}"> 14 <img class="thumb lazy" data-original="{{thumb}}">
@@ -29,7 +25,7 @@ @@ -29,7 +25,7 @@
29 {{/if}} 25 {{/if}}
30 </div> 26 </div>
31 27
32 - <div class="deps"> 28 + <div class="deps show">
33 <p class="name row">{{name}}</p> 29 <p class="name row">{{name}}</p>
34 <p class="row"> 30 <p class="row">
35 {{#if color}} 31 {{#if color}}
@@ -76,8 +72,8 @@ @@ -76,8 +72,8 @@
76 </span> 72 </span>
77 {{/if}} 73 {{/if}}
78 </p> 74 </p>
79 - </div> -->  
80 - <div class="calculate-num"> 75 + </div>
  76 + <div class="calculate-num hide">
81 <div class="calculate"> 77 <div class="calculate">
82 <p><i class="iconfont cut">&#xe625;</i><span>{{count}}</span><i class="iconfont add">&#xe624;</i></p> 78 <p><i class="iconfont cut">&#xe625;</i><span>{{count}}</span><i class="iconfont add">&#xe624;</i></p>
83 <p><span>颜色:{{color}}尺码:{{size}}{{name}}</span><i class="iconfont down">&#xe616;</i></p> 79 <p><span>颜色:{{color}}尺码:{{size}}{{name}}</span><i class="iconfont down">&#xe616;</i></p>