Authored by 毕凯

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

@@ -10,6 +10,8 @@ var $footer = $('#yoho-footer'), @@ -10,6 +10,8 @@ var $footer = $('#yoho-footer'),
10 $yohoPage = $('.yoho-page'), 10 $yohoPage = $('.yoho-page'),
11 $header = $('.yoho-header'); 11 $header = $('.yoho-header');
12 12
  13 +var backToTopHammer;
  14 +
13 function cookie(name) { 15 function cookie(name) {
14 var cookies = document.cookie, 16 var cookies = document.cookie,
15 cookieVal, 17 cookieVal,
@@ -158,6 +160,15 @@ function reMarginFooter(fixedElement) { @@ -158,6 +160,15 @@ function reMarginFooter(fixedElement) {
158 e.srcEvent.preventDefault(); 160 e.srcEvent.preventDefault();
159 return false; 161 return false;
160 }); 162 });
  163 +
  164 + if ($op.find('.back-to-top').length > 0) {
  165 + backToTopHammer = new Hammer(document.getElementsByClassName('back-to-top')[0]);
  166 + backToTopHammer.on('tap', function(e) {
  167 + $(window).scrollTop(0);
  168 + return false;
  169 + });
  170 + }
  171 +
161 $footer.removeClass('hide'); 172 $footer.removeClass('hide');
162 }()); 173 }());
163 174
@@ -20,12 +20,12 @@ @@ -20,12 +20,12 @@
20 {{#if cartNav}} 20 {{#if cartNav}}
21 <ul class="cart-nav clearfix"> 21 <ul class="cart-nav clearfix">
22 <li class="active"> 22 <li class="active">
23 - <span> 23 + <span id="common-cart-nav">
24 普通商品({{commonGoodsCount}}) 24 普通商品({{commonGoodsCount}})
25 </span> 25 </span>
26 </li> 26 </li>
27 <li> 27 <li>
28 - <span> 28 + <span id="presell-cart-nav">
29 预售商品({{presellGoodsCount}}) 29 预售商品({{presellGoodsCount}})
30 </span> 30 </span>
31 <div id="presell-tip" class="presell-tip"> 31 <div id="presell-tip" class="presell-tip">