文档
测试

获取商品类别

GET
goods-categories

接口描述

商品类别,可能包含子分类

响应参数

参数名
类型
描述
必填
id
int
类别ID
必填
name
string
类别名称
必填
parent_cat
object
父类id,如果是一级类别,则为null
必填
child_cats
array
数据列表,子类列表
必填
id
int
子类别ID
必填
name
string
类别名称
必填
parent_cat
int
父类id
必填
thumbnail_img
string
缩略图图标(首页)
必填
icon_img
string
小图标(菜单使用)
必填
recommend
boolean
是否推荐。推荐类别需要展示再首页
必填

说明 / 示例

返回结果是列表 ```json [ { "id": 1, "name": "消防器材", "thumbnail_img": "http://acmall.hailiyingjizx.com/media/goods_category/thumbnail/f31a1ec1ee.jpg", "icon_img": "http://acmall.hailiyingjizx.com/media/goods_category/icon/f04891eee2.png", "recommend": true, "parent_cat": null, "available_specs": [ 1 ], "child_cats": [ { "id": 2, "name": "单品", "thumbnail_img": null, "icon_img": null, "recommend": false, "parent_cat": 1, "available_specs": [ 1 ] }, { "id": 3, "name": "套装", "thumbnail_img": null, "icon_img": null, "recommend": false, "parent_cat": 1, "available_specs": [ ] } ] }, { "id": 4, "name": "劳保用品", "thumbnail_img": "http://acmall.hailiyingjizx.com/media/goods_category/thumbnail/2b26877712.jpg", "icon_img": "http://acmall.hailiyingjizx.com/media/goods_category/icon/d5d930a31c.png", "recommend": true, "parent_cat": null, "available_specs": [ ], "child_cats": [ { "id": 5, "name": "单品", "thumbnail_img": null, "icon_img": null, "recommend": false, "parent_cat": 4, "available_specs": [ ] }, { "id": 6, "name": "套装", "thumbnail_img": null, "icon_img": null, "recommend": false, "parent_cat": 4, "available_specs": [ ] } ] } ] ```