.wxml
<swiper indicator-dots="YES"
autoplay="YES" interval="5000" duration="500" circular = "YES">
<block wx:for="{{banner}}">
<swiper-item>
<image src="{{item.bannerimg}}" class="slide-image" width="100%" />
</swiper-item>
</block>
</swiper>
.js
Page({
data: {
banner: [],
},
onLoad: function () {
console.log('onLoad')
var that = this
that.setData({
banner: /***设置list数据***/,
});