diff --git a/pkg_product/views/famousQianxianShop.vue b/pkg_product/views/famousQianxianShop.vue
index 5f0691f..b488cde 100644
--- a/pkg_product/views/famousQianxianShop.vue
+++ b/pkg_product/views/famousQianxianShop.vue
@@ -33,6 +33,7 @@
object-fit="contain"
play-btn-position="center"
class="video"
+ id="coverVideo"
/>
@@ -171,12 +172,24 @@
+
@@ -704,6 +717,7 @@ export default {
// 产品
leftList: [],
rightList: [],
+ videoPlayers:[]
}
},
// 必须在页面加 onPageScroll(e){} ,才能滑动显示背景
@@ -1050,7 +1064,27 @@ export default {
infoClick(info) {
// this.$yrouter.push('/pagesInn/inn/innInfoDetail?id=' + info.id)
},
- infoItemViewClick(item) {
+ infoItemViewClick(item, index) {
+ if(item.type === 2) {
+ const coverCtx = uni.createVideoContext('coverVideo', this)
+ coverCtx.pause()
+ const playerId = 'video-item' + index
+ if(this.videoPlayers.includes(playerId)) {
+ this.videoPlayers.forEach(player => {
+ if(player === playerId) return
+ const playerCtx = uni.createVideoContext(player, this)
+ playerCtx.pause()
+ })
+ } {
+ this.videoPlayers.push(playerId)
+ this.videoPlayers.forEach(player => {
+ if(player === playerId) return
+ const playerCtx = uni.createVideoContext(player, this)
+ playerCtx.pause()
+ })
+ }
+ this.$emit('video')
+ }
uni.$u.debounce(() => {
postCountyFamousNewsView({ countyFamousNewsId: item.id }).finally(() => {
this.infoArray.map(info => {
@@ -1156,6 +1190,11 @@ export default {