Commit 86dc5df318834194507329a8ea33dbb83ab1fd14

Authored by 王强
1 parent a4258ef6

购好物首页,添加banner自动轮播~

src/components/swiper/swiper.vue
1 1 <template>
2 2 <div class="swiper-box" :class="{'points-mall-swiper':isPointsMall}" v-if="swipers && swipers.length">
3   - <swipe class="swipe" :autoplay="0" :touchable="swipers.length === 1 ? false : true" :show-indicators="options && options.showIndicators !== undefined ? options.showIndicators : showIndicators" @change="onChange">
  3 + <swipe class="swipe" :autoplay="options && options.autoplay !== undefined ? options.autoplay : 0" :touchable="swipers.length === 1 ? false : true" :show-indicators="options && options.showIndicators !== undefined ? options.showIndicators : showIndicators" @change="onChange">
4 4 <swipe-item class="swipe-item" v-for="(item, index) in swipers" :key="index">
5 5 <div class="item" @click="$parent.$parent.gotoDetail(item)">
6 6 <div class="img-box">
... ...
src/pages/optimization2/optimization2.vue
... ... @@ -27,7 +27,8 @@
27 27 <swiper-box
28 28 :swipers="swipers"
29 29 :options="{
30   - showIndicators: true
  30 + showIndicators: true,
  31 + autoplay: 5000
31 32 }">
32 33 </swiper-box>
33 34 </div>
... ...