Authored by 毕凯

完善跳转

No preview for this file type
... ... @@ -79,7 +79,7 @@ var $listNav = $('#list-nav'),
$pre = $listNav.find('.active'), //纪录进入筛选前的active项,初始为选中项
searching;
var viewType = 1,// 1-首页,2-上新,3-人气
var viewType = 1, // 1-首页,2-上新,3-人气
listCount = $('.category-list li').length,
listModValue = 4 - listCount % 4,
listIndex;
... ... @@ -130,7 +130,7 @@ if ($('.category-list li').length >= 5) {
}
function getPageGoods(info) {
var nav,navType;
var nav, navType;
if (searching) {
return;
... ... @@ -322,7 +322,7 @@ function reNav1Pos() {
myScroll.on('scroll', function() {
var scrollCall,
sTop = -this.y;
var tra;
... ... @@ -365,14 +365,14 @@ myScroll.on('scroll', function() {
}
if (!$nav2.hasClass('hide')) {
$nav2.addClass('hide');
} //滑动距离不到导航1
} //滑动距离不到导航1
} else if (sTop < imgH + main1oH + nav1H) {
if ($nav1.hasClass('hide')) {
$nav1.removeClass('hide');
}
if (!$nav2.hasClass('hide')) {
$nav2.addClass('hide');
}//滑动距离不到导航2
} //滑动距离不到导航2
if (sTop < imgH + main1H) {
if (!$nav1.hasClass('fixed-top')) {
... ... @@ -881,7 +881,9 @@ function postCollect(info) {
}
if (data.code === 401) {
url = data.url;
url = location.origin + '/signin.html?refer=' + encodeURIComponent(location.href) + '&openby:yohobuy=';
url += JSON.stringify({"action": "go.weblogin", "params": { "jumpurl": { "url": 'http://m.yohobuy.com' + location.pathname, "param": info.data }, "requesturl": { "param": {}, "url": "" }, "priority": "N" } });
$('body').append('<a href=\'' + url + '\'><span class="jump-login"><span></a>');
$('.jump-login').click();
... ... @@ -928,4 +930,4 @@ $('#collect').on('touchstart', function(e) {
} else {
collectShop();
}
});
\ No newline at end of file
});
... ...