提交 604f7910 authored 作者: lihuihui's avatar lihuihui

update

上级 2a2dc285
......@@ -30,7 +30,7 @@
<div class="title">活动介绍</div>
<div class="txt" v-html="detailData.introduce"></div>
</div>
<div class="duce">
<div class="duce" id="setImg">
<div class="title">活动内容</div>
<div class="txt" v-html="detailData.content"></div>
</div>
......@@ -106,6 +106,13 @@ export default {
if (res.code === 0) {
this.detailData = res.data.activity_info
this.liveData = res.data.live_info
this.$nextTick(() => {
const dom = document.getElementById('setImg')
const domImg = dom.getElementsByTagName('img')
for (let i = 0; i < domImg.length; i++) {
domImg[i].style.width = '100%'
}
})
} else {
this.$router.push({
path: '/index'
......@@ -240,6 +247,9 @@ export default {
color: #222;
margin: .4rem 0;
word-break: break-all;
img{
width: 100%;
}
}
}
.list{
......
......@@ -99,7 +99,7 @@ export default {
})
},
getImg(data) {
const img = JSON.parse(data)[0].file_url
const img = JSON.parse(data).length === 0 ? '' : JSON.parse(data)[0].file_url
return img
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论