文档
测试

01、获取所有分类及子分类

GET
/product/category/list/tree

接口描述

01、获取所有分类以及子分类,并返回json树形结构

响应参数

参数名
类型
描述
必填
code
int
0-成功,其他业务码-失败
必填
msg
string
提示消息
必填
data
array
返回的所有菜单
必填
catId
int
分类id
必填
name
string
分类名字
必填
parentCid
int
父分类id
必填
catLevel
int
分类等级
必填
showStatus
int
是否显示,0-不显示,1-显示
必填
sort
int
排序
必填
icon
string
图标
必填
productUnit
string
计量单位
必填
productCount
int
当前分类下商品总量
必填
children
array
所有子分类
必填

响应示例

```json { "code": 0, "msg": "success", "data": [{ "catId": 1, "name": "图书、音像、电子书刊", "parentCid": 0, "catLevel": 1, "showStatus": 1, "sort": 0, "icon": null, "productUnit": null, "productCount": 0, "children": [] }] } ```