Authored by hf

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

@@ -14,6 +14,7 @@ var chosePanel = require('./chose-panel'), @@ -14,6 +14,7 @@ var chosePanel = require('./chose-panel'),
14 14
15 var $cartContent = $('.cart-content'), 15 var $cartContent = $('.cart-content'),
16 cartType = $('#cartType').val(), 16 cartType = $('#cartType').val(),
  17 + $cartNav = $('.cart-nav'),
17 hasShowCartPresellTip = false; 18 hasShowCartPresellTip = false;
18 19
19 var navHammer, 20 var navHammer,
@@ -105,7 +106,7 @@ if ('advance' === cartType) { @@ -105,7 +106,7 @@ if ('advance' === cartType) {
105 $(window).trigger('scroll'); 106 $(window).trigger('scroll');
106 } 107 }
107 108
108 -if ($('.cart-nav').length > 0) { 109 +if ($cartNav.length > 0) {
109 navHammer = new Hammer(document.getElementsByClassName('cart-nav')[0]); 110 navHammer = new Hammer(document.getElementsByClassName('cart-nav')[0]);
110 navHammer.on('tap', function(e) { 111 navHammer.on('tap', function(e) {
111 var $this = $(e.target).closest('li'); 112 var $this = $(e.target).closest('li');
@@ -180,16 +181,11 @@ $('.chose').on('touchend', function() { @@ -180,16 +181,11 @@ $('.chose').on('touchend', function() {
180 chosePanel.show(); 181 chosePanel.show();
181 }); 182 });
182 183
183 -function notAllowScroll() {  
184 - var docH = $(document).height(),  
185 - winH = $(window).height();  
186 -  
187 - if (docH - winH <= 10) {  
188 - $('body').css('overflow', 'hidden');  
189 - }  
190 -}  
191 -  
192 -notAllowScroll(); 184 +$cartNav.on('touchstart', 'li', function(e) {
  185 + $(this).addClass('bytouch');
  186 +}).on('touchend touchcancel', function() {
  187 + $cartNav.find('li').removeClass('bytouch');
  188 +});
193 189
194 //提前触发lazyload 190 //提前触发lazyload
195 $(window).scrollTop(1).scrollTop(0); 191 $(window).scrollTop(1).scrollTop(0);
@@ -15,6 +15,11 @@ @@ -15,6 +15,11 @@
15 15
16 .cart-content > * { 16 .cart-content > * {
17 background: #fff; 17 background: #fff;
  18 +
  19 + &:first-child {
  20 + border-top: none;
  21 + margin-top: 0;
  22 + }
18 } 23 }
19 24
20 .cart-nav { 25 .cart-nav {
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 padding: pxToRem(30px) 0 pxToRem(20px); 16 padding: pxToRem(30px) 0 pxToRem(20px);
17 width: 100%; 17 width: 100%;
18 height: pxToRem(252px); 18 height: pxToRem(252px);
19 - overflow: hidden; 19 + // overflow: hidden;
20 20
21 .swiper-slide { 21 .swiper-slide {
22 padding: 0 pxToRem(10px); 22 padding: 0 pxToRem(10px);
1 -<div class="cart-goods">  
2 - {{# goods}}  
3 - {{> cart/good}}  
4 - {{/ goods}}  
5 -</div> 1 +{{#if goods}}
  2 + <div class="cart-goods">
  3 + {{# goods}}
  4 + {{> cart/good}}
  5 + {{/ goods}}
  6 + </div>
  7 +{{/if}}
6 8
7 {{#if notValidGoods}} 9 {{#if notValidGoods}}
8 <div class="invalid-goods"> 10 <div class="invalid-goods">