分类树OPENAPI



  • 分类树OPENAPI

    用于获得商店分类数据


    获得一级分类

    base_url/openapi/catalog/

    {
        "result": "success",
        "data": {
            "2": {
                "cat_id": "2",
                "parent_id": "0",
                "cat_path": "2",
                "has_children": "true",
                "cat_name": "\u6570\u7801",
            },
            "8": {
                "cat_id": "8",
                "parent_id": "0",
                "cat_path": "8",
                "has_children": "true",
                "cat_name": "\u7f8e\u5986",
                
            },
            "11": {
                "cat_id": "11",
                "parent_id": "0",
                "cat_path": "11",
                "has_children": "true",
                "cat_name": "\u6bcd\u5a74",
                
            },
            "12": {
                "cat_id": "12",
                "parent_id": "0",
                "cat_path": "12",
                "has_children": "true",
                "cat_name": "\u98df\u54c1\\\u751f\u9c9c",
                
            },
            "7": {
                "cat_id": "7",
                "parent_id": "0",
                "cat_path": "7",
                "has_children": "true",
                "cat_name": "\u670d\u88c5",
            }
        }
    }
    

    获得1、2、3级 共三层分类

    base_url/openapi/catalog/step/3

    获得parent_id为7的子级分类分类

    base_url/openapi/catalog/parent_id/7

    获得parent_id为2的子级分类分类,向内寻找3层

    base_url/openapi/catalog/parent_id/2/step/3

    {
        "result": "success",
        "data": {
            "2": {
                "cat_id": "2",
                "parent_id": "0",
                "cat_path": "2",
                "has_children": "true",
                "cat_name": "\u6570\u7801",
                "children": {
                    "6": {
                        "cat_id": "6",
                        "parent_id": "2",
                        "cat_path": "2,6",
                        "has_children": "true",
                        "cat_name": "\u667a\u80fd\u624b\u673a",
                        "children": {
                            "25": {
                                "cat_id": "25",
                                "parent_id": "6",
                                "cat_path": "2,6,25",
                                "has_children": "false",
                                "cat_name": "Apple",
                            },
                            "55": {
                                "cat_id": "55",
                                "parent_id": "6",
                                "cat_path": "2,6,55",
                                "has_children": "false",
                                "cat_name": "\u5c0f\u7c73",
                            }
                        }
                    },
                    
                    .......
    

    分类列表页URL

    list.html?cat_id=分类ID

    分类路径

    base_url/openapi/catalog_path/cat_id/25

    分类路径(含自己)

    base_url/openapi/catalog_path/cat_id/25/show_self/true


登录后回复