<div class="proSwiper swiper-cp1">
<div class="swiper-wrapper">
{% for value in products.show(0,6,0,1) %}
<div...
<div class="proSwiper swiper-cp1">
<div class="swiper-wrapper">
{% for value in products.show(0,6,0,1) %}
<div class="slicon">
<a href="{{ value.url }}" title="{{ value.title }}">
<div class="img com-img">
<img src="{{ app('content').thumb(value.uploadfiles[0],600,600) }}" alt="">
</div>
</a>
</div>
{% endfor %}
</div>
</div>
<script>
/* 使用js分组,每4个.slick-con放到一个div里面 */
jQuery(".swiper-cp1 .slicon").each(function(i){ jQuery(".swiper-cp1 .slicon").slice(i*2,i*2+2).wrapAll("<div class='swiper-slide'></div>");});
var swiper = new Swiper(".swiper-cp1", {
slidesPerView: 3,
spaceBetween: 30,
autoplay:true,
loop: true,
});
</script>