<template>
  <view class="index-swiper">
    <swiper class="swiper" :autoplay="true" interval="2500" :circular="true">
      <swiper-item class="box"  v-for="(item,index) in list" @click="nav" :key="index" :data-id="item.goods_id">
        <image :src="item.imgpath"></image>
      </swiper-item>
      <swiper-item class="box">
        <image src="../../static/img/swiper.png"></image>
      </swiper-item>
      <swiper-item class="box">
        <image src="../../static/img/swiper.png"></image>
      </swiper-item>
    </swiper>
  </view>
</template>
<style lang="scss" scoped>
.index-swiper{
    width: 100%;
    height: 390upx;
    .swiper{
        width: 100%;
        height: 100%;
        .box{
            width: 100%;
            height: 100%;
            >image{
                width: 100%;
                height: 100%;
            }
        }
    }
}
</style>
<script>
name: "swiper";
export default {
    props:{
      list:{
        type:Array
      }
    },
    mounted(){
      console.log(this.list[0],1313)
    },
    methods:{
        nav(e){
            console.log(e)
            uni.navigateTo({
             	url:"/pages/shopdetail/shopdetail?shopid="+e.currentTarget.dataset.id
            })
        },
		index(){
			
		}
    }
};
</script>