乡村相册 接口对接
This commit is contained in:
@@ -40,11 +40,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="photo-item__wrapper">
|
||||
<div class="photo-item" @click="linkTo('./Photo')" v-for="(group, index) in list" :key="index">
|
||||
<image src="https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/64f71761d2b04746ad640a43706a92e4~tplv-k3u1fbpfcp-zoom-crop-mark:1304:1304:1304:734.awebp?" @click="preview(item.url)" mode="aspectFill" />
|
||||
<div class="photo-item" @click="linkTo('./Photo?url=' + item.photoUrl + '&id=' + item.id)" v-for="(item, index) in list" :key="index">
|
||||
<image :src="item.photoUrl" mode="aspectFill" />
|
||||
<div class="photo-item__text">
|
||||
<h2>张三</h2>
|
||||
<p>02-12 12:32</p>
|
||||
<p>{{ item.createTime }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length"></AiEmpty>
|
||||
@@ -95,10 +95,15 @@
|
||||
uni.$on('change', () => {
|
||||
this.getInfo(query.id)
|
||||
})
|
||||
|
||||
uni.$on('update', () => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
onUnload () {
|
||||
uni.$off('change')
|
||||
uni.$off('update')
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -116,18 +121,6 @@
|
||||
})
|
||||
},
|
||||
|
||||
preview (url) {
|
||||
let imgs = []
|
||||
this.list.forEach(item => {
|
||||
imgs = [...imgs, ...item.list.map(v => v.url)]
|
||||
})
|
||||
|
||||
uni.previewImage({
|
||||
urls: imgs,
|
||||
current: url
|
||||
})
|
||||
},
|
||||
|
||||
getTotalInfo (id) {
|
||||
this.$http.post(`/api/appalbumphoto/photoDetail?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
@@ -210,7 +203,7 @@
|
||||
}
|
||||
|
||||
p {
|
||||
color: #898482;
|
||||
color: #fff;
|
||||
font-size: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user