Commit d44c5938 by zhangquan

修改detail

1 parent 342b2c98
......@@ -36,7 +36,7 @@ import { marketingApi } from '@/api'
import { shareMixin } from '@/mixins'
export default {
mixins: [shareMixin],
name: '',
name: 'detail',
data() {
return {
curIdx: 0,
......@@ -52,21 +52,20 @@ export default {
this.getDetail(id)
},
mounted() {
try {
if(!this.info.videoUrl) return
const video = document.getElementById('swiper_video')
video.addEventListener('play', ()=> {
this.autoplay = 0
})
video.addEventListener('pause', ()=> {
this.autoplay = 3000
})
video.addEventListener('ended', ()=> {
this.autoplay = 3000
}, false)
} catch (error) {
console.log('监听失败', error)
}
if(video){
video.addEventListener('play', ()=> {
this.autoplay = 0
})
video.addEventListener('pause', ()=> {
this.autoplay = 3000
})
video.addEventListener('ended', ()=> {
this.autoplay = 3000
}, false)
}
},
methods: {
changeSwiper(idx) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!