This commit is contained in:
花有清香月有阴
2021-12-23 16:00:53 +08:00
parent d02c703838
commit 28252ec5ed
4 changed files with 182 additions and 480 deletions

View File

@@ -2,7 +2,7 @@
<div class="page">
<div class="header-content">
<div class="header-top">
<img :src="detail.url[0].url" alt="" />
<img :src="detail.url && detail.url[0].url" alt="" />
</div>
<div class="header-middle">
@@ -104,7 +104,7 @@
</div>
<AiFixedBtn>
<div class="addBtn iconfont iconfont-iconfangda" @tap.stop="toAdd()" />
<div class="addBtn iconfont iconfont-iconfangda" @tap.stop="AddPosts()" />
</AiFixedBtn>
</div>
</template>
@@ -140,6 +140,10 @@ export default {
this.$dict.load(['villageActivityStatus']).then(() => {
this.getDetail()
})
uni.$on('refresh', () => {
this.getListInit()
})
},
methods: {
getDetail() {
@@ -154,32 +158,43 @@ export default {
console.log(this.detail.url)
}
}
this.getActiveList()
}
})
},
getListInit() {
this.current == 1
this.getActiveList()
},
getActiveList() {
this.$http.post(`/app/apppostinfo/list?activityId=${this.id}`).then((res) => {
if (res?.data) {
// this.activeList = res.data.records
// if (this.activeList) {
// let imagesList = []
// this.activeList.map((item) => {
// if (item.images) {
// item.images = JSON.parse(item.images || '[]')
// imagesList.push(item.images)
// }
// return item
// })
// this.imgList = imagesList
// }
this.activeList = res.data.records
if (this.activeList) {
let imagesList = []
this.activeList.map((item) => {
if (item.images) {
item.images = JSON.parse(item.images || '[]')
imagesList.push(item.images)
}
return item
})
this.imgList = imagesList
}
}
})
},
change(index) {
this.current = index
if (this.current == 1) {
this.getActiveList()
}
},
AddPosts() {
uni.navigateTo({ url: `./AddPosts` })
},
previewImage(images, img) {
@@ -414,63 +429,21 @@ export default {
}
}
.addicon {
position: fixed;
bottom: 280px;
right: 30px;
background: #fefefe;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
border-radius: 50%;
padding: 26px 24px 22px 24px;
}
.btn {
position: fixed;
bottom: 0;
width: 100%;
// height: 112px;
background: #f3f6f9;
display: flex;
justify-content: space-between;
padding: 32px 0;
text-align: center;
.edit {
width: 254px;
height: 92px;
line-height: 92px;
background: #ffffff;
border-radius: 8px;
border: 2px solid #3671ee;
font-size: 34px;
font-weight: 500;
color: #3671ee;
margin-left: 32px;
}
.public {
width: 400px;
line-height: 92px;
border-radius: 8px;
font-size: 34px;
font-weight: 500;
color: #ffffff;
margin-right: 32px;
}
.max {
margin: 0 auto;
width: 686px;
height: 92px;
line-height: 92px;
background: #cbddf9;
border-radius: 8px;
font-size: 34px;
font-weight: 500;
color: #ffffff;
.AiFixedBtn {
.movableArea {
.addBtn {
display: flex;
justify-content: center;
align-items: center;
width: 96px;
height: 96px;
flex-shrink: 0;
background: #fff;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
font-size: 48px;
color: #1365dd;
border-radius: 50%;
}
}
}
}