...
|
...
|
@@ -8,10 +8,11 @@ var page = 1, |
|
|
hotnav,
|
|
|
listTop,
|
|
|
navSwiper,
|
|
|
notab,
|
|
|
sort = '',
|
|
|
id = '';
|
|
|
|
|
|
function hotrank(page, sort, tabId) {
|
|
|
function hotrank(page, sort, tabId, notab) {
|
|
|
$.ajax({
|
|
|
type: 'GET',
|
|
|
url: '/product/newsale/selectHotrank',
|
...
|
...
|
@@ -19,13 +20,19 @@ function hotrank(page, sort, tabId) { |
|
|
data: {
|
|
|
page: page,
|
|
|
sort: sort,
|
|
|
tab_id: tabId
|
|
|
tab_id: tabId,
|
|
|
notab: notab
|
|
|
},
|
|
|
success: function(data) {
|
|
|
if (page === 1) {
|
|
|
$('#hotRank').html('');
|
|
|
$('.rank-main').html('');
|
|
|
}
|
|
|
console.log(notab);
|
|
|
if (notab === 1) {
|
|
|
$('.rank-main').append(data);
|
|
|
} else {
|
|
|
$('#hotRank').append(data);
|
|
|
};
|
|
|
lazyLoad($('img.lazy'));
|
|
|
$('#yoho-footer').css('position', 'static');
|
|
|
$('.rank-main ul li:gt(2)').find('.item-content i').removeClass('top');
|
...
|
...
|
@@ -43,9 +50,9 @@ function hotrank(page, sort, tabId) { |
|
|
var navItme = $('.s-goods-nav .nav-item').eq(index);
|
|
|
|
|
|
id = navItme.data('id') ? navItme.data('id') : '';
|
|
|
sort = navItme.data('sort') ? navItme.data('sort') : '';
|
|
|
page = 1;
|
|
|
hotrank(page, sort, id);
|
|
|
notab = 1;
|
|
|
hotrank(page, sort, id, notab);
|
|
|
});
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -60,7 +67,8 @@ $(window).scroll(function () { |
|
|
return;
|
|
|
}
|
|
|
page = 2;
|
|
|
hotrank(page, sort, id);
|
|
|
notab = 1;
|
|
|
hotrank(page, sort, id, notab);
|
|
|
|
|
|
});
|
|
|
hotrank(page, sort, id); |
...
|
...
|
|