Authored by 姜枫

Merge branch 'hotfix/shop-index-style'

... ... @@ -84,7 +84,7 @@ var viewType = 1, // 1-首页,2-上新,3-人气
listModValue = 4 - listCount % 4,
listIndex;
lazyLoad($('img.lazy'));
//焦点效果
if ($('.banner-swiper').find('li').size() > 1) {
... ... @@ -177,7 +177,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'
... ... @@ -256,13 +256,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);
}
... ... @@ -320,7 +318,6 @@ function scrollHandler() {
var tra;
theY = sTop;
if (sTop + winH > scH - 0.25 * $goodsContainer.height() - 50) {
if ($pre !== undefined) {
... ... @@ -439,7 +436,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();
... ... @@ -454,14 +451,12 @@ $(window).ready(function() {
click: true
});
//setTimeout(function() {
setTimeout(function() {
scH = $('#scroller').outerHeight();
//}, 1000);
}, 1000);
myScroll.on('scroll', function() {
window.requestAnimationFrame(scrollHandler);
});
myScroll.on('scroll', scrollHandler);
myScroll.on('scrollStart', function() {
... ... @@ -479,8 +474,9 @@ $(window).ready(function() {
multiSwiper && multiSwiper.startAutoplay();
$('#scroller').trigger('scroll');
scrollHandler.bind(this)();
});
lazyLoad($('img.lazy'));
});
function bindGoodThumbClick() {
... ... @@ -646,10 +642,7 @@ function search(opt) {
window.rePosFooter();
setTimeout(function() {
myScroll && myScroll.refresh();
}, 0);
myScroll.refresh();
reNav1Pos();
bindGoodThumbClick();
... ... @@ -830,14 +823,14 @@ $listNav.on('touchstart', 'li', function(e) {
$(this).addClass('bytouch');
}).on('touchend touchcancel', function() {
$listNav.find('li').removeClass('bytouch');
//myScroll && myScroll.refresh();
myScroll && myScroll.refresh();
});
$nav2.on('touchstart', 'li', function(e) {
$(this).addClass('bytouch');
}).on('touchend touchcancel', function() {
$nav2.find('li').removeClass('bytouch');
//myScroll && myScroll.refresh();
myScroll && myScroll.refresh();
});
//底部导航点击
... ... @@ -900,7 +893,7 @@ function postCollect(info) {
}
setTimeout(function() {
//myScroll.refresh();
myScroll.refresh();
scH = $('#scroller').outerHeight();
}, 1000);
searching = false;
... ...
... ... @@ -103,7 +103,7 @@
{{#each hotList}}
<li class="buriedpoint" data-bp-id="shop_hotList_{{url}}">
<a href="{{url}}">
<img class="lazy" data-original="{{img}}">
<img src="{{img}}">
</a>
<div class="list-price">
<p>{{productName}}</p>
... ...