This commit is contained in:
yanran200730
2023-04-12 09:34:09 +08:00
parent c9b5dc63af
commit ef91ed6254
2 changed files with 63 additions and 4 deletions

View File

@@ -23,7 +23,13 @@
</ai-info-item>
<ai-info-item label="事件描述" isLine :value="info.content"></ai-info-item>
<ai-info-item label="活动附件" isLine>
<AiFileList :fileList="info.files"></AiFileList>
<!-- <AiFileList :fileList="info.files"></AiFileList> -->
<div class="files">
<div class="file-item" v-for="(item, index) in info.files" :key="index">
<img :src="item.url" v-if="item.postfix !== '.mp4'">
<video controls v-else :src="item.url"></video>
</div>
</div>
</ai-info-item>
</ai-wrapper>
</template>
@@ -80,12 +86,24 @@
this.instance.post(`/app/appintegraluserapply/queryDetailById?id=${this.params.id}`).then(res => {
if (res.code == 0) {
if (res.data) {
this.info = res.data
this.info = {
...res.data,
files: res.data.files.map(v => {
return {
...v,
postfix: v.postfix.toLowerCase()
}
})
}
}
}
})
},
isMp4 (postfix) {
return postfix.toLowerCase() === 'mp4'
},
onClose () {
this.id = ''
this.form.auditDesc = ''
@@ -120,4 +138,22 @@
</script>
<style scoped lang="scss">
.detail {
.files {
display: flex;
align-items: center;
flex-wrap: wrap;
.file-item {
width: 240px;
height: 240px;
margin: 0 20px 20px 0;
img, video {
width: 100%;
height: 100%;
object-fit: cover;
}
}
}
}
</style>