Authored by zhangxiaoru

首页bottom

<div class="shop-foot-wrapper">
<ul{{#if brandList}} class="foot-list-3"{{/if}}>
<li data-bp-id="shop_footnav_one_1" class="buriedpoint good-category">
<li data-bp-id="shop_footnav_one_1" class="buriedpoint">
{{#if shopCategory.url}}
<a href="{{shopCategory.url}}">商品分类</a>
{{^}}
商品分类
<span id="shop-category">商品分类</span>
<div class="sub-group hide">
<dl>
{{# shopCategory.list}}
... ...
... ... @@ -462,8 +462,6 @@ function scrollHandler() {
});
}
}
$('#scroller').trigger('scroll');
}
document.addEventListener('touchmove', function(e) {
... ... @@ -480,7 +478,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();
... ... @@ -517,7 +515,7 @@ $(window).ready(function() {
multiSwiper && multiSwiper.startAutoplay();
// $('#scroller').trigger('scroll');
$('#scroller').trigger('scroll');
scrollHandler.bind(this)();
});
lazyLoad($('img.lazy'));
... ... @@ -893,29 +891,39 @@ $nav2.on('touchstart', 'li', function(e) {
});
// 底部导航点击
function fotterClick(group) {
$(group + ' li').on('touchstart', function() {
$('.sub-group').addClass('hide');
$(this).find('.sub-group').removeClass('hide');
});
}
// function fotterClick(group) {
// $(group + ' li').on('touchstart', function() {
// $('.sub-group').addClass('hide');
// $(this).find('.sub-group').removeClass('hide');
// });
// }
//
// fotterClick('.shop-foot-wrapper');
//
// function stopPropagation(e) {
// if (e.stopPropagation) {
// e.stopPropagation();
// } else {
// e.cancelBubble = true;
// }
// }
//
// $(document).bind('touchstart', function() {
// $('.sub-group').addClass('hide');
// });
//
// $('#shop-category').bind('touchstart', function(e) {
// // stopPropagation(e);
// });
fotterClick('.shop-foot-wrapper');
$('#shop-category').click(function () {
let subGroup = $('.sub-group');
function stopPropagation(e) {
if (e.stopPropagation) {
e.stopPropagation();
if (subGroup.hasClass('hide')) {
$('.sub-group').removeClass('hide');
} else {
e.cancelBubble = true;
$('.sub-group').addClass('hide');
}
}
$(document).bind('touchstart', function() {
$('.sub-group').addClass('hide');
});
$('.shop-foot-wrapper').bind('touchstart', function(e) {
stopPropagation(e);
});
// 店铺收藏 || 取消收藏
... ...