go-layout
https://github.com/wannanbigpig/gin-layout
  1. 通用与认证
  • 接口说明
  • 无需授权接口
    • 认证相关
      • 登录
      • 验证码
    • 公共接口
      • ping
      • readiness
      • Demo 示例
      • 刷新 Token
      • 通用实时连接 WebSocket
      • 退出登录
    • 文件访问
      • 获取文件
  • 需要授权接口
    • 通用与认证
      • 获取当前用户信息
        GET
      • 获取用户权限信息
        GET
      • 上传文件
        POST
      • 检查 Token
        GET
      • 生成 WebSocket 临时票据
        POST
      • 在线会话列表
        GET
      • 撤销在线会话
        POST
    • 管理员用户管理
      • 绑定角色
      • 新增管理员
      • 删除管理员
      • 管理员详情
      • 获取完整邮箱
      • 获取完整手机号
      • 管理员列表
      • 更新管理员
      • 更新个人资料
      • 上传头像
      • 管理员选项
    • 权限相关
      • 菜单管理
        • 菜单列表
        • 更新菜单
        • 菜单详情
        • 删除菜单
        • 刷新菜单权限缓存
        • 新增菜单
      • 角色管理
        • 角色列表
        • 更新角色
        • 角色详情
        • 删除角色
        • 新增角色
        • 角色选项
      • 部门管理
        • 部门列表
        • 部门详情
        • 新增部门
        • 更新部门
        • 部门绑定角色
        • 删除部门
      • 接口管理
        • 接口选项
        • 接口列表
        • 更新接口
    • 日志管理
      • 请求日志列表
      • 登录日志列表
      • 请求日志详情
      • 登录日志详情
      • 获取请求日志脱敏配置
      • 更新请求日志脱敏配置
      • 导出请求日志
    • 系统管理
      • 系统配置管理
        • 系统参数列表
        • 新增系统参数
        • 删除系统参数
        • 系统参数详情
        • 刷新系统参数缓存
        • 更新系统参数
        • 获取系统参数值
      • 字典管理
        • 新增字典项
        • 删除字典项
        • 字典项列表
        • 字典选项
        • 更新字典项
        • 新增字典类型
        • 删除字典类型
        • 字典类型详情
        • 字典类型列表
        • 更新字典类型
      • 文件资源管理
        • 批量删除文件资源
        • 导出文件资源
        • 创建文件目录
        • 删除文件目录
        • 移动文件目录
        • 目录统计信息
        • 文件目录树
        • 更新文件目录
        • 移动文件资源
        • 文件引用列表
        • 批量硬删除文件资源
        • 批量恢复文件资源
        • 硬删除文件资源
        • 文件回收站列表
        • 恢复文件资源
        • 更新文件资源
        • 完成文件直传登记
        • 批量完成文件直传登记
        • 获取文件直传凭证
        • 批量获取文件直传凭证
        • 本地上传文件资源
        • 分片上传中止
        • 分片上传完成
        • 分片上传初始化
        • 删除文件资源
        • 文件资源详情
        • 文件资源列表
      • 导出记录
        • 导出记录详情
        • 导出记录列表
      • 系统消息
        • 系统消息列表
        • 标记消息已读
        • 全部标记已读
        • 发送系统通知
        • 系统消息未读数
      • 存储配置
        • 存储配置
        • 保存存储配置
        • 查看存储敏感信息
        • 测试存储配置
    • 任务中心
      • 任务统计与配置
      • 更新任务运营配置
      • 更新任务记录策略
      • 任务执行统计
      • 任务执行统计趋势
      • 定时任务最近状态
      • 任务定义列表
      • 取消任务
      • 任务执行记录详情
      • 任务执行事件列表
      • 任务执行记录列表
      • 重试失败任务
      • 手动触发任务
    • 仪表盘
      • 服务器监控
      • 仪表盘统计
      • 仪表盘概览
    • 产品管理
      • 新增产品
      • 删除产品
      • 产品详情
      • 产品列表
      • 更新产品
  • 数据模型
    • EmptyEnvelope
    • Response
    • PageMeta
    • FileResource
    • FileResourceEnvelope
    • FileResourcePageEnvelope
    • Session
    • SessionPageEnvelope
    • TaskRunEvent
    • TaskRunEventsEnvelope
  1. 通用与认证

获取用户权限信息

演示环境
https://admin-api.wannanbigpig.com/admin/v1
演示环境
https://admin-api.wannanbigpig.com/admin/v1
GET
https://admin-api.wannanbigpig.com/admin/v1
/admin-user/user-menu-info
通用与认证
最后修改时间:2026-07-03 08:40:35
获取当前登录用户可见菜单与权限信息,用于前端动态路由和权限控制。

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Header 参数

返回响应

🟢200成功
application/json
请求成功,返回 data.result 结果对象。
Bodyapplication/json

请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'https://admin-api.wannanbigpig.com/admin/v1/admin-user/user-menu-info' \
--header 'Accept-Language;' \
--header 'Accept-Language: zh-CN' \
--header 'Authorization: Bearer <token>'
响应示例响应示例
{
    "code": 0,
    "cost": "3.2ms",
    "data": {
        "result": [
            {
                "children": [
                    {
                        "children_num": 0,
                        "code": "dashboard:overview",
                        "component_key": "",
                        "created_at": "2026-06-13 15:43:45",
                        "description": "",
                        "full_path": "",
                        "icon": "ep:data-line",
                        "id": 78,
                        "is_auth": 1,
                        "is_external_links": 0,
                        "is_new_window": 0,
                        "is_show": 1,
                        "name": "",
                        "path": "",
                        "pid": 1,
                        "redirect": "",
                        "sort": 100,
                        "status": 1,
                        "status_name": "是",
                        "title": "仪表盘概览",
                        "type": 3,
                        "type_name": "按钮",
                        "updated_at": "2026-06-13 15:43:45"
                    },
                    {
                        "children_num": 0,
                        "code": "dashboard:statistics",
                        "component_key": "",
                        "created_at": "2026-06-13 15:43:45",
                        "description": "",
                        "full_path": "",
                        "icon": "ep:trend-charts",
                        "id": 79,
                        "is_auth": 1,
                        "is_external_links": 0,
                        "is_new_window": 0,
                        "is_show": 1,
                        "name": "",
                        "path": "",
                        "pid": 1,
                        "redirect": "",
                        "sort": 90,
                        "status": 1,
                        "status_name": "是",
                        "title": "仪表盘统计",
                        "type": 3,
                        "type_name": "按钮",
                        "updated_at": "2026-06-13 15:43:45"
                    },
                    {
                        "children_num": 0,
                        "code": "dashboard:monitor",
                        "component_key": "",
                        "created_at": "2026-06-13 15:43:45",
                        "description": "",
                        "full_path": "",
                        "icon": "ep:monitor",
                        "id": 80,
                        "is_auth": 1,
                        "is_external_links": 0,
                        "is_new_window": 0,
                        "is_show": 1,
                        "name": "",
                        "path": "",
                        "pid": 1,
                        "redirect": "",
                        "sort": 80,
                        "status": 1,
                        "status_name": "是",
                        "title": "服务器监控",
                        "type": 3,
                        "type_name": "按钮",
                        "updated_at": "2026-06-13 15:43:45"
                    }
                ],
                "children_num": 3,
                "code": "",
                "component_key": "home:index",
                "created_at": "2026-06-13 15:43:45",
                "description": "",
                "full_path": "/",
                "icon": "ep:menu",
                "id": 1,
                "is_auth": 0,
                "is_external_links": 0,
                "is_new_window": 0,
                "is_show": 1,
                "name": "Home",
                "path": "",
                "pid": 0,
                "redirect": "",
                "sort": 100,
                "status": 1,
                "status_name": "是",
                "title": "首页",
                "type": 2,
                "type_name": "菜单",
                "updated_at": "2026-06-13 15:43:45"
            },
            {
                "children": [
                    {
                        "children": [
                            {
                                "children_num": 0,
                                "code": "adminUser:list",
                                "component_key": "",
                                "created_at": "2026-06-13 15:43:45",
                                "description": "",
                                "full_path": "",
                                "icon": "ant-design:search-outlined",
                                "id": 34,
                                "is_auth": 1,
                                "is_external_links": 0,
                                "is_new_window": 0,
                                "is_show": 1,
                                "name": "",
                                "path": "",
                                "pid": 7,
                                "redirect": "",
                                "sort": 100,
                                "status": 1,
                                "status_name": "是",
                                "title": "列表",
                                "type": 3,
                                "type_name": "按钮",
                                "updated_at": "2026-06-13 15:43:45"
                            },
                            {
                                "children_num": 0,
                                "code": "adminUser:delete",
                                "component_key": "",
                                "created_at": "2026-06-13 15:43:45",
                                "description": "",
                                "full_path": "",
                                "icon": "ant-design:delete-outlined",
                                "id": 13,
                                "is_auth": 1,
                                "is_external_links": 0,
                                "is_new_window": 0,
                                "is_show": 1,
                                "name": "",
                                "path": "",
                                "pid": 7,
                                "redirect": "",
                                "sort": 100,
                                "status": 1,
                                "status_name": "是",
                                "title": "删除",
                                "type": 3,
                                "type_name": "按钮",
                                "updated_at": "2026-06-13 15:43:45"
                            },
                            {
                                "children_num": 0,
                                "code": "adminUser:bindRole",
                                "component_key": "",
                                "created_at": "2026-06-13 15:43:45",
                                "description": "",
                                "full_path": "",
                                "icon": "ant-design:user-switch-outlined",
                                "id": 12,
                                "is_auth": 1,
                                "is_external_links": 0,
                                "is_new_window": 0,
                                "is_show": 1,
                                "name": "",
                                "path": "",
                                "pid": 7,
                                "redirect": "",
                                "sort": 100,
                                "status": 1,
                                "status_name": "是",
                                "title": "绑定角色",
                                "type": 3,
                                "type_name": "按钮",
                                "updated_at": "2026-06-13 15:43:45"
                            }
                        ],
                        "children_num": 5,
                        "code": "",
                        "component_key": "permission:adminUser",
                        "created_at": "2026-06-13 15:43:45",
                        "description": "",
                        "full_path": "/permission/admin-user-list",
                        "icon": "ep:user",
                        "id": 7,
                        "is_auth": 1,
                        "is_external_links": 0,
                        "is_new_window": 0,
                        "is_show": 1,
                        "name": "AdminUserList",
                        "path": "admin-user-list",
                        "pid": 2,
                        "redirect": "",
                        "sort": 120,
                        "status": 1,
                        "status_name": "是",
                        "title": "管理员",
                        "type": 2,
                        "type_name": "菜单",
                        "updated_at": "2026-06-13 15:43:45"
                    },
                    {
                        "children": [
                            {
                                "children_num": 0,
                                "code": "department:list",
                                "component_key": "",
                                "created_at": "2026-06-13 15:43:45",
                                "description": "",
                                "full_path": "",
                                "icon": "ant-design:search-outlined",
                                "id": 35,
                                "is_auth": 1,
                                "is_external_links": 0,
                                "is_new_window": 0,
                                "is_show": 1,
                                "name": "",
                                "path": "",
                                "pid": 9,
                                "redirect": "",
                                "sort": 100,
                                "status": 1,
                                "status_name": "是",
                                "title": "列表",
                                "type": 3,
                                "type_name": "按钮",
                                "updated_at": "2026-06-13 15:43:45"
                            },
                            {
                                "children_num": 0,
                                "code": "department:delete",
                                "component_key": "",
                                "created_at": "2026-06-13 15:43:45",
                                "description": "",
                                "full_path": "",
                                "icon": "ant-design:delete-outlined",
                                "id": 25,
                                "is_auth": 1,
                                "is_external_links": 0,
                                "is_new_window": 0,
                                "is_show": 1,
                                "name": "",
                                "path": "",
                                "pid": 9,
                                "redirect": "",
                                "sort": 100,
                                "status": 1,
                                "status_name": "是",
                                "title": "删除",
                                "type": 3,
                                "type_name": "按钮",
                                "updated_at": "2026-06-13 15:43:45"
                            },
                            {
                                "children_num": 0,
                                "code": "department:bindRole",
                                "component_key": "",
                                "created_at": "2026-06-13 15:43:45",
                                "description": "",
                                "full_path": "",
                                "icon": "ant-design:user-switch-outlined",
                                "id": 24,
                                "is_auth": 1,
                                "is_external_links": 0,
                                "is_new_window": 0,
                                "is_show": 1,
                                "name": "",
                                "path": "",
                                "pid": 9,
                                "redirect": "",
                                "sort": 100,
                                "status": 1,
                                "status_name": "是",
                                "title": "绑定角色",
                                "type": 3,
                                "type_name": "按钮",
                                "updated_at": "2026-06-13 15:43:45"
                            }
                        ],
                        "children_num": 6,
                        "code": "",
                        "component_key": "permission:department",
                        "created_at": "2026-06-13 15:43:45",
                        "description": "",
                        "full_path": "/permission/department-list",
                        "icon": "tdesign:tree-square-dot",
                        "id": 9,
                        "is_auth": 1,
                        "is_external_links": 0,
                        "is_new_window": 0,
                        "is_show": 1,
                        "name": "DepartmentList",
                        "path": "department-list",
                        "pid": 2,
                        "redirect": "",
                        "sort": 115,
                        "status": 1,
                        "status_name": "是",
                        "title": "部门",
                        "type": 2,
                        "type_name": "菜单",
                        "updated_at": "2026-06-13 15:43:45"
                    },
                    {
                        "children": [
                            {
                                "children_num": 0,
                                "code": "role:list",
                                "component_key": "",
                                "created_at": "2026-06-13 15:43:45",
                                "description": "",
                                "full_path": "",
                                "icon": "ant-design:search-outlined",
                                "id": 36,
                                "is_auth": 1,
                                "is_external_links": 0,
                                "is_new_window": 0,
                                "is_show": 1,
                                "name": "",
                                "path": "",
                                "pid": 8,
                                "redirect": "",
                                "sort": 100,
                                "status": 1,
                                "status_name": "是",
                                "title": "列表",
                                "type": 3,
                                "type_name": "按钮",
                                "updated_at": "2026-06-13 15:43:45"
                            },
                            {
                                "children_num": 0,
                                "code": "role:delete",
                                "component_key": "",
                                "created_at": "2026-06-13 15:43:45",
                                "description": "",
                                "full_path": "",
                                "icon": "ant-design:delete-outlined",
                                "id": 20,
                                "is_auth": 1,
                                "is_external_links": 0,
                                "is_new_window": 0,
                                "is_show": 1,
                                "name": "",
                                "path": "",
                                "pid": 8,
                                "redirect": "",
                                "sort": 100,
                                "status": 1,
                                "status_name": "是",
                                "title": "删除",
                                "type": 3,
                                "type_name": "按钮",
                                "updated_at": "2026-06-13 15:43:45"
                            },
                            {
                                "children_num": 0,
                                "code": "role:update",
                                "component_key": "",
                                "created_at": "2026-06-13 15:43:45",
                                "description": "",
                                "full_path": "",
                                "icon": "ant-design:edit-filled",
                                "id": 19,
                                "is_auth": 1,
                                "is_external_links": 0,
                                "is_new_window": 0,
                                "is_show": 1,
                                "name": "",
                                "path": "",
                                "pid": 8,
                                "redirect": "",
                                "sort": 100,
                                "status": 1,
                                "status_name": "是",
                                "title": "编辑",
                                "type": 3,
                                "type_name": "按钮",
                                "updated_at": "2026-06-13 15:43:45"
                            }
                        ],
                        "children_num": 4,
                        "code": "",
                        "component_key": "permission:role",
                        "created_at": "2026-06-13 15:43:45",
                        "description": "",
                        "full_path": "/permission/role-list",
                        "icon": "ant-design:usergroup-add-outlined",
                        "id": 8,
                        "is_auth": 1,
                        "is_external_links": 0,
                        "is_new_window": 0,
                        "is_show": 1,
                        "name": "RoleList",
                        "path": "role-list",
                        "pid": 2,
                        "redirect": "",
                        "sort": 115,
                        "status": 1,
                        "status_name": "是",
                        "title": "角色",
                        "type": 2,
                        "type_name": "菜单",
                        "updated_at": "2026-06-13 15:43:45"
                    }
                ],
                "children_num": 0,
                "code": "",
                "component_key": "",
                "created_at": "2026-06-13 15:43:45",
                "description": "",
                "full_path": "/permission",
                "icon": "ant-design:lock-outlined",
                "id": 2,
                "is_auth": 1,
                "is_external_links": 0,
                "is_new_window": 0,
                "is_show": 1,
                "name": "Permission",
                "path": "permission",
                "pid": 0,
                "redirect": "AdminUserList",
                "sort": 99,
                "status": 1,
                "status_name": "是",
                "title": "权限管理",
                "type": 1,
                "type_name": "目录",
                "updated_at": "2026-06-13 15:43:45"
            },
            {
                "children": [
                    {
                        "children": [
                            {
                                "children_num": 0,
                                "code": "adminLoginLog:list",
                                "component_key": "",
                                "created_at": "2026-06-13 15:43:45",
                                "description": "",
                                "full_path": "",
                                "icon": "ant-design:search-outlined",
                                "id": 39,
                                "is_auth": 1,
                                "is_external_links": 0,
                                "is_new_window": 0,
                                "is_show": 1,
                                "name": "",
                                "path": "",
                                "pid": 31,
                                "redirect": "",
                                "sort": 100,
                                "status": 1,
                                "status_name": "是",
                                "title": "列表",
                                "type": 3,
                                "type_name": "按钮",
                                "updated_at": "2026-06-13 15:43:45"
                            },
                            {
                                "children_num": 0,
                                "code": "adminLoginLog:detail",
                                "component_key": "",
                                "created_at": "2026-06-13 15:43:45",
                                "description": "",
                                "full_path": "",
                                "icon": "ep:document",
                                "id": 32,
                                "is_auth": 1,
                                "is_external_links": 0,
                                "is_new_window": 0,
                                "is_show": 1,
                                "name": "",
                                "path": "",
                                "pid": 31,
                                "redirect": "",
                                "sort": 100,
                                "status": 1,
                                "status_name": "是",
                                "title": "详情",
                                "type": 3,
                                "type_name": "按钮",
                                "updated_at": "2026-06-13 15:43:45"
                            }
                        ],
                        "children_num": 2,
                        "code": "",
                        "component_key": "log:adminLogin",
                        "created_at": "2026-06-13 15:43:45",
                        "description": "",
                        "full_path": "/log/admin-login-log",
                        "icon": "ep:document",
                        "id": 31,
                        "is_auth": 1,
                        "is_external_links": 0,
                        "is_new_window": 0,
                        "is_show": 1,
                        "name": "AdminLoginLog",
                        "path": "admin-login-log",
                        "pid": 29,
                        "redirect": "",
                        "sort": 100,
                        "status": 1,
                        "status_name": "是",
                        "title": "管理员登录日志",
                        "type": 2,
                        "type_name": "菜单",
                        "updated_at": "2026-06-13 15:43:45"
                    },
                    {
                        "children": [
                            {
                                "children_num": 0,
                                "code": "requestLog:list",
                                "component_key": "",
                                "created_at": "2026-06-13 15:43:45",
                                "description": "",
                                "full_path": "",
                                "icon": "ant-design:search-outlined",
                                "id": 40,
                                "is_auth": 1,
                                "is_external_links": 0,
                                "is_new_window": 0,
                                "is_show": 1,
                                "name": "",
                                "path": "",
                                "pid": 30,
                                "redirect": "",
                                "sort": 100,
                                "status": 1,
                                "status_name": "是",
                                "title": "列表",
                                "type": 3,
                                "type_name": "按钮",
                                "updated_at": "2026-06-13 15:43:45"
                            },
                            {
                                "children_num": 0,
                                "code": "requestLog:detail",
                                "component_key": "",
                                "created_at": "2026-06-13 15:43:45",
                                "description": "",
                                "full_path": "",
                                "icon": "ep:document",
                                "id": 33,
                                "is_auth": 1,
                                "is_external_links": 0,
                                "is_new_window": 0,
                                "is_show": 1,
                                "name": "",
                                "path": "",
                                "pid": 30,
                                "redirect": "",
                                "sort": 100,
                                "status": 1,
                                "status_name": "是",
                                "title": "详情",
                                "type": 3,
                                "type_name": "按钮",
                                "updated_at": "2026-06-13 15:43:45"
                            },
                            {
                                "children_num": 0,
                                "code": "requestLog:export",
                                "component_key": "",
                                "created_at": "2026-06-13 15:43:45",
                                "description": "",
                                "full_path": "",
                                "icon": "ant-design:search-outlined",
                                "id": 61,
                                "is_auth": 1,
                                "is_external_links": 0,
                                "is_new_window": 0,
                                "is_show": 1,
                                "name": "",
                                "path": "",
                                "pid": 30,
                                "redirect": "",
                                "sort": 80,
                                "status": 1,
                                "status_name": "是",
                                "title": "导出",
                                "type": 3,
                                "type_name": "按钮",
                                "updated_at": "2026-06-13 15:43:45"
                            }
                        ],
                        "children_num": 4,
                        "code": "",
                        "component_key": "log:request",
                        "created_at": "2026-06-13 15:43:45",
                        "description": "",
                        "full_path": "/log/request-log",
                        "icon": "ep:document",
                        "id": 30,
                        "is_auth": 1,
                        "is_external_links": 0,
                        "is_new_window": 0,
                        "is_show": 1,
                        "name": "RequestLog",
                        "path": "request-log",
                        "pid": 29,
                        "redirect": "",
                        "sort": 100,
                        "status": 1,
                        "status_name": "是",
                        "title": "请求日志",
                        "type": 2,
                        "type_name": "菜单",
                        "updated_at": "2026-06-13 15:43:45"
                    },
                    {
                        "children": [
                            {
                                "children_num": 0,
                                "code": "session:list",
                                "component_key": "",
                                "created_at": "2026-06-13 15:43:45",
                                "description": "",
                                "full_path": "",
                                "icon": "ant-design:search-outlined",
                                "id": 67,
                                "is_auth": 1,
                                "is_external_links": 0,
                                "is_new_window": 0,
                                "is_show": 1,
                                "name": "",
                                "path": "",
                                "pid": 66,
                                "redirect": "",
                                "sort": 100,
                                "status": 1,
                                "status_name": "是",
                                "title": "列表",
                                "type": 3,
                                "type_name": "按钮",
                                "updated_at": "2026-06-13 15:43:45"
                            },
                            {
                                "children_num": 0,
                                "code": "session:revoke",
                                "component_key": "",
                                "created_at": "2026-06-13 15:43:45",
                                "description": "",
                                "full_path": "",
                                "icon": "ep:circle-close",
                                "id": 68,
                                "is_auth": 1,
                                "is_external_links": 0,
                                "is_new_window": 0,
                                "is_show": 1,
                                "name": "",
                                "path": "",
                                "pid": 66,
                                "redirect": "",
                                "sort": 90,
                                "status": 1,
                                "status_name": "是",
                                "title": "撤销",
                                "type": 3,
                                "type_name": "按钮",
                                "updated_at": "2026-06-13 15:43:45"
                            }
                        ],
                        "children_num": 2,
                        "code": "",
                        "component_key": "log:session",
                        "created_at": "2026-06-13 15:43:45",
                        "description": "",
                        "full_path": "/log/session",
                        "icon": "ep:monitor",
                        "id": 66,
                        "is_auth": 1,
                        "is_external_links": 0,
                        "is_new_window": 0,
                        "is_show": 1,
                        "name": "OnlineSession",
                        "path": "session",
                        "pid": 29,
                        "redirect": "",
                        "sort": 90,
                        "status": 1,
                        "status_name": "是",
                        "title": "在线会话",
                        "type": 2,
                        "type_name": "菜单",
                        "updated_at": "2026-06-13 15:43:45"
                    }
                ],
                "children_num": 3,
                "code": "",
                "component_key": "",
                "created_at": "2026-06-13 15:43:45",
                "description": "",
                "full_path": "/log",
                "icon": "ep:tickets",
                "id": 29,
                "is_auth": 1,
                "is_external_links": 0,
                "is_new_window": 0,
                "is_show": 1,
                "name": "Log",
                "path": "log",
                "pid": 0,
                "redirect": "RequestLog",
                "sort": 98,
                "status": 1,
                "status_name": "是",
                "title": "日志管理",
                "type": 1,
                "type_name": "目录",
                "updated_at": "2026-06-13 15:43:45"
            }
        ]
    },
    "msg": "OK",
    "request_id": "req_20260423_0001"
}
修改于 2026-07-03 08:40:35
上一页
获取当前用户信息
下一页
上传文件
Built with