简要描述:

获取商品分类下级

请求域名:

  • http://xx.com

请求URL:

plugin.decorate.admin.decorate-common.get-son-category

参数:

参数名 是否必须 类型 说明
page int 分页 (每页固定30条)
category_id int 商品分类id

返回示例:

正确时返回:

{
  "result": 1,
  "msg": "成功",
  "data": {
    "total": 21,
    "per_page": 3,
    "current_page": 1,
    "last_page": 7,
    "next_page_url": "http://www.yzdev8.com/addons/yun_shop/api.php?page=2",
    "prev_page_url": null,
    "from": 1,
    "to": 3,
    "data": [
      {
        "id": 1,
        "name": "分类一",
        "parent_id": 0,
        "level": 1,
        "url": "http://www.yzdev8.com/addons/yun_shop/?menu#/catelist/1?i=1",
        "procedures_url": "/packageB/member/category/catelist/catelist?id=1"
      },
      {
        "id": 34,
        "name": "分类二",
        "parent_id": 0,
        "level": 1,
        "url": "http://www.yzdev8.com/addons/yun_shop/?menu#/catelist/34?i=1",
        "procedures_url": "/packageB/member/category/catelist/catelist?id=34"
      },
      {
        "id": 36,
        "name": "分类三",
        "parent_id": 0,
        "level": 1,
        "url": "http://www.yzdev8.com/addons/yun_shop/?menu#/catelist/36?i=1",
        "procedures_url": "/packageB/member/category/catelist/catelist?id=36"
      }
    ]
  }
}

错误时返回:

{
    "result": 0,
    "msg": "暂无数据",
    "data": []
}

返回参数说明:

参数名 类型 说明
data[total] int 数据总条数
data[per_page] int 每页显示多少条数据
data[current_page] int 当前页
data[data][has_many_children] array 下一级分类数组
data[data][id] int 分类id
data[data][name] string 分类名称
data[data][parent_id] int 分类上级id,对应id(0为一级分类)

备注:

商品分类目前最高为3级分类

  • 更多返回错误代码请看首页的错误代码描述