在index.js中添加以下代码 Page({ data: { motto: ‘Hello World’, imgUrls: [ ‘/images/swiper_01.jpg’, ‘/images/swiper_02.jpg’, ‘/images/swiper_03.jpg’, ‘/images/swiper_04.jpg’, ], indicatorDots: true, autoplay: true, // 轮播图自动播放 circular: true, interval: 3000, duration: 1000, moves: [], // 当前热映相关数据 } }) 在index.wxml中添加
即可以实现 实现后的页面如图     自动轮播