权限列表
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\admin\model\AuthModel::authList |
| 所属业务 | 认证安全 |
| 来源模块/系统 | 管理员权限模型 |
功能说明
权限列表
调用示例
$result = (new \app\admin\model\AuthModel())->authList();参数
该函数/方法无需传入参数。
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
list | array | 权限列表 |
list[].id | int | 权限ID |
list[].title | string | 权限标题 |
list[].url | string | 地址 |
list[].order | int | 排序 |
list[].parent_id | int | 父级ID |
list[].module | string | 插件模块路径,如:gateway支付接口/sms短信接口/mail邮件接口/addon插件 |
list[].plugin | string | 插件标识名 |
list[].rules | array | 权限规则标题 |
list[].child | array | 权限子集 |
list[].child[].id | int | 权限ID |
list[].child[].title | string | 权限标题 |
list[].child[].url | string | 地址 |
list[].child[].order | int | 排序 |
list[].child[].parent_id | int | 父级ID |
list[].child[].module | string | 插件模块路径,如:gateway支付接口/sms短信接口/mail邮件接口/addon插件 |
list[].child[].plugin | string | 插件标识名 |
list[].child[].rules | string | 权限规则标题 |
list[].child[].child | array | 权限子集 |
list[].child[].child[].id | int | 权限ID |
list[].child[].child[].title | string | 权限标题 |
list[].child[].child[].url | string | 地址 |
list[].child[].child[].order | int | 排序 |
list[].child[].child[].parent_id | int | 父级ID |
list[].child[].child[].module | string | 插件模块路径,如:gateway支付接口/sms短信接口/mail邮件接口/addon插件 |
list[].child[].child[].plugin | string | 插件标识名 |
list[].child[].child[].rules | string | 权限规则标题 |
widget[].id | string | 挂件标识 |
widget[].title | string | 挂件标题 |
正常返回
{
"list": [
{
"id": 1,
"title": "示例名称",
"url": "https://example.com/callback",
"order": 1,
"parent_id": 1,
"module": "string",
"plugin": "string",
"rules": [
"string"
],
"child": [
{
"id": 1,
"title": "示例名称",
"url": "https://example.com/callback",
"order": 1,
"parent_id": 1,
"module": "string",
"plugin": "string",
"rules": "string",
"child": [
{
"id": 1,
"title": "示例名称",
"url": "https://example.com/callback",
"order": 1,
"parent_id": 1,
"module": "string",
"plugin": "string",
"rules": "string"
}
]
}
]
}
],
"widget": [
{
"id": "string",
"title": "示例名称"
}
]
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |