Skip to content

社群帖子列表

1 接口名称

社群帖子列表

2 接口描述

3 请求地址

plain
{apiAddress}/openapi/v2/forum/thread/list?connectNo=e000b5743a866438&current=1&visible=1&size=3&endDate=2023-05-01&signature=8e82a50475b701567a926b9ef1c7cb84&appkey=cblzs&forumId=36&startDate=2020-01-01&noncestr=1681797831343&status=5&timestamp=1681797831343

4 请求方式

GET

5 请求参数

5.1 Query Params 参数

字段类型参数含义是否必须
connectNoString租户唯一标识
forumIdLong板块id
statusInteger状态( 0:全部,3:审核未通过 4:待审核 5:已发布)
visibleInteger是否显示(0 隐藏,1 显示)
startDateString开始日期(格式:yyyy-MM-dd)
endDateString结束日期(格式:yyyy-MM-dd)
currentInteger当前页码。默认:1
sizeInteger每页数量。默认:20

6 返回参数

6.1参数描述

字段类型说明
codeint返回编码 0 成功
dataobject结构体
recordsarray帖子列表
idlong帖子id
thread_titlestring帖子标题
thread_contentstring帖子内容
attachmentsstring帖子题图
account_idstring用户id
account_namestring用户昵称
account_portraitstring用户头像
account_mobilestring用户手机号码
forum_idlong板块id
read_countint阅读数
like_countint点赞数
comment_countint评论数
location_namestring发帖人位置
comment_optionint评论选项,0:不允许评论 1:评论先发后审核 2:评论先审后发
fixed_ranklong固定位排序
sort_ranklong排序值
created_atlong创建时间
updated_atlong更新时间
statusint帖子状态
user_createdint是否是真实用户创建,0:为管理端创建,1:为客户端创建
coverstring媒资视频封面图
video_idint视频id
tenant_idlong租户id
ipstring发帖ip
regionstring归属地

6.2参数示例

json
{
  "code": 0,
  "data": {
    "data": {
      "records": [
        {
          "id": 1811,
          "thread_title": "帖子标题",
          "thread_content": "这个是帖子内容呀!",
          "attachments": "",
          "account_id": "619f48ba63044039defa27ba",
          "account_name": "之前名字不规范",
          "account_portrait": "https://preimg.tmuyun.com/assets/20200402/1585793937232_5e854b9183c7667b5dcef238.jpeg",
          "account_mobile": "13123864419",
          "forum_id": 36,
          "like_count": 0,
          "read_count": 0,
          "comment_count": 0,
          "location_name": "地址",
          "comment_option": 1,
          "fixed_rank": 0,
          "sort_rank": 1662534521528,
          "created_at": 1662534522000,
          "updated_at": 1662540233000,
          "status": 5,
          "user_created": 1,
          "cover": "",
          "video_id": 0,
          "tenant_id": 6,
          "ip": "115.233.209.97",
          "region": "浙江"
        }
      ],
      "total": 4,
      "size": 3,
      "current": 1,
      "orders": [],
      "optimize_count_sql": true,
      "search_count": true,
      "pages": 2
    }
  }
}

7 备注

成功返回code是0,非0时均为失败。