获得分类的文章列表接口

接口地址

http://www.brighttj.com/api/index.php/api/article/articleByCategoryId

请求方式

GET / POST

入参

参数名称 参数含义 参数类型 是否必须 备注
categoryId 分类id int
page 页码 int
pageSize 每页大小 int 默认15条

出参

{
    "data":{
        "articleList":[
            {
                "id":"309",
                "date":"2014-04-21 12:44:38",
                "title":"【THINKPHP】多入口与单入口模式",
                "commentcount":"0",
                "views":"85",
                "author":{
                    "name":"唐嘉蓉",
                    "id":"3"
                },
                "categorys":[{
                    "id":"49",
                    "name":"ios",
                    "count":"52"
                }]
            }
        ]
    },
    "msg":"读取成功",
    "status":1
}

字段解析

参数名称 参数含义 参数类型
articleList 文章信息列表 array
id 文章id int
date 文章发布时间 string
title 文章标题 string
commentCount 文章评论量 int
views 文章浏览量 int
author 作者信息 map/dictionary
author[id] 作者名称 int
author[name] 作者名称 string
categorys 文章所属分类列表 array
category[id] 文章分类id int
category[name] 文章分类名称 string
category[count] 分类中文章数量 int