From d32aed83cdc42872871cb2b17d5f0af0fd61f690 Mon Sep 17 00:00:00 2001 From: bibi <541660090@qq.com> Date: Tue, 1 Mar 2022 13:37:47 +0800 Subject: [PATCH] 1 --- src/api/operation/dynamic/index.js | 7 ++ src/views/Operation/BBS/_dynamic/detail.vue | 119 +++++++++++--------- 2 files changed, 73 insertions(+), 53 deletions(-) diff --git a/src/api/operation/dynamic/index.js b/src/api/operation/dynamic/index.js index 868232d..b51c0c5 100644 --- a/src/api/operation/dynamic/index.js +++ b/src/api/operation/dynamic/index.js @@ -8,6 +8,13 @@ export function dynamicList(params) { params: params, }) } +export function dynamicInfo(params) { + return httpService({ + url: `/user/dynamic/findById`, + method: 'get', + params: params, + }) +} // 删除 export function dynamicDel(params) { return httpService({ diff --git a/src/views/Operation/BBS/_dynamic/detail.vue b/src/views/Operation/BBS/_dynamic/detail.vue index 7ff0796..626e9e6 100644 --- a/src/views/Operation/BBS/_dynamic/detail.vue +++ b/src/views/Operation/BBS/_dynamic/detail.vue @@ -3,10 +3,42 @@
动态信息
- 动态内容 - {{ detailData.content }} + + + + + {{ detailData.createName }} + + + {{ detailData.content }} + + + {{ detailData.views }} + + + {{ detailData.likes }} + + + {{ detailData.createDate }} + + + {{ detailData.isPublic === 1 ? "是" : "否" }} + + + {{ detailData.isComment === 1 ? "是" : "否" }} + + + {{ detailData.likes }} + + + {{ detailData.views }} + + + + +
动态图片
- - 发布者 - -
-
{{detailData.createName}}
-
-
- - 其他信息 - - - - {{detailData.views}} - - - {{detailData.likes}} - - - {{detailData.createDate}} - - - {{detailData.isPublic===1?'是':'否'}} - - - {{detailData.isComment===1?'是':'否'}} - - - - - -
关联话题
-
- #{{detailData.content}} - #{{detailData.content}} - #{{detailData.content}} - #{{detailData.content}} -
-
+ +
关联话题
+
+ #{{ item.title }} +
+
@@ -121,10 +126,12 @@ import { commentList, commentRecover, commentDel, + dynamicInfo, } from "@/api/operation/dynamic"; export default { data() { return { + id: undefined, detailData: {}, tableData: [], selectedRowKeys: [], @@ -194,11 +201,17 @@ export default { }; }, mounted() { - this.detailData = this.$route.params.data; - console.log(this.detailData); + this.id = this.$route.params.data.id; this.getComment(); + this.getData(); }, methods: { + async getData() { + let res = await dynamicInfo({ + communityDynamicId: this.id, + }); + this.detailData = res.data; + }, async getComment() { let res = await commentList({ pageNum: this.pagination.current, @@ -292,18 +305,18 @@ export default { width: 168px; height: 92px; border-radius: 4px; - margin:10px; + margin: 10px; } -.img-box{ - display: flex; - justify-content:flex-start; +.img-box { + display: flex; + justify-content: flex-start; } -.topic-box{ - display: flex; - justify-content:flex-start; +.topic-box { + display: flex; + justify-content: flex-start; } -.topic{ - margin:5px; - border-radius:44px; +.topic { + margin: 5px; + border-radius: 44px; } - \ No newline at end of file +