Authored by liangxs

领券中心

... ... @@ -2,11 +2,14 @@
* Created by Administrator on 2016/4/13.
*/
var $ = require('jquery'),
Swiper = require('yoho.iswiper'),
$receive = $('.main-right-receive'),
$mask = $('.floor-mask'),
$message = $('.floor-message'),
$tooltip = $('.floor-tooltip');
var bannerSwiper;
$receive.on('click', function() {
var $curDom = $(this);
... ... @@ -47,4 +50,17 @@ $('.coupon-floor a').on('click', function() {
if ($(this).attr('href').length <= 0) {
return false;
}
});
\ No newline at end of file
});
if ($('.banner-swiper').find('li').size() > 1) {
bannerSwiper = new Swiper('.banner-swiper', {
lazyLoading: true,
lazyLoadingInPrevNext: true,
loop: true,
autoplay: 3000,
autoplayDisableOnInteraction: false,
paginationClickable: true,
slideElement: 'li',
pagination: '.banner-top .pagination-inner'
});
}
\ No newline at end of file
... ...
.coupon-area .banner-top {
float: left;
}
.just-img{
width:100%;
height: 96rem / $pxConvertRem;
width: 100%;
float: left;
margin:0;
margin: 20rem / $pxConvertRem 0;
}
.coupon-floor {
float: left;
width:100%;
width: 100%;
.floor-title {
background-color: #fff;
text-align: center;
... ...
{{>layout/header}}
<div class="coupon-area">
{{# content}}
{{#if isCarouselBanner}}
<div class="banner-top">
<div class="banner-swiper swiper-container">
<ul class="swiper-wrapper">
{{#each list}}
{{#if @first}}
<li class="swiper-slide">
<a href="{{url}}">
<img src="{{img}}">
</a>
</li>
{{^}}
<li class="swiper-slide">
<a href="{{url}}">
<img class="swiper-lazy" src="{{img}}">
</a>
<div class="swiper-lazy-preloader"></div>
</li>
{{/if}}
{{/each}}
</ul>
</div>
<div class="swiper-pagination">
<div class="pagination-inner">
</div>
</div>
</div>
{{/if}}
{{#if isSingleImage}}
<img class="just-img" src="{{src}}" />
<a href="{{url}}"><img src="{{src}}" class="just-img" /></a>
{{/if}}
{{#if isCarouselBanner}}
{{> home/banner_top}}
{{/if}}
{{#if isCoupon}}
<div class="coupon-floor">
... ... @@ -62,6 +39,7 @@
</div>
{{/if}}
{{/ content}}
</div>
<div class="floor-mask"></div>
<div class="floor-message">
<div class="coupon-message-content"></div>
... ...