[关闭]
@apis1990 2016-11-03T03:07:48.000000Z 字数 1335 阅读 599

嘻哈头条


获取分类列表


1.URL:/service/api/get_cate_article_list.php

测试地址:http://36.33.24.119:8081/api/get_cate_article_list.php

2.请求方式:POST

3.请求参数:

参数 类型 是否必须 描述
cid int 分类id
page int 可选 分页码

4.接口返回结果

  1. {
  2. "code": 200,
  3. "data": {
  4. "cate_list": [
  5. {
  6. "taxonomy_id": "8",
  7. "name": "香车美女",
  8. "count": "1",
  9. "description": "",
  10. "slug": "car-beauty"
  11. }
  12. ],
  13. "article_list": [
  14. {
  15. "article_id": "117",
  16. "post_author_id": "1",
  17. "post_author_name": "xihatoutiao",
  18. "is_recommend": 1,
  19. "post_title": "嘻哈头条1",
  20. "post_date": "2016-03-17 10:31:05",
  21. "post_timestamp": 1458181865,
  22. "post_time_tag": "2天前", // 文章发表时间标记
  23. "post_excerpt": "文章摘要测试1,稍后请重新编辑",
  24. "display_type": 2,
  25. "is_ads": 1,
  26. "resource_info": {
  27. "img_arr": [
  28. "http://p2.pstatp.com/large/10900095c31ee527f7e?123.jpg",
  29. "http://p2.pstatp.com/large/14e00030922fc3fd194?123.jpg",
  30. "http://p2.pstatp.com/large/14d00030923daf48a5e?123.jpg"
  31. ],
  32. "thumbnail_img": ""
  33. },
  34. "comment_count": "0"
  35. }
  36. ]
  37. }
  38. }
参数 类型 描述
code int 状态码:200 --- 成功 其它 --- 异常
data array 返回数据集
- - -
cate_list array 分类列表
taxonomy_id int 分类id
name string 分类名称
count int 分类下的文章数
description string 分类的描述
slug string 分类的别名,一般为英文
- - -
article_list array 文章列表
article_id int 文章id
post_author_id int 文章著作者id
post_author_name string 文章著作者姓名
is_recommend int 1:推荐, 2:非推荐
post_title string 文章标题
post_date date 文章发表日期
post_timestamp int 文章发表的unix时间chuo
post_excerpt string 文章的摘要
display_type int (1:标题+缩略图,2: 标题+三张高清大图,3:保留 4:仅有标题)
is_ads int 1: 不是广告推广, 2: 是广告推广
resource_info array 资源信息,img_arr:高清大图, thumbnamil_img:缩略图
comment_count int 文章下的评论总数
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注