This commit is contained in:
yanran200730
2023-03-20 10:02:00 +08:00
parent 5ea84f0c5f
commit d2941ceb96
4 changed files with 53 additions and 14 deletions

View File

@@ -18,7 +18,7 @@
<image :src="item.picUrl" mode="aspectFill" />
<h2>{{ item.title }}</h2>
</div>
<div class="nav-item" @click="$linkTo('./Topic')" v-if="topicList.length > 7">
<div class="nav-item" hover-class="text-hover" @click="$linkTo('./Topic')" v-if="topicList.length > 6">
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-more.png" />
<h2>更多</h2>
</div>

View File

@@ -5,7 +5,7 @@
<image :src="info.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" />
<div class="right">
<h3>{{ info.createUserName }}</h3>
<span v-if="item.publishDepartName">{{ info.publishDepartName }}</span>
<span v-if="info.publishDepartName">{{ info.publishDepartName }}</span>
</div>
</div>
<div class="item-content">

View File

@@ -66,6 +66,7 @@
<h3>{{ item.createUserName }}</h3>
<span v-if="item.publishDepartName">{{ item.publishDepartName }}</span>
</div>
<image @click="removeComment(item.id)" class="remove" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-delete.png" />
</div>
<div class="item-content">
<span v-if="item.themeId" @click.stop="$linkTo('./TopicDetail?themeId=' + item.themeId + '&name=' + item.topicName)">#{{ item.topicName }}</span>
@@ -94,21 +95,24 @@
<div class="comment" v-if="currIndex === 2">
<div class="comment-item" v-for="(item, index) in list" :key="index">
<div class="comment-top">
<span>2020-12-11 10:10</span>
<image src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-delete.png" />
<span>{{ item.myComment.createTime }}</span>
<image @click="removeComment(item.id)" class="remove" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-delete.png" />
</div>
<p>联系方式</p>
<p>{{ item.myComment.content }}</p>
<div class="bottom">
<div class="item-top">
<image class="avatar" src="https://cdn.cunwuyun.cn/wxmp/fengdu/ic-fangwuchuzu.png" />
<image class="avatar" :src="item.createUserAvatar || 'https://cdn.cunwuyun.cn/wxmp/fengdu/avatar.png'" />
<div class="right">
<h3>李在地</h3>
<span>清风街道</span>
<h3>{{ item.createUserName }}</h3>
<span v-if="item.publishDepartName">{{ item.publishDepartName }}</span>
</div>
</div>
<div class="item-content">
<span @click="$linkTo('./TopicDetail')">#闲置物品交易</span>
<text>社家用闲置柜子自用原价212现价80要的联系</text>
<span v-if="item.themeId">#{{ item.topicName }}</span>
<text>{{ item.content }}</text>
</div>
<div class="item-imgs" v-if="item.files.length">
<image mode="aspectFill" v-for="(item, index) in item.files" :key="index" :src="item.url" />
</div>
</div>
</div>
@@ -182,6 +186,21 @@
}).catch(() => {})
},
removeComment (id) {
this.$dialog.confirm({
title: '温馨提示',
content: '您确定删除吗?'
}).then(() => {
this.$instance.post(`/app/appneighborhoodassistance/delComment?id=${id}`).then(res => {
if (res.code === 0) {
this.$toast('删除成功!')
this.getInfo()
this.changeTab(this.currIndex)
}
})
}).catch(() => {})
},
changeTab (index) {
this.currIndex = index
this.isMore = false
@@ -504,7 +523,7 @@
}
.item-content {
margin-top: 16px 0;
margin: 16px 0;
line-height: 1.3;
text-align: justify;
@@ -517,6 +536,21 @@
font-size: 28px;
color: #333333;
}
.item-imgs {
display: flex;
align-items: center;
image {
flex: 1;
height: 202px;
margin-right: 12px;
&:nth-of-type(3n) {
margin-right: 0;
}
}
}
}
}
}

View File

@@ -1,6 +1,11 @@
<template>
<div class="Topic">
<div class="Topic-item" v-for="(item, index) in list" :key="index" @click="toTopicDetail(item.id)">
<div
class="Topic-item"
v-for="(item, index) in list"
:key="index"
hover-class="text-hover"
@click="$linkTo('./TopicDetail?themeId=' + item.id + '&name=' + item.title)">
<h2>#{{item.title}}</h2>
<span>去看看</span>
</div>
@@ -27,7 +32,7 @@
methods: {
getList() {
if (this.current > this.pages) return
this.$instance.post(`/app/appneighborhoodassistancetheme/list&current=${this.current}&size=20`).then(res => {
this.$instance.post(`/app/appneighborhoodassistancetheme/list?current=${this.current}&size=20`).then(res => {
if (res.code === 0 && res.data) {
const list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
this.pages = Math.ceil(res.data.total / 10)
@@ -62,7 +67,7 @@
display: flex;
align-items: center;
justify-content: space-between;
padding: 40px 32px;
padding: 20px 32px;
h2 {
font-size: 30px;