Authored by 梁志锋

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

framework @ 75bbc3b0
1 -Subproject commit e9d066dd88a8e7e37103021c427a205a5cfcdcec 1 +Subproject commit 75bbc3b075de19f239532f60c5995d06c5f814e2
@@ -10,8 +10,6 @@ var $footer = $('#yoho-footer'), @@ -10,8 +10,6 @@ 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 -  
15 function cookie(name) { 13 function cookie(name) {
16 var cookies = document.cookie, 14 var cookies = document.cookie,
17 cookieVal, 15 cookieVal,
@@ -134,6 +132,8 @@ function reMarginFooter(fixedElement) { @@ -134,6 +132,8 @@ function reMarginFooter(fixedElement) {
134 132
135 var user = getUser(); 133 var user = getUser();
136 134
  135 + var backToTopHammer;
  136 +
137 rePosFooter(); //计算底部位置 137 rePosFooter(); //计算底部位置
138 138
139 if (user === 0) { 139 if (user === 0) {
@@ -154,15 +154,11 @@ function reMarginFooter(fixedElement) { @@ -154,15 +154,11 @@ function reMarginFooter(fixedElement) {
154 ); 154 );
155 } 155 }
156 156
157 - $op.find('.back-to-top').on('touchend', function() {  
158 - $(window).scrollTop(0);  
159 - return false;  
160 - });  
161 -  
162 if ($op.find('.back-to-top').length > 0) { 157 if ($op.find('.back-to-top').length > 0) {
163 - backToTopHammer = new Hammer(document.getElementsByClassName('back-to-top')[0]); 158 + backToTopHammer = new Hammer($op.find('.back-to-top')[0]);
164 backToTopHammer.on('tap', function(e) { 159 backToTopHammer.on('tap', function(e) {
165 $(window).scrollTop(0); 160 $(window).scrollTop(0);
  161 + e.srcEvent.preventDefault();
166 return false; 162 return false;
167 }); 163 });
168 } 164 }
@@ -15,7 +15,7 @@ function downLoadApp() { @@ -15,7 +15,7 @@ function downLoadApp() {
15 var appUrl = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&g_f=995445'; 15 var appUrl = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&g_f=995445';
16 var clickedAt = new Date(); 16 var clickedAt = new Date();
17 17
18 - setTimeout(function () { 18 + setTimeout(function() {
19 if ((new Date()) - clickedAt < 2000) { 19 if ((new Date()) - clickedAt < 2000) {
20 window.location = appUrl; 20 window.location = appUrl;
21 } 21 }