Appearance
岗位树
GET /api/admin/post/tree
权限 admin
无请求参数。
响应
数组格式,每个节点结构:
| 字段 | 类型 | 说明 |
|---|---|---|
| type | string | 节点类型:group-分组、post-岗位 |
| id | number | 分组 ID 或岗位 ID(由 type 区分) |
| name | string | 显示名称 |
| nodes | array | 子节点 |
响应示例
json
[
{
"type": "group",
"id": 1,
"name": "技术岗",
"nodes": [
{
"type": "post",
"id": 101,
"name": "Java开发",
"nodes": []
}
]
}
]异常
| 错误码 | HTTP | 说明 |
|---|---|---|
MENU_PERMISSION_DENIED | 403 | 权限不足,需 admin 权限 |