Commit 342b2c98 by zhangquan

提交代码

1 parent 464c42f4
...@@ -53,16 +53,16 @@ export default { ...@@ -53,16 +53,16 @@ export default {
}, },
mounted() { mounted() {
try { try {
const _that = this if(!this.info.videoUrl) return
const video = document.getElementById('swiper_video') const video = document.getElementById('swiper_video')
video.addEventListener('play', function() { video.addEventListener('play', ()=> {
_that.autoplay = 0 this.autoplay = 0
}) })
video.addEventListener('pause', function() { video.addEventListener('pause', ()=> {
_that.autoplay = 3000 this.autoplay = 3000
}) })
video.addEventListener('ended', function() { video.addEventListener('ended', ()=> {
_that.autoplay = 3000 this.autoplay = 3000
}, false) }, false)
} catch (error) { } catch (error) {
console.log('监听失败', error) console.log('监听失败', error)
...@@ -74,7 +74,7 @@ export default { ...@@ -74,7 +74,7 @@ export default {
}, },
getDetail(id) { getDetail(id) {
marketingApi.getTextDetail({ id, flag: 0 }).then(data => { marketingApi.getTextDetail({ id, flag: 0 }).then(data => {
console.log(data) if(data){
const fileList = [] const fileList = []
if (data.videoUrl) { if (data.videoUrl) {
fileList.push({ type: 'video', url: data.videoUrl }) fileList.push({ type: 'video', url: data.videoUrl })
...@@ -86,6 +86,7 @@ export default { ...@@ -86,6 +86,7 @@ export default {
} }
this.fileList = fileList this.fileList = fileList
this.info = data this.info = data
}
}) })
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!