简要描述:
- 商品分类接口
请求URL:
后台 : /data/service/GoodsCategory/getGoodsCategoryOfTree 前端 : POST:/wapapi/goods/categoryTree
返回示例:
正确时返回:
{
"code": 1,
"message": "获取成功",
"data": [
{
"category_id": 19,
"category_name": "女装 / 男装 / 童装",
"short_name": "服装",
"category_pic": "",
"second_category": [
{
"category_id": 21,
"category_name": "男装",
"short_name": "男装",
"category_pic": "",
"third_category": [
{
"category_id": 22,
"category_name": "衬衫",
"short_name": "衬衫",
"category_pic": "/upload/26/common/1535960291.jpg"
},
{
"category_id": 29,
"category_name": "男装-裤子",
"short_name": "男裤",
"category_pic": ""
}
]
}
]
},
{
"category_id": 27,
"category_name": "男鞋 / 女鞋 /童鞋",
"short_name": "鞋子",
"category_pic": "",
"second_category": [
{
"category_id": 28,
"category_name": "男鞋",
"short_name": "男鞋",
"category_pic": ""
}
]
}
]
}
错误时返回:
{
"code": < 0,
"message": "获取失败"
}
返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
data | array | 一级分类 |
category_id | int | 分类id |
category_name | string | 分类名称 |
short_name | string | 分类简称 |
category_pic | string | 分类图片 |
short_name | string | 分类简称 |
category_pic | string | 分类图片 |