个人示例
<swiper autoplay="true" indicator-dots="{{true}}" class="ad-swiper" indicator-color="rgba(255, 255, 255, .5)" indicator-active-color="#FFF">
<block wx:for="{{advertisements}}" wx:key="ad_id" wx:for-item="it1">
<swiper-item wx:for="{{it1.ad_image}}" wx:key="id" wx:for-item="it2" bindtap="adTap" data-jumptype="{{it1.jump_type}}" data-appid="{{it1.miniapp_appid}}" data-path="{{it1.miniapp_page_path}}" data-url="{{it1.jump_url}}">
<image class="ad-img" src="{{it2.url}}"></image>
</swiper-item>
</block>
</swiper>
官方示例
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
<block wx:for="{{background}}" wx:key="*this">
<swiper-item>
<view class="swiper-item {{item}}"></view>
</swiper-item>
</block>
</swiper>
来源:51CTO
作者:coderiding
链接:https://blog.51cto.com/williamliuwen/2469736