From b3bb77dfc0faf8f64cbbabcb5b711f21423d626f Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Fri, 17 Mar 2023 15:47:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/project/fengdu/AppCircle/AppCircle.vue | 2 +- src/project/fengdu/AppCircle/Detail.vue | 2 +- src/project/fengdu/AppCircle/MyPostList.vue | 108 +++++++++++-------- src/project/fengdu/AppCircle/TopicDetail.vue | 2 +- 4 files changed, 68 insertions(+), 46 deletions(-) diff --git a/src/project/fengdu/AppCircle/AppCircle.vue b/src/project/fengdu/AppCircle/AppCircle.vue index a490ea0..cba7f9d 100644 --- a/src/project/fengdu/AppCircle/AppCircle.vue +++ b/src/project/fengdu/AppCircle/AppCircle.vue @@ -26,7 +26,7 @@
- +

{{ item.createUserName }}

{{ item.publishDepartName }} diff --git a/src/project/fengdu/AppCircle/Detail.vue b/src/project/fengdu/AppCircle/Detail.vue index e8190b8..221c2dc 100644 --- a/src/project/fengdu/AppCircle/Detail.vue +++ b/src/project/fengdu/AppCircle/Detail.vue @@ -2,7 +2,7 @@
- +

{{ info.createUserName }}

{{ info.publishDepartName }} diff --git a/src/project/fengdu/AppCircle/MyPostList.vue b/src/project/fengdu/AppCircle/MyPostList.vue index 733b9f9..ba56960 100644 --- a/src/project/fengdu/AppCircle/MyPostList.vue +++ b/src/project/fengdu/AppCircle/MyPostList.vue @@ -3,100 +3,96 @@
- -

李在天

+ +

{{ user.nickName }}

发贴
发贴 -

23

+

{{ totalInfo['发帖'] }}

点赞 -

23

+

{{ totalInfo['点赞'] }}

评论 -

23

+

{{ totalInfo['评论'] }}

-
+
- +
-

李在地

- 清风街道 +

{{ item.createUserName }}

+ {{ item.publishDepartName }}
- +
- #【闲置物品交易】 - 社家用闲置柜子自用,原价212,现价80要的联系 + #【{{ item.topicName }}】 + {{ item.content }}
-
- - - +
+
-

2020-12-11 10:10

+

{{ item.createTime }}

- 10 + {{ item.sharedCount }}
- 10 + {{ item.appreciateCount }}
- 10 + {{ item.commentCount }}
-
+
- +
-

李在地

- 清风街道 +

{{ item.createUserName }}

+ {{ item.publishDepartName }}
- #【闲置物品交易】 - 社家用闲置柜子自用,原价212,现价80要的联系 + #【{{ item.topicName }}】 + {{ item.content }}
-
- - - +
+
-

2020-12-11 10:10

+

{{ item.createTime }}

- 10 + {{ item.sharedCount }}
- 10 + {{ item.appreciateCount }}
- 10 + {{ item.commentCount }}
-
+
2020-12-11 10:10 @@ -117,6 +113,7 @@
+
@@ -129,8 +126,11 @@ data () { return { - currIndex: 2, - totalInfo: {} + currIndex: 0, + totalInfo: {}, + list: [], + isMore: false, + current: 1 } }, @@ -140,6 +140,7 @@ onLoad () { this.getTopicList() + this.getInfo() }, methods: { @@ -158,6 +159,29 @@ }) }, + getInfo () { + this.$instance.post(`/app/appneighborhoodassistance/wechatInfo`).then(res => { + if (res.code === 0) { + this.totalInfo = res.data + } + }) + }, + + remove (id) { + this.$dialog.confirm({ + title: '温馨提示', + content: '您确定删除该帖子吗?' + }).then(() => { + this.$instance.post(`/app/appneighborhoodassistance/delete?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 @@ -180,10 +204,10 @@ this.$loading() this.$instance.post(`/app/appneighborhoodassistance/list`, null, { params: { - withoutToken: this.token ? false : true, current: this.current, size: 10, - visibleRange: this.currIndex === 0 ? 1 : 0 + listType: 1, + createUserId: this.user.id } }).then(res => { if (res.code === 0) { @@ -225,10 +249,9 @@ this.$loading() this.$instance.post(`/app/appneighborhoodassistance/list`, null, { params: { - withoutToken: this.token ? false : true, current: this.current, size: 10, - visibleRange: this.currIndex === 0 ? 1 : 0 + listType: 2 } }).then(res => { if (res.code === 0) { @@ -270,10 +293,9 @@ this.$loading() this.$instance.post(`/app/appneighborhoodassistance/list`, null, { params: { - withoutToken: this.token ? false : true, current: this.current, size: 10, - visibleRange: this.currIndex === 0 ? 1 : 0 + listType: 1 } }).then(res => { if (res.code === 0) { diff --git a/src/project/fengdu/AppCircle/TopicDetail.vue b/src/project/fengdu/AppCircle/TopicDetail.vue index b457fd7..4b07190 100644 --- a/src/project/fengdu/AppCircle/TopicDetail.vue +++ b/src/project/fengdu/AppCircle/TopicDetail.vue @@ -13,7 +13,7 @@ :key="index" @click="$linkTo('./Detail?isFrom=topic&id=' + item.id + '&name=' + name + '&themeId=' + themeId)">
- +

{{ item.createUserName }}

{{ item.publishDepartName }}