防返贫

This commit is contained in:
shijingjing
2022-07-21 15:03:23 +08:00
parent 9c4081e1e8
commit a49d80c794
6 changed files with 440 additions and 36 deletions

View File

@@ -38,12 +38,28 @@
<div class="content">
<p>群发内容</p>
<div>
<div class="textarea" v-if="content.length">{{ content[0].content }}</div>
<div class="pictures">
<!-- <image v-for="(item, index) in picList" :key="index" :src="item.url" @click.stop="previewImages(picList, item.url)/> -->
<!-- 文本 -->
<div class="textarea" v-show="content.length">{{ content[0].content }}</div>
<!-- 图片 -->
<div class="pictures" v-show="picList.length">
<image v-for="(item, index) in picList" :key="index" :src="item.imgPicUrl" @click.stop="previewImages(picList, item.imgPicUrl)"/>
</div>
<!-- 视频 -->
<div class="video" v-show="videoList.length">
<video v-for="(item, index) in videoList" :key="index" :src="item.imgPicUrl"/>
</div>
<!-- 文件 -->
<div class="file" v-show="fileList.length">
<AiUploader v-for="(item, index) in fileList" :key="index" :src="item.imgPicUrl"/>
</div>
<!-- 网页 -->
<div class="webpage" v-show="webpage.length">
<video v-for="(item, index) in picList" :key="index" :src="item.imgPicUrl"/>
</div>
<!-- 小程序 -->
<div class="miniapp" v-show="miniapp.length">
<!-- <video v-for="(item, index) in picList" :key="index" :src="item.imgPicUrl"/> -->
</div>
<div></div>
<div></div>
</div>
</div>
</div>
@@ -61,7 +77,11 @@ export default {
id: "",
data: {},
content: [],
picList: []
picList: [],
videoList: [],
fileList: [],
webpage: [],
miniapp: [],
}
},
onLoad(o) {
@@ -72,14 +92,18 @@ export default {
this.$http.post(`/app/appmasssendingtask/queryDetailById?id=${this.id}`).then(res=> {
if (res?.data) {
this.data = res.data
this.content = res.data.contents.map(v=> v.msgType == 0)
this.picList = res.data.contents.map(e=> e.msgType == 1)
this.content = res.data.contents.filter(v=> v.msgType == 0)
this.picList = res.data.contents.filter(v=> v.msgType == 1)
this.videoList = res.data.contents.filter(v=> v.msgType == 2)
this.fileList = res.data.contents.filter(v=> v.msgType == 3)
this.webpage = res.data.contents.filter(v=> v.msgType == 4)
this.miniapp = res.data.contents.filter(v=> v.msgType == 5)
}
})
},
previewImage(images, img) {
previewImages(images, img) {
uni.previewImage({
urls: images.map(v => v.url),
urls: images.map(v => v.imgPicUrl),
current: img
})
},
@@ -184,12 +208,29 @@ export default {
color: #999;
margin-bottom: 26px;
}
.textarea {
.textarea,
.pictures,
.video,
.file,
.webpage,
.miniapp {
background: #F9F9F9;
border-radius: 4px;
padding: 20px;
box-sizing: border-box;
}
.pictures {
margin-top: 16px;
image {
width: 190px;
height: 190px;
margin-right: 4px;
margin-bottom: 4px;
}
image:nth-child(3n) {
margin-right: 0;
}
}
}
}