商品的图片轮播、视频播放

pull/1/MERGE
YunaiV 2023-06-23 00:43:02 +08:00
parent 5d9be29f04
commit edabd0c29f
1 changed files with 6 additions and 4 deletions

View File

@ -2,7 +2,8 @@
<view class='product-bg'> <view class='product-bg'>
<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :autoplay="autoplay" <swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :autoplay="autoplay"
:circular="circular" :interval="interval" :duration="duration" @change="change"> :circular="circular" :interval="interval" :duration="duration" @change="change">
<!-- 视频 -->
<swiper-item v-if="videoline"> <swiper-item v-if="videoline">
<view class="item"> <view class="item">
<view v-show="!controls" style="width:100%;height:100% "> <view v-show="!controls" style="width:100%;height:100% ">
@ -18,8 +19,9 @@
</view> </view>
</view> </view>
</swiper-item> </swiper-item>
<block v-for="(item,index) in imgUrls" :key='index'> <!-- 图片 -->
<block v-for="(item,index) in imgUrls" :key='index'>
<swiper-item> <swiper-item>
<image :src="item" class="slide-image" /> <image :src="item" class="slide-image" />
</swiper-item> </swiper-item>
@ -56,7 +58,7 @@
}; };
}, },
mounted() { mounted() {
if(this.videoline){ if (this.videoline) {
this.imgUrls.shift() this.imgUrls.shift()
} }
}, },