bibi 3 years ago
parent 94735ef4ae
commit d32aed83cd

@ -8,6 +8,13 @@ export function dynamicList(params) {
params: params, params: params,
}) })
} }
export function dynamicInfo(params) {
return httpService({
url: `/user/dynamic/findById`,
method: 'get',
params: params,
})
}
// 删除 // 删除
export function dynamicDel(params) { export function dynamicDel(params) {
return httpService({ return httpService({

@ -3,28 +3,16 @@
<div class="content"> <div class="content">
<div class="cardTitle">动态信息</div> <div class="cardTitle">动态信息</div>
<div class="content"> <div class="content">
<span class="title">动态内容</span>
<a-row> <a-row>
<a-col class="text-content">{{ detailData.content }}</a-col> <a-col>
<a-col class="img-box"> <a-card>
<img <a-descriptions layout="vertical" :column="4">
:src="$ImgUrl(img.url)" <a-descriptions-item label="发布人">
class="contentImg" {{ detailData.createName }}
v-for="(img, index) in detailData.imgList" </a-descriptions-item>
:key="index" <a-descriptions-item label="动态内容">
/> {{ detailData.content }}
</a-col> </a-descriptions-item>
<a-col :span="4">
<span class="title">发布者</span>
<a-card style="width: 60%;margin:10px;border-radius:4px;height:190px;text-align:center">
<div><a-avatar :size="64" icon="user" /></div>
<div class="text-content" style="margin-top:20px">{{detailData.createName}}</div>
</a-card>
</a-col>
<a-col :span="20">
<span class="title">其他信息</span>
<a-card style="width: 60%;margin:10px;border-radius:4px;height:190px">
<a-descriptions layout="vertical">
<a-descriptions-item label="浏览数量"> <a-descriptions-item label="浏览数量">
{{ detailData.views }} {{ detailData.views }}
</a-descriptions-item> </a-descriptions-item>
@ -35,21 +23,38 @@
{{ detailData.createDate }} {{ detailData.createDate }}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="是否公开"> <a-descriptions-item label="是否公开">
{{detailData.isPublic===1?'是':'否'}} {{ detailData.isPublic === 1 ? "是" : "否" }}
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="是否可评论"> <a-descriptions-item label="是否可评论">
{{detailData.isComment===1?'是':'否'}} {{ detailData.isComment === 1 ? "是" : "否" }}
</a-descriptions-item>
<a-descriptions-item label="点赞数">
{{ detailData.likes }}
</a-descriptions-item>
<a-descriptions-item label="浏览量">
{{ detailData.views }}
</a-descriptions-item> </a-descriptions-item>
</a-descriptions> </a-descriptions>
</a-card> </a-card>
</a-col> </a-col>
<a-col class="img-box">
<div class="title" v-if="detailData.imgList.length>0"></div>
<img
:src="$ImgUrl(img.url)"
class="contentImg"
v-for="(img, index) in detailData.imgList"
:key="index"
/>
</a-col>
<a-col> <a-col>
<div class="title">关联话题</div> <div class="title">关联话题</div>
<div class='topic-box'> <div class="topic-box">
<a-button class='topic'>#{{detailData.content}}</a-button> <a-button
<a-button class='topic'>#{{detailData.content}}</a-button> class="topic"
<a-button class='topic'>#{{detailData.content}}</a-button> v-for="item in detailData.topicTags"
<a-button class='topic'>#{{detailData.content}}</a-button> :key="item.id"
>#{{ item.title }}</a-button
>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -121,10 +126,12 @@ import {
commentList, commentList,
commentRecover, commentRecover,
commentDel, commentDel,
dynamicInfo,
} from "@/api/operation/dynamic"; } from "@/api/operation/dynamic";
export default { export default {
data() { data() {
return { return {
id: undefined,
detailData: {}, detailData: {},
tableData: [], tableData: [],
selectedRowKeys: [], selectedRowKeys: [],
@ -194,11 +201,17 @@ export default {
}; };
}, },
mounted() { mounted() {
this.detailData = this.$route.params.data; this.id = this.$route.params.data.id;
console.log(this.detailData);
this.getComment(); this.getComment();
this.getData();
}, },
methods: { methods: {
async getData() {
let res = await dynamicInfo({
communityDynamicId: this.id,
});
this.detailData = res.data;
},
async getComment() { async getComment() {
let res = await commentList({ let res = await commentList({
pageNum: this.pagination.current, pageNum: this.pagination.current,

Loading…
Cancel
Save