Authored by biao

fix the issue of scroll bar show when there is no scroll. code review by XWG

... ... @@ -22,6 +22,9 @@ require('./good');
lazyLoad($('img.lazy'));
console.log($(document).height());
console.log($(window).height());
if ('advance' === cartType) {
$cartContent.toggleClass('hide');
}
... ... @@ -82,5 +85,16 @@ if ($('.cart-zero').length > 0) {
require('../product/recommend-for-you');
}
function notAllowScroll() {
var docH = $(document).height(),
winH = $(window).height();
if (docH - winH <= 10) {
$('body').css('overflow', 'hidden');
}
}
notAllowScroll();
//提前触发lazyload
$(window).scrollTop(1).scrollTop(0);
... ...