...
|
...
|
@@ -87,7 +87,6 @@ var viewType = 1, // 1-首页,2-上新,3-人气 |
|
|
listModValue = 4 - listCount % 4,
|
|
|
listIndex;
|
|
|
|
|
|
lazyLoad($('img.lazy'));
|
|
|
|
|
|
$('.main-wrap').css({
|
|
|
position: 'static'
|
...
|
...
|
@@ -186,7 +185,7 @@ function newData(callback) { |
|
|
|
|
|
req.url = location.protocol + '//m.yohobuy.com/index/search/search';
|
|
|
req.data = {
|
|
|
type: 'newest',
|
|
|
type: 'new',
|
|
|
order: '1',
|
|
|
page: navInfo.new.page,
|
|
|
tagNew: '1'
|
...
|
...
|
@@ -265,13 +264,11 @@ function tabChange(dom, index) { |
|
|
hotData();
|
|
|
viewType = 3;
|
|
|
} else if (activeTab === 'home-page') {
|
|
|
|
|
|
myScroll && myScroll.refresh();
|
|
|
scH = $('#scroller').outerHeight();
|
|
|
$nav1.removeClass('fixed-top absolute');
|
|
|
$nav2.removeClass('fixed-top absolute');
|
|
|
}
|
|
|
|
|
|
myScroll && myScroll.refresh();
|
|
|
scH = $('#scroller').outerHeight();
|
|
|
if (!$nav1.hasClass('hide')) {
|
|
|
myScroll && myScroll.scrollTo(0, 0 - imgH);
|
|
|
}
|
...
|
...
|
@@ -448,7 +445,7 @@ document.addEventListener('touchmove', function(e) { |
|
|
|
|
|
// window ready 后重新refresh iscroll
|
|
|
$(window).ready(function() {
|
|
|
// myScroll && myScroll.refresh();
|
|
|
myScroll && myScroll.refresh();
|
|
|
imgH = $('#nav-top').outerHeight();
|
|
|
nav1H = $('#nav').outerHeight();
|
|
|
main1H = $('#nav-main').height();
|
...
|
...
|
@@ -463,15 +460,12 @@ $(window).ready(function() { |
|
|
click: true
|
|
|
});
|
|
|
|
|
|
// setTimeout(function() {
|
|
|
scH = $('#scroller').outerHeight();
|
|
|
|
|
|
// }, 1000);
|
|
|
setTimeout(function() {
|
|
|
scH = $('#scroller').outerHeight();
|
|
|
}, 1000);
|
|
|
|
|
|
|
|
|
myScroll.on('scroll', function() {
|
|
|
window.requestAnimationFrame(scrollHandler);
|
|
|
});
|
|
|
myScroll.on('scroll', scrollHandler);
|
|
|
|
|
|
myScroll.on('scrollStart', function() {
|
|
|
|
...
|
...
|
@@ -489,8 +483,9 @@ $(window).ready(function() { |
|
|
multiSwiper && multiSwiper.startAutoplay();
|
|
|
|
|
|
$('#scroller').trigger('scroll');
|
|
|
scrollHandler.bind(this)();
|
|
|
});
|
|
|
|
|
|
lazyLoad($('img.lazy'));
|
|
|
});
|
|
|
|
|
|
function bindGoodThumbClick() {
|
...
|
...
|
@@ -660,10 +655,7 @@ function search(opt) { |
|
|
|
|
|
window.rePosFooter();
|
|
|
|
|
|
setTimeout(function() {
|
|
|
myScroll && myScroll.refresh();
|
|
|
}, 0);
|
|
|
|
|
|
myScroll.refresh();
|
|
|
reNav1Pos();
|
|
|
|
|
|
bindGoodThumbClick();
|
...
|
...
|
@@ -831,7 +823,7 @@ $subNav.on('touchend touchcancel', function(e) { |
|
|
filter.initFilter({
|
|
|
fCbFn: function(option) {
|
|
|
search(option);
|
|
|
myScroll.enable();
|
|
|
myScroll && myScroll.enable();
|
|
|
},
|
|
|
hCbFn: function() {
|
|
|
|
...
|
...
|
@@ -839,7 +831,7 @@ filter.initFilter({ |
|
|
$pre.addClass('active');
|
|
|
$pre.siblings('.filter').removeClass('active');
|
|
|
|
|
|
myScroll.enable();
|
|
|
myScroll && myScroll.enable();
|
|
|
},
|
|
|
missStatus: true
|
|
|
});
|
...
|
...
|
@@ -848,14 +840,14 @@ $listNav.on('touchstart', 'li', function(e) { |
|
|
$(this).addClass('bytouch');
|
|
|
}).on('touchend touchcancel', function() {
|
|
|
$listNav.find('li').removeClass('bytouch');
|
|
|
myScroll.refresh();
|
|
|
myScroll && myScroll.refresh();
|
|
|
});
|
|
|
|
|
|
$nav2.on('touchstart', 'li', function(e) {
|
|
|
$(this).addClass('bytouch');
|
|
|
}).on('touchend touchcancel', function() {
|
|
|
$nav2.find('li').removeClass('bytouch');
|
|
|
myScroll.refresh();
|
|
|
myScroll && myScroll.refresh();
|
|
|
});
|
|
|
|
|
|
// 底部导航点击
|
...
|
...
|
|