简要描述:

  • 获取子级分类

请求域名:

  • http://xx.com

请求URL:

POST:plugin.supplier.frontend.shop.index.getChildrenCategory

参数:

参数名 是否必须 类型 说明
sid int 供应商id
category_id int 分类id
level int 分类等级
paginate int 分页数

返回示例:

正确时返回:

{
    "result":1,
    "msg":"查询子分类成功",
    "data":{
        "categorys":{
            "current_page":1,
            "data":[
                {
                    "id":84610,
                    "name":"商品分类一",
                    "thumb":"image/0234d68d691268ab3f061977d478c9ac.jpg",
                    "level":1,
                    "parent_id":0,
                    "has_many_children":[
                        {
                            "id":84611,
                            "uniacid":9,
                            "name":"商品分类11",
                            "thumb":"image/6851b0ffe5d2fec2be42a2ae7c1b2a6e.jpg",
                            "parent_id":84610,
                            "description":"",
                            "display_order":0,
                            "enabled":1,
                            "is_home":1,
                            "adv_img":"",
                            "adv_url":"",
                            "level":2,
                            "advimg_pc":"",
                            "advurl_pc":"",
                            "created_at":"2021-01-06 09:51:43",
                            "updated_at":"2021-01-06 09:51:43",
                            "deleted_at":null,
                            "plugin_id":0,
                            "filter_ids":"",
                            "small_adv_url":"",
                            "pc_adv_img":null,
                            "pc_adv_url":null
                        }
                    ]
                }
            ],
            "first_page_url":"http://www.shop.com/admin/shop?page=1",
            "from":1,
            "last_page":1,
            "last_page_url":"http://www.shop.com/admin/shop?page=1",
            "next_page_url":null,
            "path":"http://www.shop.com/admin/shop",
            "per_page":15,
            "prev_page_url":null,
            "to":1,
            "total":1
        }
    }
}

返回参数说明:

参数名 类型 说明
data object 分类详情
categorys object 子分类
has_many_children object 子分类下的子分类

返回参数说明:

参数名 类型 说明
id int 分类id
name string 分类名
thumb string 分类图
level int 等级
parent_id int 父级id

备注:

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