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,10 +3,42 @@
<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-card>
<a-descriptions layout="vertical" :column="4">
<a-descriptions-item label="发布人">
{{ detailData.createName }}
</a-descriptions-item>
<a-descriptions-item label="动态内容">
{{ detailData.content }}
</a-descriptions-item>
<a-descriptions-item label="浏览数量">
{{ detailData.views }}
</a-descriptions-item>
<a-descriptions-item label="点赞数量">
{{ detailData.likes }}
</a-descriptions-item>
<a-descriptions-item label="发布时间">
{{ detailData.createDate }}
</a-descriptions-item>
<a-descriptions-item label="是否公开">
{{ detailData.isPublic === 1 ? "是" : "否" }}
</a-descriptions-item>
<a-descriptions-item label="是否可评论">
{{ 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>
</a-card>
</a-col>
<a-col class="img-box"> <a-col class="img-box">
<div class="title" v-if="detailData.imgList.length>0"></div>
<img <img
:src="$ImgUrl(img.url)" :src="$ImgUrl(img.url)"
class="contentImg" class="contentImg"
@ -14,44 +46,17 @@
:key="index" :key="index"
/> />
</a-col> </a-col>
<a-col :span="4"> <a-col>
<span class="title">发布者</span> <div class="title">关联话题</div>
<a-card style="width: 60%;margin:10px;border-radius:4px;height:190px;text-align:center"> <div class="topic-box">
<div><a-avatar :size="64" icon="user" /></div> <a-button
<div class="text-content" style="margin-top:20px">{{detailData.createName}}</div> class="topic"
</a-card> v-for="item in detailData.topicTags"
</a-col> :key="item.id"
<a-col :span="20"> >#{{ item.title }}</a-button
<span class="title">其他信息</span> >
<a-card style="width: 60%;margin:10px;border-radius:4px;height:190px"> </div>
<a-descriptions layout="vertical"> </a-col>
<a-descriptions-item label="浏览数量">
{{detailData.views}}
</a-descriptions-item>
<a-descriptions-item label="点赞数量">
{{detailData.likes}}
</a-descriptions-item>
<a-descriptions-item label="发布时间">
{{detailData.createDate}}
</a-descriptions-item>
<a-descriptions-item label="是否公开">
{{detailData.isPublic===1?'是':'否'}}
</a-descriptions-item>
<a-descriptions-item label="是否可评论">
{{detailData.isComment===1?'是':'否'}}
</a-descriptions-item>
</a-descriptions>
</a-card>
</a-col>
<a-col>
<div class="title">关联话题</div>
<div class='topic-box'>
<a-button class='topic'>#{{detailData.content}}</a-button>
<a-button class='topic'>#{{detailData.content}}</a-button>
<a-button class='topic'>#{{detailData.content}}</a-button>
<a-button class='topic'>#{{detailData.content}}</a-button>
</div>
</a-col>
</a-row> </a-row>
</div> </div>
</div> </div>
@ -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,
@ -292,18 +305,18 @@ export default {
width: 168px; width: 168px;
height: 92px; height: 92px;
border-radius: 4px; border-radius: 4px;
margin:10px; margin: 10px;
} }
.img-box{ .img-box {
display: flex; display: flex;
justify-content:flex-start; justify-content: flex-start;
} }
.topic-box{ .topic-box {
display: flex; display: flex;
justify-content:flex-start; justify-content: flex-start;
} }
.topic{ .topic {
margin:5px; margin: 5px;
border-radius:44px; border-radius: 44px;
} }
</style> </style>

Loading…
Cancel
Save