Authored by 毕凯

返回顶部 触发修改

framework @ 75bbc3b0
Subproject commit e9d066dd88a8e7e37103021c427a205a5cfcdcec
Subproject commit 75bbc3b075de19f239532f60c5995d06c5f814e2
... ...
... ... @@ -3,7 +3,8 @@
* @author: xuqi<qi.xu@yoho.cn>
* @date: 2015/10/21
*/
var $ = require('jquery');
var $ = require('jquery'),
Hammer = require('yoho.hammer');
var $footer = $('#yoho-footer'),
$yohoPage = $('.yoho-page'),
... ... @@ -129,7 +130,8 @@ function reMarginFooter(fixedElement) {
(function() {
var $op = $footer.children('.op-row');
var user = getUser();
var user = getUser(),
goTopHammer;
rePosFooter(); //计算底部位置
... ... @@ -150,9 +152,10 @@ function reMarginFooter(fixedElement) {
'<a href="http://m.yohobuy.com/passport/signout/index?token=' + user[3] + '">退出</a>'
);
}
$op.find('.back-to-top').on('touchend', function() {
goTopHammer = new Hammer($op.find('.back-to-top')[0]);
goTopHammer.on('tap', function(e) {
$(window).scrollTop(0);
e.srcEvent.preventDefault();
return false;
});
$footer.removeClass('hide');
... ...
... ... @@ -15,7 +15,7 @@ function downLoadApp() {
var appUrl = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&g_f=995445';
var clickedAt = new Date();
setTimeout(function () {
setTimeout(function() {
if ((new Date()) - clickedAt < 2000) {
window.location = appUrl;
}
... ...