---
title: "新增菜单"
method: POST
path: "/menu/addBaseMenu"
tags: ["Menu"]
---

# 新增菜单

`POST /menu/addBaseMenu`

## Request body

- SystemSysBaseMenu
  - `authoritys` SystemSysAuthority[]
    - `authorityId` integer — 角色ID
    - `authorityName` string — 角色名
    - `children` SystemSysAuthority[]
    - `createdAt` string — 创建时间
    - `dataAuthorityId` SystemSysAuthority[]
    - `defaultRouter` string — 默认菜单(默认dashboard)
    - `deletedAt` string
    - `menus` SystemSysBaseMenu[]
    - `parentId` integer — 父角色ID
    - `updatedAt` string — 更新时间
  - `children` SystemSysBaseMenu[]
  - `component` string — 对应前端文件路径
  - `createdAt` string — 创建时间
  - `hidden` boolean — 是否在列表隐藏
  - `id` integer — 主键ID
  - `menuBtn` SystemSysBaseMenuBtn[]
    - `createdAt` string — 创建时间
    - `desc` string
    - `id` integer — 主键ID
    - `name` string
    - `sysBaseMenuID` integer
    - `updatedAt` string — 更新时间
  - `meta` SystemMeta
    - `activeName` string
    - `closeTab` boolean — 自动关闭tab
    - `defaultMenu` boolean — 是否是基础路由（开发中）
    - `icon` string — 菜单图标
    - `keepAlive` boolean — 是否缓存
    - `title` string — 菜单名
  - `name` string — 路由name
  - `parameters` SystemSysBaseMenuParameter[]
    - `createdAt` string — 创建时间
    - `id` integer — 主键ID
    - `key` string — 地址栏携带参数的key
    - `sysBaseMenuID` integer
    - `type` string — 地址栏携带参数为params还是query
    - `updatedAt` string — 更新时间
    - `value` string — 地址栏携带参数的值
  - `parentId` string — 父菜单ID
  - `path` string — 路由path
  - `sort` integer — 排序标记
  - `updatedAt` string — 更新时间

## Response `200`

新增菜单

- object
  - `code` integer
  - `data` unknown
  - `msg` string

---

[API](https://skmtc.net/fisco-bcos/apis/swagger-example-api.md) · [All operations](https://skmtc.net/fisco-bcos/apis/swagger-example-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fisco-bcos/swagger-example-api/versions/7e1e58d58189/schema)
