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

获取文章详情


接口功能

获取文章详情

URL

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

支持格式

JSON

HTTP请求方式

GET

请求参数

接口示例

地址:http://ceshi2.dishait.cn/api/v1/post/2

json5
{
    "msg": "获取成功",
    "data": {
        "detail": {
            "id": 2,
            "user_id": 7,
            "title": "测试2",
            "titlepic": "",
            "content": "uni-app ... 等多个平台。",
            "sharenum": 0,
            "path": "广东佛山",
            "type": 0,
            "create_time": 1557581053,
            "post_class_id": 1,
            "share_id": 1,
            "isopen": 1,
            "status": 1,
            "user": {
                "id": 7,
                "username": "zcmcss",
                "userpic": null,
                "userinfo": {
                    "id": 1,
                    "user_id": 7,
                    "age": 0,
                    "sex": 2,
                    "qg": 0,
                    "job": null,
                    "path": null,
                    "birthday": null
                }
            },
            "images": [
                {
                    "url": "http://...png",
                    "pivot": {
                        "id": 4,
                        "post_id": 2,
                        "image_id": 4,
                        "create_time": null
                    }
                },
                // ...
            ],
            "share": {
                "id": 1,
                "user_id": 12,
                "title": "最前...",
                "titlepic": "",
                "content": "uni-app ... 等多个平台。",
                "sharenum": 0,
                "path": "广东深圳",
                "type": 0,
                "create_time": 1559297892,
                "post_class_id": 1,
                "share_id": 0,
                "isopen": 1,
                "status": 1
            }
        }
    }
}