Appearance
职级树
GET /api/admin/post_rank/tree
权限 admin
无请求参数。PostMap 未安装时返回空数组。
响应
数组格式,每个节点结构:
| 字段 | 类型 | 说明 |
|---|---|---|
| type | string | 节点类型:group-分组、rank-职级 |
| id | number | 分组 ID 或职级 ID(由 type 区分) |
| name | string | 显示名称 |
| nodes | array | 子节点 |
响应示例
json
[
{
"type": "group",
"id": 1,
"name": "研发职级",
"nodes": [
{
"type": "rank",
"id": 1,
"name": "P1",
"nodes": []
}
]
}
]异常
| 错误码 | HTTP | 说明 |
|---|---|---|
MENU_PERMISSION_DENIED | 403 | 权限不足,需 admin 权限 |