角色
<h3><strong>简要描述:</strong></h3>
<h1>- 角色查询接口</h1>
<p><strong>请求URL:</strong></p>
<ul>
<li><code>http://../admin/role/grid</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST</li>
</ul>
<p><strong>参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名</th>
<th>必选</th>
<th>类型</th>
<th>参数</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>否</td>
<td>string</td>
<td></td>
<td>角色名称</td>
</tr>
<tr>
<td>page</td>
<td>是</td>
<td>int</td>
<td></td>
<td>起始页</td>
</tr>
<tr>
<td>limit</td>
<td>是</td>
<td>int</td>
<td></td>
<td>每页显示的条数</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<pre><code> {
&quot;msg&quot;: &quot;success&quot;,
&quot;code&quot;: 0,
&quot;data&quot;: [{
&quot;id&quot;: 1,
&quot;name&quot;: &quot;班长&quot;,
&quot;permission&quot;: 1,
&quot;allow_down&quot;: true,
&quot;allow_inspection&quot;: true,
&quot;hide_tel&quot;: &quot;none&quot;,
&quot;menus&quot;: &quot;18,20&quot;,
&quot;admin_id&quot;: 13
}],
&quot;count&quot;: 1
}</code></pre>
<p><strong>返回参数说明</strong></p>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>int</td>
<td>角色编号</td>
</tr>
<tr>
<td>admin_id</td>
<td>int</td>
<td>用户编号</td>
</tr>
<tr>
<td>menus</td>
<td>{1,2,3}</td>
<td>菜单id</td>
</tr>
<tr>
<td>name</td>
<td>string</td>
<td>角色名称</td>
</tr>
<tr>
<td>permission</td>
<td>int</td>
<td>权限编号</td>
</tr>
<tr>
<td>allow_down</td>
<td>Boolean</td>
<td>允许下载,true,false</td>
</tr>
<tr>
<td>allow_inspection</td>
<td>Boolean</td>
<td>是否允许质检,true,false</td>
</tr>
<tr>
<td>hide_tel</td>
<td>string</td>
<td>号码脱敏方式,none:不加密,hide:隐藏中间四位,MD5:MD5加密</td>
</tr>
</tbody>
</table>
<h3><strong>简要描述:</strong></h3>
<h1>- 增加角色接口</h1>
<p><strong>请求URL:</strong></p>
<ul>
<li><code>http://../admin/role/add</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST</li>
</ul>
<p><strong>参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名</th>
<th>必选</th>
<th>类型</th>
<th>参数</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>allow_down</td>
<td>是</td>
<td>Boolean</td>
<td></td>
<td>下载文件,true,false</td>
</tr>
<tr>
<td>allow_inspection</td>
<td>是</td>
<td>Boolean</td>
<td></td>
<td>录音质检,true,false</td>
</tr>
<tr>
<td>hide_tel</td>
<td>是</td>
<td>string</td>
<td></td>
<td>号码脱敏,none:不加密,hide:隐藏中间四位,md5:MD5加密</td>
</tr>
<tr>
<td>name</td>
<td>是</td>
<td>string</td>
<td></td>
<td>角色名称</td>
</tr>
<tr>
<td>permission</td>
<td>是</td>
<td>string</td>
<td></td>
<td>权限: 1 全局; 2 项目; 3 标签组 ;4:个人</td>
</tr>
<tr>
<td>menus</td>
<td>是</td>
<td>string</td>
<td></td>
<td>菜单编号,逗号分割</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<pre><code> {
&quot;code&quot;: 0,
&quot;msg&quot;: &quot;&quot;,
&quot;data&quot;: 1
}</code></pre>
<h3><strong>简要描述:</strong></h3>
<h1>- 修改角色接口</h1>
<p><strong>请求URL:</strong></p>
<ul>
<li><code>http://../admin/role/edit</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST</li>
</ul>
<p><strong>参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名</th>
<th>必选</th>
<th>类型</th>
<th>参数</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>是</td>
<td>int</td>
<td></td>
<td>编号</td>
</tr>
<tr>
<td>allow_down</td>
<td>是</td>
<td>Boolean</td>
<td></td>
<td>下载文件,true,false</td>
</tr>
<tr>
<td>allow_inspection</td>
<td>是</td>
<td>Boolean</td>
<td></td>
<td>录音质检,true,false</td>
</tr>
<tr>
<td>hide_tel</td>
<td>是</td>
<td>string</td>
<td></td>
<td>号码脱敏,none:不加密,hide:隐藏中间四位,md5:MD5加密</td>
</tr>
<tr>
<td>name</td>
<td>是</td>
<td>string</td>
<td></td>
<td>角色名称</td>
</tr>
<tr>
<td>permission</td>
<td>是</td>
<td>string</td>
<td></td>
<td>权限: 1 全局; 2 项目; 3 标签组 ;4:个人</td>
</tr>
<tr>
<td>menus</td>
<td>是</td>
<td>string</td>
<td></td>
<td>菜单编号,逗号分割</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<pre><code> {
&quot;code&quot;: 0,
&quot;msg&quot;: &quot;&quot;,
&quot;data&quot;: 1
}</code></pre>
<h3><strong>简要描述:</strong></h3>
<h1>- 删除角色接口</h1>
<p><strong>请求URL:</strong></p>
<ul>
<li><code>http://../admin/role/remove</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST</li>
</ul>
<p><strong>参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名</th>
<th>必选</th>
<th>类型</th>
<th>参数</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>ids</td>
<td>是</td>
<td>string</td>
<td>1,2,3</td>
<td>角色编号,多个逗号分割</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<pre><code> {
&quot;code&quot;: 0,
&quot;msg&quot;: &quot;&quot;,
&quot;data&quot;: 1
}</code></pre>
<h3><strong>简要描述:</strong></h3>
<h1>- 获取权限菜单</h1>
<p><strong>请求URL:</strong></p>
<ul>
<li><code>http://../admin/role/getMenus</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST</li>
</ul>
<p><strong>参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名</th>
<th>必选</th>
<th>类型</th>
<th>参数</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>permission_id</td>
<td>是</td>
<td>int</td>
<td></td>
<td>权限值,1:全局,2:本项目,3:标签组,4:个人</td>
</tr>
<tr>
<td>menus</td>
<td>是</td>
<td>string</td>
<td>例:1,2,3</td>
<td>菜单编号,多个逗号分割,添加时传空,修改时,值为此角色的菜单编号</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<p>复制 <code>{ &quot;msg&quot;: &quot;success&quot;, &quot;code&quot;: 0, &quot;data&quot;: { &quot;trees&quot;: [{ &quot;id&quot;: 11, &quot;title&quot;: &quot;基本信息&quot;, &quot;children&quot;: [{ &quot;id&quot;: 12, &quot;title&quot;: &quot;首页&quot; }, { &quot;id&quot;: 13, &quot;title&quot;: &quot;缴费查询&quot; }, { &quot;id&quot;: 14, &quot;title&quot;: &quot;黑名单&quot; }] }] } }</code></p>