| 596 | | ==== 7.1 百科一二级列表 ==== |
| 597 | | {{{ |
| 598 | | 备注:获取百科一二级列表数据 |
| 599 | | 接口开发:吴全贵 |
| 600 | | 原始URL: |
| 601 | | 请求URL: |
| 602 | | HTTP请求方式:get |
| 603 | | 是否需要登录:否 |
| 604 | | 返回格式:JSON |
| 605 | | 缓存方式:无 |
| 606 | | 缓存时间:无 |
| 607 | | 请求参数: |
| 608 | | |
| 609 | | 返回参数: |
| 610 | | { |
| 611 | | "status": 0, //状态码 0正常返回 非0请求错误 |
| 612 | | "desc": "", //提示信息 status=0提示信息为空;status非0,给出对应的出错提示信息 |
| 613 | | "count": //一级分类数量 |
| 614 | | "list": |
| 615 | | [ |
| 616 | | { |
| 617 | | "name": //string,一级分类名 |
| 618 | | "hasChildren": //bool,是否有二级分类 |
| 619 | | "id": //一级分类id |
| 620 | | "url": //string,一级分类页对应url,如果hasChildren为false必须提供 |
| 621 | | "childrenCount": //int,二级分类数量,如果hasChildren为true必须提供 |
| 622 | | "list":[ |
| 623 | | { |
| 624 | | "name": //string,二级分类名 |
| 625 | | "hasChildren”: //bool,是否有三级分类 |
| 626 | | "url": //string,二级分类页对应url, 如果hasChildren为false必须提供 |
| 627 | | "id": //二级分类id |
| 628 | | "childrenCount": //int,三级分类数量如果hasChildren为true必须提供 |
| 629 | | } …… |
| 630 | | ] |
| 631 | | } ...... |
| | 596 | ==== 7.1 百科一二级、三四级列表 ==== |
| | 597 | {{{ |
| | 598 | 备注:获取百科一二级、三四级列表数据(接口已完成,使用请连开发机代理) |
| | 599 | 接口开发:陈子洋、吴全贵 |
| | 600 | mrobot接口URL:http://mrobot.pcbaby.com.cn/v2/qzbd/catalog?type={type}&cId={cId} |
| | 601 | 后端原始URL: |
| | 602 | 一二级:http://baike.pcbaby.com.cn/intf/app/3.0/content_wiki_101.jsp |
| | 603 | 三四级:http://baike.pcbaby.com.cn/intf/app/3.0/content_wiki_102.jsp?cId={cId} |
| | 604 | HTTP请求方式:get |
| | 605 | 是否需要登录:否 |
| | 606 | 返回格式:JSON |
| | 607 | 是否缓存:是 |
| | 608 | 缓存时间:15分钟 |
| | 609 | 请求参数: |
| | 610 | type:type=one-two表示一二级列表,type=three-four表示三四级列表 |
| | 611 | cId:二级分类id,当type=three-four时,需要传cId |
| | 612 | 返回参数: |
| | 613 | 一二级: |
| | 614 | { |
| | 615 | "status": 0, 状态码 0正常返回 非0请求错误 |
| | 616 | "desc": "", 提示信息 status=0提示信息为空;status非0,给出对应的出错提示信息 |
| | 617 | "count": 一级分类数量 |
| | 618 | "list": |
| | 619 | [ |
| | 620 | { |
| | 621 | "name": string,一级分类名 |
| | 622 | "hasChildren": bool,是否有二级分类 |
| | 623 | "id": 一级分类id |
| | 624 | "url": string,一级分类页对应url,如果isHaveSecondSort为false必须提供 |
| | 625 | "childrenCount": int,二级分类数量,如果isHaveSecondSort为true必须提供 |
| | 626 | "list":[ |
| | 627 | { |
| | 628 | "name": sting,二级分类名 |
| | 629 | "hasChildren": bool,是否有三级分类 |
| | 630 | "url": string,二级分类页对应url, 如果isHaveThirdSort为false必须提供 |
| | 631 | "id": 二级分类id |
| | 632 | "childrenCount": int,三级分类数量如果isHaveThirdSort为true必须提供 |
| | 633 | } …… |
| | 634 | ] |
| | 635 | } ...... |