diff --git a/pkg_product/views/sojoumStore.vue b/pkg_product/views/sojoumStore.vue index 997e8d6..d47c44a 100644 --- a/pkg_product/views/sojoumStore.vue +++ b/pkg_product/views/sojoumStore.vue @@ -11,14 +11,28 @@ /> - + @change="swiperChange" + > + + + + + {{ store.name }} @@ -347,6 +361,7 @@ export default { }, data() { return { + swiperAutoplay: true, webUrl: this.$VUE_APP_RESOURCES_URL, videoStyle: { width: '750rpx', @@ -398,6 +413,21 @@ export default { } }, methods: { + swiperChange(e) { + const current = e.detail.current; + const currentItem = this.store.banner[current]; + // if (currentItem.includes('.mp4')) { + // this.swiperAutoplay = false; + // } else { + // this.swiperAutoplay = true; + // } + }, + videoPlay() { + this.swiperAutoplay = false; + }, + videoEnd() { + this.swiperAutoplay = true; + }, // 跳转管家详情 goHousekeeperDetail(item) { uni.navigateTo({ @@ -649,10 +679,7 @@ export default { getJiaLouDetail(this.id).then(res => { this.store = res.data || {} if(res.data.video) { - this.store.banner = [ - res.data.video, - ...this.store.banner - ] + this.store.banner.unshift(res.data.video) } this.getNews() this.getJiaLouProductList()