...
|
...
|
@@ -31,8 +31,7 @@ var $subNav = $('.home-sub-nav'), |
|
|
$pgc = $($goodsChildren.get(1)),
|
|
|
$dgc = $($goodsChildren.get(2)),
|
|
|
$shopId = $('input[name="shop_id"]').val(),
|
|
|
$appVersion = $('input[name="appVersion"]').val();
|
|
|
console.log($shopId)
|
|
|
$appVersion = $('input[name="app_version"]').val();
|
|
|
|
|
|
var winH = $(window).height(),
|
|
|
noResult = '<p class="no-result">未找到相关搜索结果</p>';
|
...
|
...
|
@@ -139,8 +138,16 @@ $.jqtab = function(nav, posNav, main) { |
|
|
}else if(activeTab == 'popularity'){
|
|
|
hotData();
|
|
|
} else if (activeTab == 'home-page') {
|
|
|
myScroll.refresh();
|
|
|
myScroll && myScroll.refresh();
|
|
|
// setTimeout(function() {
|
|
|
// scH = $('#scroller').outerHeight();
|
|
|
// },1000);
|
|
|
scH = $('#scroller').outerHeight();
|
|
|
$nav1.removeClass('fixed-top');
|
|
|
$nav1.removeClass('absolute');
|
|
|
|
|
|
$nav2.removeClass('fixed-top');
|
|
|
$nav2.removeClass('absolute');
|
|
|
}
|
|
|
|
|
|
myScroll.scrollTo(0,0);
|
...
|
...
|
@@ -173,12 +180,12 @@ function getPageGoods(info) { |
|
|
success: function(data) {
|
|
|
info.callBack(data);
|
|
|
|
|
|
myScroll.refresh();
|
|
|
scH = $('#scroller').outerHeight();
|
|
|
|
|
|
$nav1.addClass('hide');
|
|
|
myScroll.scrollTo(0,0);
|
|
|
|
|
|
myScroll.refresh();
|
|
|
scH = $('#scroller').outerHeight();
|
|
|
|
|
|
lazyLoad($('img.lazy'));
|
|
|
searching = false;
|
|
|
},
|
...
|
...
|
@@ -288,9 +295,10 @@ myScroll.on('scroll', function() { |
|
|
}
|
|
|
|
|
|
if (sTop < scH) {
|
|
|
if (!$nav2.hasClass('fixed-top')) {
|
|
|
myScroll.refresh();
|
|
|
scH = $('#scroller').outerHeight();
|
|
|
// console.log(sTop);
|
|
|
// console.log(scH);
|
|
|
|
|
|
if (!$nav2.hasClass('fixed-top')) {
|
|
|
$nav2.addClass('fixed-top')
|
|
|
.removeClass('absolute')
|
|
|
.css({
|
...
|
...
|
@@ -408,6 +416,7 @@ function search(opt) { |
|
|
nav = navInfo[navType];
|
|
|
|
|
|
page = nav.page + 1;
|
|
|
console.log(page)
|
|
|
if (nav.reload) {
|
|
|
page = 1;
|
|
|
} else if (nav.end) {
|
...
|
...
|
@@ -422,6 +431,8 @@ function search(opt) { |
|
|
page: page
|
|
|
});
|
|
|
|
|
|
console.log(page)
|
|
|
|
|
|
searching = true;
|
|
|
loading.showLoadingMask();
|
|
|
|
...
|
...
|
@@ -743,7 +754,7 @@ function postCollect(info) { |
|
|
}
|
|
|
|
|
|
if (data.code === 401) {
|
|
|
url = data.url + '?refer=' + location.href;
|
|
|
url = data.url;
|
|
|
$('body').append('<a href="' + url + '"><span class="jump-login"><span></a>');
|
|
|
|
|
|
$('.jump-login').click();
|
...
|
...
|
@@ -769,7 +780,7 @@ function collectShop() { |
|
|
qew.url = '/product/index/shopFav';
|
|
|
qew.data = {
|
|
|
shop_id: $shopId,
|
|
|
appVersion: $appVersion
|
|
|
app_version: $appVersion
|
|
|
};
|
|
|
postCollect(qew);
|
|
|
}
|
...
|
...
|
@@ -780,7 +791,7 @@ function cancelShop() { |
|
|
qew.url = '/product/index/cancelShopFav';
|
|
|
qew.data = {
|
|
|
shop_id: $shopId,
|
|
|
appVersion: $appVersion
|
|
|
app_version: $appVersion
|
|
|
};
|
|
|
postCollect(qew);
|
|
|
}
|
...
|
...
|
|