分类管理.md 9.54 KB

分类管理

首页列表

'category/getCategoryList'

入参


参数名 必填 类型 示例值 描述
platform string 1 类别 iphone ipad android androidpad h5 web platform
status string 0 0:关闭;1:开启

返回

{
    "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 色值
isNewPage string N 是否在新页面打开

返回


{
    "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 色值
isNewPage string N 是否在新页面打开

返回

{ "code": 200, "data": [], "md5": "d751713988987e9331980363e24189ce", "message": "更新成功" }

更新状态

'category/updateCategoryStatus'

入参


参数名 描述 类型 示例值 必填
id id Integer 5
status 1:开启、0:关闭 byte 1

返回

{
    "code": 200,
    "data": [],
    "md5": "d751713988987e9331980363e24189ce",
    "message": "状态更新成功"
}

根据id获得对应信息

'category/getOneCategory'

入参


参数名 描述 类型 示例值 必填
id id Integer 5

返回

{
    "code": 200,
    "data": {
        "contentCode": "0",
        "createTime": 1436452119,
        "id": 1,
        "isHot": "N",
        "isNew": "N",
        "isNewPage": "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": "0881d5ef69587b54127d07616563d92d",
    "message": "entranceManagementBos"
}