微信小程序輪播圖的製做與跳轉

  <!--輪播圖 -->
  <view class='swiperBanner'>
    <swiper indicator-dots='{{indicatorDots}}' autoplay='{{autoplay}}' interval='{{interval}}' duration='{{duration}}' circular='{{circular}}'>
      <swiper-item  wx:for="{{imgUrls}}" wx:key='{{index}}'>
        <navigator url='{{item.link}}'>
          <image src="{{item.url}}" class="slide-image" mode="aspectFill"></image>
        </navigator>  
      </swiper-item>
    </swiper>
  </view>
</view>

  

/* 輪播 */
.swiperBanner{
  width:100%;
  height:420rpx !important;
  margin:0 auto;  
}
.swiperBanner image{
  width:100%;
  height:420rpx !important;
}
swiper {
  width:100%;
  height:420rpx !important;
}

  

 indicatorDots:false,
    autoplay:true,
    interval:3000,
    duration: 800,
    circular:true,
     // 輪播圖
    imgUrls: [
      {
        link:'../activity/washCar1/index/index',
        url:'https://ttcf.cheleu.com/static/ttcf/img/banner8.png',

      },
      {
        link: '../activity/Odysseus/index/index',
        url: 'https://ttcf.cheleu.com/static/ttcf/img/banner9.png',

      },
      // "https://ttcf.cheleu.com/static/ttcf/img/banner8.png",
      // "https://ttcf.cheleu.com/static/ttcf/img/banner9.png",

    ],
相關文章
相關標籤/搜索