php API_AUTH_LIST
<h4>源格式</h4>
<pre><code class="language-php">API_AUTH_LIST = [
[
'key'=>'api/getusers',
'title'=>'用户列表',
'fields'=>[
['key'=>'fieldname11','title'=>'某某字段11'],
['key'=>'fieldname12','title'=>'某某字段12']
]
],
[
'key'=>'api/delusers',
'title'=>'删除用户',
'fields'=>[
['key'=>'fieldname13','title'=>'某某字段13'],
['key'=>'fieldname14','title'=>'某某字段14']
]
],
];</code></pre>
<h4>控制器输出的格式json</h4>
<pre><code class="language-json">[{
"key": "api/getusers",
"title": "api/getusers 用户列表",
"treeid": "api/getusers",
"api": ""
},
{
"key": "fieldname11",
"title": "某某字段11",
"treeid": "fieldname11@api/getusers",
"api": "api/getusers"
},
{
"key": "fieldname12",
"title": "某某字段12",
"treeid": "fieldname12@api/getusers",
"api": "api/getusers"
},
{
"key": "api/delusers",
"title": "api/delusers 删除用户",
"treeid": "api/delusers",
"api": ""
},
{
"key": "fieldname13",
"title": "某某字段13",
"treeid": "fieldname13@api/delusers",
"api": "api/delusers"
},
{
"key": "fieldname14",
"title": "某某字段14",
"treeid": "fieldname14@api/delusers",
"api": "api/delusers"
}]</code></pre>
<h4>角色表中api_power的保存格式</h4>
<pre><code class="language-json">{
"api/getusers": ["fieldname11@api/getusers", "fieldname12@api/getusers"],
"api/delusers": ["fieldname13@api/delusers", "fieldname14@api/delusers"]
}</code></pre>
<pre><code class="language-plantuml">:从roles表取出api_power;
:从api_power取出当前api;
</code></pre>