文档
测试

获取指定帖子

GET
/api/topic/帖子id

接口描述

获取指定帖子

响应参数

参数名
类型
描述
必填
code
int
状态码
必填
msg
string
提示信息
必填
data
object
返回数据
必填
_id
oid
数据库生成帖子id
必填
user
object
发帖人信息
必填
title
string
文章标题
必填
content
string
文章正文
必填
read
int
点击量/阅读量
必填
comments
int
评论数量
必填
praise
int
点赞数量
必填
text
string
文章文字部分
必填
images
object
文章的图片
必填

说明 / 示例

{ "code": 200, "msg": "获取帖子成功", "data": { "_id": "6351a615bfb9bee9045ddada", "user": { "_id": "634e49dd93c820e7944daf8a", "phone": "13471519332", "nickname": "新用户5pra5d6r", "avatar": "634f9ce5bd37fa952a4a5478", "headline": "这货没有个人介绍" }, "title": "11111", "content": "<p>1111<img src=\"http://localhost:8007/uploads/634e49dd93c820e7944daf8a/topicImg-1666295315193.png\" alt=\"topicImg-1666295315193.png\" data-href=\"\" style=\"\"/></p>", "text": "1111", "images": [ { "_id": "6351a613bfb9bee9045ddad7", "name": "topicImg-1666295315193.png", "url": "http://localhost:8007/uploads/topicImg-1666295315193.png", "user": "634e49dd93c820e7944daf8a" } ], "videos": [], "createdAt": "2022/10/21 03:48:26", "read": 0, "comments": 0, "praise": 0 } }