<!--component/buyImageSwiper/buyImageSwiper.wxml-->
<wxs src="../../wxs/utils.wxs" module="utils" />
<view class="image-wrap">
  <swiper
    indicator-dots="{{indicatorDots}}"
    autoplay="{{autoplay}}"
    interval="{{interval}}"
    duration="{{duration}}"
    circular="{{circular}}"
    class="image-swiper"
    bindchange="swiperChange"
  >
    <block wx:for="{{imageData}}" wx:key="{{item}}">
      <swiper-item class="swiper-item">
        <image src="{{item.url}}" wx:if="{{!item.videoUrl}}" data-appid="{{item.id}}" data-path="{{item.link.url}}" data-link="{{item.link}}"  data-item="{{item}}" bindtap='preview' class="slide-image" mode="aspectFit"/>
        <video  class="slide-image" src="{{utils.formateUrl(item.videoUrl,baseImgUrl)}}" wx:if="{{item.videoUrl}}"  controls="true" autoplay="true"></video>
      </swiper-item>
    </block>
    
  </swiper>
  <view class="dots"> 
        <block wx:for="{{imageData}}" wx:key="index"> 
          <view class="dot{{index == swiperCurrent ? ' active' : ''}}"></view> 
        </block> 
  </view>
</view>
 
