|
@@ -10,8 +10,8 @@
|
|
|
:width="500">
|
|
|
<div class="promotionDesc-con">
|
|
|
<img src="@/assets/iphone.png" alt="图片走丢了" srcset="">
|
|
|
- <div class="promotionDescCon" v-show="showType=='IMAGE_CONTENT'" v-html="mainContent"></div>
|
|
|
- <div class="promotionDescCon" v-show="showType=='VIDEO'" >
|
|
|
+ <div class="promotionDescCon" v-if="showType=='IMAGE_CONTENT'" v-html="mainContent"></div>
|
|
|
+ <div class="promotionDescCon" v-if="showType=='VIDEO'&&mainContent" >
|
|
|
<video width="100%" height="auto" controls loop controlsList="nodownload">
|
|
|
<source :src="mainContent" type="video/mp4"></source>
|
|
|
</video>
|
|
@@ -49,10 +49,12 @@ export default {
|
|
|
const ajaxData = {
|
|
|
id: con.id
|
|
|
}
|
|
|
- this.showType = con.showType
|
|
|
promoTerminalDetail(ajaxData).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
- this.mainContent = res.data.content
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.showType = res.data.contentType
|
|
|
+ this.mainContent = res.data.content
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -66,6 +68,8 @@ export default {
|
|
|
isShow (newValue, oldValue) {
|
|
|
if (!newValue) {
|
|
|
this.$emit('close')
|
|
|
+ this.mainContent = ''
|
|
|
+ this.showType = undefined
|
|
|
}
|
|
|
}
|
|
|
}
|