Skip to content
关注公众号,获取新课通知
【重要通知】uniapp实战社区交友交流群更换为:602180461,靓仔/靓女可以重新申请加入哦~

发布文章


接口功能

发布文章

URL

http://ceshi2.dishait.cn/api/v1/post/create

支持格式

JSON

HTTP请求方式

POST

HEADERS
参数必选类型说明
tokentruestringtoken
Content-Typetruestringapplication/json
请求参数(直接上例子)
json5
{
	"imglist":[
		{
            "id": "19"
        },
        // ...
	],
	"text":"...",
	"isopen":1,
	"topic_id":1,
	"post_class_id":1
}
接口示例

地址:https://ceshi2.dishait.cn/api/v1/post/create

json5
{
    "msg": "发布成功",
    "data": {
        "detail": {
            "id": 21,
            "user_id": 14,
            "title": "12132",
            "titlepic": "",
            "content": "12132",
            "sharenum": 0,
            "path": "未知",
            "type": 0,
            "create_time": 1560867282,
            "post_class_id": 1,
            "share_id": 0,
            "isopen": 1,
            "status": 1,
            "user": {
                "id": 14,
                "username": "123456",
                "userpic": null,
                "userinfo": {
                    "id": 5,
                    "user_id": 14,
                    "age": 0,
                    "sex": 2,
                    "qg": 0,
                    "job": null,
                    "path": null,
                    "birthday": null
                }
            },
            "images": [
                // ...
            ],
            "share": null
        }
    }
}