Commit d44c5938 by zhangquan

修改detail

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