Authored by 郝肖肖

Merge branch 'release/5.2' of git.yoho.cn:fe/yohobuywap-node into release/5.2

{{#if singleOne}}
{{#data}}
<div class="banner-list">
<a href="{{url}}">
<img src="{{image src 640 200}}" alt="">
</a>
</div>
{{/data}}
{{else}}
<div class="banner-center banner-center-swiper">
{{#if singleOne}}
<ul class="banner-list swiper-wrapper clearfix">
{{#data}}
<div class="banner-list">
<a href="{{url}}">
<img src="{{image src 640 200}}" alt="">
</a>
</div>
<li class="swiper-slide">
<a href="{{url}}">
<img src="{{image src 640 200}}" alt="">
</a>
</li>
{{/data}}
{{else}}
<ul class="banner-list swiper-wrapper clearfix">
{{#data}}
<li class="swiper-slide">
<a href="{{url}}">
<img src="{{image src 640 200}}" alt="">
</a>
</li>
{{/data}}
</ul>
{{/if}}
</ul>
<div class="swiper-pagination" {{#unless singleOne}}style="display:block"{{/unless}}>
<div class="pagination-inner">
</div>
</div>
</div>
{{/if}}
... ...
{{#if banner_image.[1]}}
<div class="banner-center banner-center-swiper" style="border: 0;">
{{#if banner_image.[1]}}
<ul class="banner-list swiper-wrapper clearfix">
{{#banner_image}}
<li class="swiper-slide">
... ... @@ -9,17 +9,17 @@
</li>
{{/banner_image}}
</ul>
{{else}}
{{#banner_image}}
<div class="banner-list">
<a href="{{url}}">
<img src="{{image src 640 200}}" alt="">
</a>
</div>
{{/banner_image}}
{{/if}}
<div class="swiper-pagination" {{#if banner_image.[1]}}style="display:block"{{/if}}>
<div class="pagination-inner">
</div>
</div>
</div>
\ No newline at end of file
</div>
{{else}}
{{#banner_image}}
<div class="banner-list single-one">
<a href="{{url}}">
<img src="{{image src 640 200}}" alt="">
</a>
</div>
{{/banner_image}}
{{/if}}
\ No newline at end of file
... ...
... ... @@ -112,16 +112,22 @@ if ($('.banner-swiper').find('li').size() > 1) {
}
// single_image的轮播
if ($('.banner-center-swiper').find('li').size() > 1) {
new Swiper('.banner-center-swiper', {
loop: true,
autoplay: 3000,
autoplayDisableOnInteraction: false,
paginationClickable: true,
slideElement: 'li',
pagination: '.banner-center .pagination-inner'
});
}
$('.banner-center-swiper').each(function() {
if ($(this).find('li').size() > 1) {
new Swiper('.banner-center-swiper', {
loop: true,
autoplay: 3000,
autoplayDisableOnInteraction: false,
paginationClickable: true,
slideElement: 'li',
pagination: '.banner-center .pagination-inner',
});
} else {
$(this).unbind();
}
});
// 热门品牌滑动
new Swiper('.brands-swiper', {
... ... @@ -245,6 +251,7 @@ var checkShop = function() {
$('.recom-shop').each(function() {
shopIds.push($(this).attr('shopId'));
});
shopIds.length &&
$.ajax({
type: 'POST',
url: '/channel/shopRecom',
... ...
... ... @@ -77,3 +77,8 @@
}
}
}
.single-one {
margin-bottom: -2PX;
z-index: 2;
}
... ...
.banner-top {
position: relative;
margin-bottom: -2PX;
.swiper-pagination {
position: absolute;
... ...