后台商品分类管理
sfyr111 edited this page Feb 26, 2018
·
1 revision
{{host}}/manage/category/addCategory
name
parentId: 0 为 root 节点
{
"status": 0,
"msg": "添加品类成功",
"data": {
"status": 1,
"createTime": "2018-02-26T08:23:03.449Z",
"updateTime": "2018-02-26T08:23:03.449Z",
"id": 8,
"name": "4子类别3",
"parentId": "4"
}
}
{
"status": 20,
"msg": "用户不是管理员无权操作",
"data": null
}
{{host}}/manage/category/updateCategoryName
id
name
{
"status": 0,
"msg": "更新品类名称成功",
"data": {
"id": 1,
"parentId": 0,
"name": "分类gai1",
"status": 1,
"sortOrder": null,
"createTime": "2018-02-13T17:31:32.000Z",
"updateTime": "2018-02-26T08:49:38.011Z"
}
}
{
"status": 20,
"msg": "用户不是管理员无权操作",
"data": null
}
{{host}}/manage/category/parentId/:parentId
{
"status": 0,
"msg": null,
"data": [
{
"id": 4,
"parentId": 1,
"name": "1子类别1",
"status": 1
},
{
"id": 5,
"parentId": 1,
"name": "1子类别2",
"status": 1
}
]
}
{{host}}/manage/category/deep/parentId/:parentId
{
"status": 0,
"msg": null,
"data": [
1,
4,
6,
7,
8,
5
]
}