精选活动
This commit is contained in:
@@ -1,14 +1,9 @@
|
||||
<template>
|
||||
<div class="pickDetail">
|
||||
<div class="container">
|
||||
<div class="title">房前屋后卫生</div>
|
||||
<p class="avatar">李维民</p>
|
||||
<div class="content">
|
||||
百年征和波澜壮阔,百年初心历争议弥坚。7月1日上午,庆祝中国共产党成立100周年在国务院举办午,
|
||||
庆祝中国共产党成立100周年在国务院举办午,庆祝中7月1日上午,庆祝中国共产党成立100周年在国务院举办午,
|
||||
庆祝中国共产党成立100周年在国务院举办午,
|
||||
庆祝中7月1日上午,庆祝中国共产党成立100周年在国务院举办午,庆祝中国共产党成立100周年在国务院
|
||||
</div>
|
||||
<div class="title">{{ data.title }}</div>
|
||||
<p class="avatar">{{ data.createUserName }}</p>
|
||||
<div class="content">{{ data.content }}</div>
|
||||
<div class="imgs" v-if="images.length">
|
||||
<image v-for="(img, i) in images" @click="preview(img.url, images)" :key="i" class="banner" :src="img.url"/>
|
||||
</div>
|
||||
@@ -27,18 +22,31 @@ export default {
|
||||
return {
|
||||
images: [],
|
||||
videos: [],
|
||||
id: '',
|
||||
data: {}
|
||||
}
|
||||
},
|
||||
method: {
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.$instance.post(`/app/appcontentinfo/queryDetailById?id=${this.id}`).then(res=> {
|
||||
if(res?.data) {
|
||||
this.data = res.data
|
||||
this.images = res.data.files.filter(e => (['jpeg', 'jpg', 'png'].includes(e.name.split('.')[1])))
|
||||
this.videos = res.data.files.filter(e => (['mp4'].includes(e.name.split('.')[1])))
|
||||
}
|
||||
})
|
||||
},
|
||||
preview(url, imgs) {
|
||||
uni.previewImage({
|
||||
urls: imgs.map((v) => v.url),
|
||||
current: url,
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
onLoad(o) {
|
||||
|
||||
this.id = o.id;
|
||||
this.getDetail()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -68,12 +76,12 @@ export default {
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
background: #FFF;
|
||||
padding: 0;
|
||||
}
|
||||
.imgs {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 20px 32px;
|
||||
box-sizing: border-box;
|
||||
margin-top: 24px;
|
||||
background: #FFF;
|
||||
|
||||
image,
|
||||
|
||||
Reference in New Issue
Block a user