|
|
# 分类管理
|
|
|
|
|
|
## 首页列表
|
|
|
> 'category/getCategoryList'
|
|
|
|
|
|
### 入参
|
|
|
-----------------------------------------------------------
|
|
|
|参数名 |必填 |类型 |示例值 |描述 |
|
|
|
|------ |---- |---- |------ |---- |
|
|
|
|platform |否 |string | 1 |类别 iphone ipad android androidpad h5 web platform|
|
|
|
|status |否 |string |0 |0:关闭;1:开启 |
|
|
|
### 返回
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code": 200,
|
|
|
"data": [
|
|
|
{
|
|
|
"id": 1,
|
|
|
"parent_id": 0,
|
|
|
"platform": "iphone,android",
|
|
|
"sort_ico": "http://img12.static.yhbimg.com/yhb-img01/2015/11/27/05/0239d9aa5a77b4b3ae51da224e71596e88.png?imageView/{mode}/w/{width}/h/{height}",
|
|
|
"sort_level": 1,
|
|
|
"sort_name": "男生",
|
|
|
"sort_name_en": "BOYS",
|
|
|
"status": 1,
|
|
|
"sub": [
|
|
|
{
|
|
|
"id": 9,
|
|
|
"parent_id": 1,
|
|
|
"platform": "iphone,android,h5",
|
|
|
"sort_ico": "http://img11.static.yhbimg.com/yhb-img01/2015/07/09/22/01eb4519cf3b1c2f915929509fc38f7e28.png?imageView/{mode}/w/{width}/h/{height}",
|
|
|
"sort_level": 2,
|
|
|
"sort_name": "首页",
|
|
|
"sort_name_en": "index",
|
|
|
"status": 1
|
|
|
},
|
|
|
{
|
|
|
"id": 27,
|
|
|
"parent_id": 1,
|
|
|
"platform": "iphone,android,h5",
|
|
|
"sort_ico": "http://img10.static.yhbimg.com/yhb-img01/2015/07/09/22/01ee7a1da59e2e4aaecb9f7382a14cf977.png?imageView/{mode}/w/{width}/h/{height}",
|
|
|
"sort_level": 2,
|
|
|
"sort_name": "品牌一览",
|
|
|
"sort_name_en": "brand",
|
|
|
"status": 1
|
|
|
},
|
|
|
{
|
|
|
"id": 61,
|
|
|
"parent_id": 1,
|
|
|
"platform": "iphone,android,h5",
|
|
|
"sort_ico": "http://img11.static.yhbimg.com/yhb-img01/2015/07/16/18/01e4e942b4ac7174947d81801f0bf1063d.png?imageView/{mode}/w/{width}/h/{height}",
|
|
|
"sort_level": 2,
|
|
|
"sort_name": "折扣专区",
|
|
|
"sort_name_en": "SALE",
|
|
|
"status": 1
|
|
|
},
|
|
|
{
|
|
|
"id": 63,
|
|
|
"parent_id": 1,
|
|
|
"platform": "iphone,android,h5",
|
|
|
"sort_ico": "http://img11.static.yhbimg.com/yhb-img01/2015/07/16/18/012117763be488772c2e0c141de4c2073f.png?imageView/{mode}/w/{width}/h/{height}",
|
|
|
"sort_level": 2,
|
|
|
"sort_name": "新品到着",
|
|
|
"sort_name_en": "new",
|
|
|
"status": 1
|
|
|
},
|
|
|
{
|
|
|
"id": 71,
|
|
|
"parent_id": 1,
|
|
|
"platform": "iphone,android,h5",
|
|
|
"sort_ico": "http://img10.static.yhbimg.com/yhb-img01/2015/07/16/18/0157f79a03e78d912f2a70b9d61b9bd742.png?imageView/{mode}/w/{width}/h/{height}",
|
|
|
"sort_level": 2,
|
|
|
"sort_name": "商品分类",
|
|
|
"sort_name_en": "classification",
|
|
|
"status": 1
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
"id": 3,
|
|
|
"parent_id": 0,
|
|
|
"platform": "iphone,android",
|
|
|
"sort_ico": "http://img11.static.yhbimg.com/yhb-img01/2015/11/27/05/0154cc26d5ce1754e0d20f4f6f98153f6b.png?imageView/{mode}/w/{width}/h/{height}",
|
|
|
"sort_level": 1,
|
|
|
"sort_name": "潮童",
|
|
|
"sort_name_en": "KIDS",
|
|
|
"status": 1,
|
|
|
"sub": [
|
|
|
{
|
|
|
"id": 55,
|
|
|
"parent_id": 3,
|
|
|
"platform": "iphone,android,h5",
|
|
|
"sort_ico": "http://img11.static.yhbimg.com/yhb-img01/2015/07/10/01/013f21096178d425637712c6b913d18c40.png?imageView/{mode}/w/{width}/h/{height}",
|
|
|
"sort_level": 2,
|
|
|
"sort_name": "首页",
|
|
|
"sort_name_en": "Index",
|
|
|
"status": 1
|
|
|
},
|
|
|
{
|
|
|
"id": 79,
|
|
|
"parent_id": 3,
|
|
|
"platform": "iphone,android,h5",
|
|
|
"sort_ico": "http://img10.static.yhbimg.com/yhb-img01/2015/07/31/17/017eaae8479ac388aa6ea5364ac4ba470a.png?imageView/{mode}/w/{width}/h/{height}",
|
|
|
"sort_level": 2,
|
|
|
"sort_name": "上衣",
|
|
|
"sort_name_en": "T",
|
|
|
"status": 1
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
],
|
|
|
"md5": "0f6e54a3910ce6e3e9f4b207ca8886af",
|
|
|
"message": "entranceManagementBos"
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
## 根据 ID 加载实体
|
|
|
> 'category/addCategory'
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-----------------------------------------------------------
|
|
|
|参数名 |必填 |类型 |示例值 |描述 |
|
|
|
|------ |---- |---- |------ |---- |
|
|
|
|sortName |是 |string | 分类名称 |分类名称|
|
|
|
|sortNameEn |否 |string | sortName |分类英文名称|
|
|
|
|sortIco |否 |string | http://img11.static.yhbimg.com/yhb-img01/2016/03/04/05/01bdf3bf1da3405725be763540d6601144.jpg?imageView/{mode}/w/{width}/h/{height} |小图标|
|
|
|
|sortIcoBig |否 |string | 200 |大图标|
|
|
|
|sortUrl |否 |string | {"action":"go.attention","url":"http://admin.portal.yohobuy.com/operations/category/add"} |跳转链接|
|
|
|
|firstSortId |否 |string | 1 |一级分类|
|
|
|
|secondSortId |否 |string | 11 |二级分类|
|
|
|
|threadSortId |否 |string | 121 |三级分类|
|
|
|
|platform |否 |string | 100 |显示平台|
|
|
|
|orderBy |否 |string | 1 |排序|
|
|
|
|isNew |否 |string | N |是否新品|
|
|
|
|isHot |否 |string | N |是否热门|
|
|
|
|contentCode |否 |string | 3212321 |位置码|
|
|
|
|separativeSign |否 |string | N |分隔符|
|
|
|
|sortNameColor |否 |string | #df1b24 |色值|
|
|
|
|
|
|
### 返回
|
|
|
``` json
|
|
|
{
|
|
|
"code": 200,
|
|
|
"data": [],
|
|
|
"md5": "d751713988987e9331980363e24189ce",
|
|
|
"message": "新增成功"
|
|
|
}
|
|
|
```
|
|
|
|
|
|
## 更新入口信息
|
|
|
|
|
|
> 'category/updateCategory'
|
|
|
|
|
|
### 入参
|
|
|
-----------------------------------------------------------
|
|
|
|参数名 |必填 |类型 |示例值 |描述 |
|
|
|
|------ |---- |---- |------ |---- |
|
|
|
|id |是 |int | 1 |分类名称|
|
|
|
|sortName |是 |string | 男生 |分类名称|
|
|
|
|sortNameEn |否 |string | category_test |分类英文名称|
|
|
|
|sortIco |否 |string | http://img11.static.yhbimg.com/yhb-img01/2016/03/04/05/01bdf3bf1da3405725be763540d6601144.jpg?imageView/{mode}/w/{width}/h/{height} |小图标|
|
|
|
|sortIcoBig |否 |string | 200 |大图标|
|
|
|
|sortUrl |否 |string | {"action":"go.attention","url":"http://admin.portal.yohobuy.com/operations/category/add"} |跳转链接|
|
|
|
|firstSortId |否 |string | 1 |一级分类|
|
|
|
|secondSortId |否 |string | 11 |二级分类|
|
|
|
|threadSortId |否 |string | 121 |三级分类|
|
|
|
|platform |否 |string | 100 |显示平台|
|
|
|
|orderBy |否 |string | 1 |排序|
|
|
|
|isNew |否 |string | N |是否新品|
|
|
|
|isHot |否 |string | N |是否热门|
|
|
|
|contentCode |否 |string | 3212321 |位置码|
|
|
|
|separativeSign |否 |string | N |分隔符|
|
|
|
|sortNameColor |否 |string | #df1b24 |色值|
|
|
|
|
|
|
### 返回
|
|
|
{
|
|
|
"code": 200,
|
|
|
"data": [],
|
|
|
"md5": "d751713988987e9331980363e24189ce",
|
|
|
"message": "更新成功"
|
|
|
}
|
|
|
|
|
|
## 更新状态
|
|
|
|
|
|
> 'category/updateCategoryStatus'
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-----------------------------------------------------------
|
|
|
|参数名 |描述|类型 |示例值 |必填 |
|
|
|
|------ |---- |---- |------ |---- |
|
|
|
|id |id |Integer | 5 |是|
|
|
|
|status |1:开启、0:关闭|byte| 1| 是|
|
|
|
|
|
|
### 返回
|
|
|
``` json
|
|
|
{
|
|
|
"code": 200,
|
|
|
"data": [],
|
|
|
"md5": "d751713988987e9331980363e24189ce",
|
|
|
"message": "状态更新成功"
|
|
|
}
|
|
|
```
|
|
|
## 根据id获得对应信息
|
|
|
> 'category/getOneCategory'
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-----------------------------------------------------------
|
|
|
|参数名 |描述|类型 |示例值 |必填 |
|
|
|
|------ |---- |---- |------ |---- |
|
|
|
|id |id |Integer | 5 |是|
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code": 200,
|
|
|
"data": {
|
|
|
"contentCode": "0",
|
|
|
"createTime": 1436452119,
|
|
|
"id": 1,
|
|
|
"isHot": "N",
|
|
|
"isNew": "N",
|
|
|
"orderBy": 14,
|
|
|
"parentId": 0,
|
|
|
"platform": "iphone,android",
|
|
|
"separativeSign": "N",
|
|
|
"sortCode": "1,0,0,0",
|
|
|
"sortIco": "http://img12.static.yhbimg.com/yhb-img01/2015/11/27/05/0239d9aa5a77b4b3ae51da224e71596e88.png?imageView/{mode}/w/{width}/h/{height}",
|
|
|
"sortIcoBig": "",
|
|
|
"sortLevel": 1,
|
|
|
"sortName": "男生",
|
|
|
"sortNameColor": "",
|
|
|
"sortNameEn": "BOYS",
|
|
|
"sortUrl": "{\"action\":\"go.home\",\"url\":\"http://m.yohobuy.com/boys.html\"}",
|
|
|
"status": 1,
|
|
|
"updateTime": 1448601594
|
|
|
},
|
|
|
"md5": "cb1a7798a913ac0fd8eea51f51ec78cb",
|
|
|
"message": "entranceManagementBos"
|
|
|
}
|
|
|
``` |
...
|
...
|
|