...
|
...
|
@@ -11,8 +11,9 @@ var $ = require('jquery'), |
|
|
|
|
|
var swiper,
|
|
|
$fixTitleBar,
|
|
|
$brandList = $('.brand-list');
|
|
|
var $icon = $('.search-icon');
|
|
|
$brandList = $('.brand-list'),
|
|
|
$icon = $('.search-icon'),
|
|
|
hotBrandsSwiper;
|
|
|
|
|
|
var searchH = $('.newbrand-search').outerHeight(),
|
|
|
headerH = $('.yoho-header').outerHeight(),
|
...
|
...
|
@@ -23,6 +24,14 @@ var brandsData, |
|
|
$keyword,
|
|
|
clearTextHammer;
|
|
|
|
|
|
//热门品牌滑动
|
|
|
hotBrandsSwiper = new Swiper('.brands-swiper', {
|
|
|
grabCursor: true,
|
|
|
slidesPerView: 'auto',
|
|
|
wrapperClass: 'brands-list',
|
|
|
slideElement: 'li'
|
|
|
});
|
|
|
|
|
|
swiper = new Swiper('.swiper-container', {
|
|
|
lazyLoading: true,
|
|
|
loop: true,
|
...
|
...
|
@@ -37,12 +46,16 @@ $('.yoho-header').css({ |
|
|
top: 0
|
|
|
});
|
|
|
|
|
|
if ($('.banner-top').length > 0) {
|
|
|
$('.hot-brands').css('padding-top', '0');
|
|
|
}
|
|
|
|
|
|
$fixTitleBar = $('<div class="title-bar fixed-title-bar"><h2></h2></div>');
|
|
|
$fixTitleBar.css({
|
|
|
position: 'fixed',
|
|
|
top: brandSwipe
|
|
|
}).hide();
|
|
|
minBrandListTop = brandSwipe + $('.hot-brand').outerHeight() + $('.banner-top').outerHeight();
|
|
|
minBrandListTop = brandSwipe + $('.hot-brands').outerHeight() + $('.banner-top').outerHeight();
|
|
|
$brandList.last().append($fixTitleBar);
|
|
|
|
|
|
function scrollHandler() {
|
...
|
...
|
|