菜单列表

接口描述
  • 菜单列表
请求URL
  • /api/admin/menus
请求方式
  • GET
请求头部
参数名 必选 类型 说明
Authorization string JWT token
Query 请求参数
参数名 必选 类型 说明
type string all 查所有分类,包含禁用的。不传则只返回非禁用的
Body 请求参数
参数名 必选 类型 说明
name string 呢称
email string 邮箱
返回参数
参数名 必含 类型 说明
id int 主键
pid int 父级
name string 名称
level int 层级
status int 状态: 0正常 1禁用
children array 子类
返回示例
  • 状态码 200 请求成功
 [
    {
        "id": 25,
        "pid": 0,
        "name": "用户管理",
        "level": 1,
        "status": 1,
        "children": [
            {
                "id": 26,
                "pid": 25,
                "name": "用户列表",
                "level": 2,
                "status": 1,
                "children": []
            }
        ]
    },
    {
        "id": 27,
        "pid": 0,
        "name": "分类管理",
        "level": 1,
        "status": 1,
        "children": [
            {
                "id": 28,
                "pid": 27,
                "name": "分类列表",
                "level": 2,
                "status": 1,
                "children": []
            },
            {
                "id": 29,
                "pid": 27,
                "name": "添加分类",
                "level": 2,
                "status": 1,
                "children": []
            }
        ]
    },
    {
        "id": 30,
        "pid": 0,
        "name": "商品管理",
        "level": 1,
        "status": 1,
        "children": [
            {
                "id": 31,
                "pid": 30,
                "name": "商品列表",
                "level": 2,
                "status": 1,
                "children": []
            },
            {
                "id": 32,
                "pid": 30,
                "name": "添加商品",
                "level": 2,
                "status": 1,
                "children": []
            }
        ]
    },
    {
        "id": 33,
        "pid": 0,
        "name": "评价管理",
        "level": 1,
        "status": 1,
        "children": [
            {
                "id": 34,
                "pid": 33,
                "name": "评价列表",
                "level": 2,
                "status": 1,
                "children": []
            }
        ]
    },
    {
        "id": 35,
        "pid": 0,
        "name": "订单管理",
        "level": 1,
        "status": 1,
        "children": [
            {
                "id": 36,
                "pid": 35,
                "name": "订单列表",
                "level": 2,
                "status": 1,
                "children": []
            }
        ]
    },
    {
        "id": 37,
        "pid": 0,
        "name": "轮播管理",
        "level": 1,
        "status": 1,
        "children": [
            {
                "id": 38,
                "pid": 37,
                "name": "轮播列表",
                "level": 2,
                "status": 1,
                "children": []
            },
            {
                "id": 39,
                "pid": 37,
                "name": "添加轮播",
                "level": 2,
                "status": 1,
                "children": []
            }
        ]
    },
    {
        "id": 40,
        "pid": 0,
        "name": "菜单管理",
        "level": 1,
        "status": 1,
        "children": [
            {
                "id": 41,
                "pid": 40,
                "name": "菜单列表",
                "level": 2,
                "status": 1,
                "children": []
            },
            {
                "id": 42,
                "pid": 40,
                "name": "添加菜单",
                "level": 2,
                "status": 1,
                "children": []
            }
        ]
    }
]