## 发布置顶帖
```json
{
"result": [{
"title": "2018端午放假通知",
"content": "放假时间为16号至18号,外出游玩请注意安全!",
"img": "1,2,3",
"read_record": "1",
"top": "1",
"top_start": "2018-06-11 08:30:00",
"top_end": "2018-06-19 23:59:59"
}]
}
```
| 字段 | 描述 |
| --- | --- |
| title | 置顶帖标题 |
| content | 置顶帖内容 |
| img | 图片ID列表(通过上传图片接口返回的ID) |
| read_record | 是否开启强制已读回复,值:0或1 |
| top | 是否置顶帖子,值:0或1 |
| top_start | 开始置顶时间 |
| top_end | 结束置顶时间 |
~~~[api]
post:/api/article/add
*string:result#置顶帖数据
<<<
success
{
"code": 1,
"msg": "发布成功",
"result": {
"user_id": 1,
"class_id": 1,
"title": "2018端午放假通知",
"content": "放假时间为16号至18号,外出游玩请注意安全!",
"read_record": 1,
"top": 1,
"top_start": "2018-06-11 08:30:00",
"top_end": "2018-06-19 23:59:59",
"create_time": "2018-06-12 17:37:07",
"update_time": "2018-06-12 17:37:07",
"id": "3"
}
}
<<<
error
{
"code": 0,
"msg": "班级不存在"
}
<<<
error
{
"code": 0,
"msg": "您不是本班班主任"
}
~~~