From 8614b5a369c0207e3f9e786f2d1b5d1209df7d50 Mon Sep 17 00:00:00 2001 From: liuye Date: Thu, 16 Mar 2023 14:41:48 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=BB=E9=87=8C=E4=BA=92=E5=8A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/fengdu/app/AppHelp/components/Add.vue | 2 +- .../fengdu/app/AppHelp/components/Detail.vue | 88 ++++++++++++------- project/fengdu/app/AppPageSet/AppPageSet.vue | 2 +- .../app/AppSubjectSet/components/Add.vue | 13 ++- 4 files changed, 69 insertions(+), 36 deletions(-) diff --git a/project/fengdu/app/AppHelp/components/Add.vue b/project/fengdu/app/AppHelp/components/Add.vue index a1ea9475..5fc9ad14 100644 --- a/project/fengdu/app/AppHelp/components/Add.vue +++ b/project/fengdu/app/AppHelp/components/Add.vue @@ -17,7 +17,7 @@ - + --> -
+
评论
-
+
- +
-

张三

- 2023-03-16 09:34:02 +

{{item.createUserName}}

+ {{item.createTime}}
-

评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容评论内容

-
删除
+

{{item.content}}

+
删除
-
-
+
+
- 李四回复张三 + {{reply.createUserName}}回复{{item.createUserName}}
- 2023-03-16 09:34:02 + {{reply.createTime}}
-

评论回复评论回复评论回复评论回复评论回复评论回复评论回复评论回复评论回复评论回复评论回复评论回复

-
删除
+

{{reply.content}}

+
删除
-
- {{isShowMore ? '收起' : `展开3条回复`}} +
+ {{item.isShowReply ? '收起' : `展开${item.replyList.length}条回复`}}
+ 暂无评论 @@ -83,7 +84,6 @@ return { commontList: [], info: {}, - isShowMore: false } }, @@ -100,8 +100,11 @@ methods: { getList() { - this.instance.post(`/app/appneighborhoodassistance/commontList?id=${this.params.id}`).then(res => { + this.instance.post(`/app/appneighborhoodassistance/commontList?id=${this.params.id}&size=100`).then(res => { if (res.code == 0) { + res.data.records.map((item) => { + item.isShowReply = false + }) this.commontList = res.data.records } }) @@ -122,6 +125,28 @@ type: 'List', isRefresh: true }) + }, + + delCommont(row) { + this.$confirm('确定删除该评论?').then(() => { + this.instance.post(`/app/appneighborhoodassistance/delete?id=${id}`).then(res => { + if (res.code == 0) { + this.$message.success('删除成功!') + this.getList() + } + }) + }) + }, + + delReply(row, indexs) { + this.$confirm('确定删除该回复?').then(() => { + this.instance.post(`/app/appneighborhoodassistance/delete?id=${id}`).then(res => { + if (res.code == 0) { + this.$message.success('删除成功!') + this.getList() + } + }) + }) } } } @@ -134,16 +159,16 @@ display: flex; margin-bottom: 8px; img { - width: 80px; - height: 80px; + width: 60px; + height: 60px; margin-right: 16px; border-radius: 50%; } .info { - width: calc(100% - 96px); + width: calc(100% - 76px); h2 { - font-size: 24px; - line-height: 40px; + font-size: 20px; + line-height: 30px; font-weight: 400; } .time-flex { @@ -151,7 +176,7 @@ justify-content: space-between; color: #999; font-size: 14px; - line-height: 40px; + line-height: 30px; .area-name { color: #666; } @@ -182,18 +207,18 @@ display: flex; margin-bottom: 8px; img { - width: 80px; - height: 80px; + width: 60px; + height: 60px; margin-right: 16px; border-radius: 50%; } .info-flex { - width: calc(100% - 96px); + width: calc(100% - 76px); display: flex; justify-content: space-between; + line-height: 60px; h2 { - font-size: 24px; - line-height: 40px; + font-size: 20px; font-weight: 400; } span { @@ -207,6 +232,7 @@ font-size: 16px; line-height: 30px; margin-bottom: 8px; + padding-left: 76px; p { width: calc(100% - 50px); word-break: break-all; @@ -215,6 +241,7 @@ color: #26f; width: 50px; text-align: right; + cursor: pointer; } } .reply-list { @@ -223,13 +250,11 @@ margin-bottom: 8px; .reply-user { font-size: 14px; - margin-bottom: 8px; img { width: 50px; height: 50px; border-radius: 50%; vertical-align: middle; - margin-right: 8px; } .reply-name { display: inline-block; @@ -248,11 +273,12 @@ .content-flex { font-size: 14px; line-height: 24px; + padding-left: 58px; } } } .reply-more { - font-size: 16px; + font-size: 14px; line-height: 28px; color: #333; .line { diff --git a/project/fengdu/app/AppPageSet/AppPageSet.vue b/project/fengdu/app/AppPageSet/AppPageSet.vue index 396b398b..d21593c7 100644 --- a/project/fengdu/app/AppPageSet/AppPageSet.vue +++ b/project/fengdu/app/AppPageSet/AppPageSet.vue @@ -63,7 +63,7 @@ - + diff --git a/project/fengdu/app/AppSubjectSet/components/Add.vue b/project/fengdu/app/AppSubjectSet/components/Add.vue index 7e9d0f1d..b19e7f5d 100644 --- a/project/fengdu/app/AppSubjectSet/components/Add.vue +++ b/project/fengdu/app/AppSubjectSet/components/Add.vue @@ -9,13 +9,14 @@