<template>
  <!-- <swiper
    indicator-dots
    autoplay
    :interval="5000"
    :style="swHeight"
  >
    <block v-for="(item, index) in banners" :key="index">
      <swiper-item>
        <van-image
            width="100%"
            :data-url="item.page_url"
            :data-openSource="swiper"
            height="100%"
            :fit="swipers.fill==1?'fill':'contain'"
            :src="item.pic_url"
        />
      </swiper-item>
    </block>
  </swiper> -->
  <u-swiper
    :list="banners"
    :effect3d="swipers.style == 2"
    :height="swipers.height"
    :interval="5000"
    name="picUrl"
    :border-radius="0"
	@click="clickHandler"
  ></u-swiper>
</template>

<script>
export default {
  props: ["swipers"],
  data() {
    return {
      banners: []
    };
  },
  created() {
	  if(this.swipers.banners.length>0){
		 this.swipers.banners.forEach(x=>{
			 x.picUrl=this.getIconLink(x.picUrl)
		 })
	  }
    this.banners = this.swipers.banners;
  },
  methods: {
    clickHandler(i) {
      if (this.banners[i].url && this.banners[i].url.length > 0) {
        uni.navigateTo({
          url: this.banners[i].url,
        });
      }
    },
  },
};
</script>

<style></style>
