登录
<p>登陆</p>
<p><strong>简要描述:</strong></p>
<ul>
<li>
<h1>用户登录</h1>
</li>
</ul>
<p><strong>请求URL:</strong></p>
<ul>
<li><code>http://xx.com/login</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST</li>
</ul>
<p><strong>参数:</strong></p>
<h4>登陆的请求头 headers 中 access_token为空</h4>
<table>
<thead>
<tr>
<th>参数名</th>
<th>必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>是</td>
<td>string</td>
<td>用户名</td>
</tr>
<tr>
<td>passwd</td>
<td>是</td>
<td>string</td>
<td>密码:md5加密传输</td>
</tr>
<tr>
<td>verifyCode</td>
<td>是</td>
<td>验证码</td>
<td>网页登陆使用验证码图片的数值,接口调用使用 系统设置中的序列号</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<pre><code>{
code: 0,
msg: &quot;超级管理员登录成功&quot;,
data: {
role: &quot;super_admin&quot;,//super_admin:超级管理员;admin:管理员;agent:坐席
access_token: &quot;eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NTg0NjQ2MDU3NzksInNlc3Npb24iOnsic3VwZXJfYWRtaW4iOjF9LCJpYXQiOjE1NTg0MjE0MDU3Nzl9._6dCl8Rp5s-OWf1VnkS9naWmdlMqamxgPvqbdZZ0iSg&quot;
}
}</code></pre>
<p><strong>返回参数说明</strong></p>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>role</td>
<td>string</td>
<td>角色,super_admin:超级管理员;admin:管理员;agent:坐席</td>
</tr>
<tr>
<td>access_token</td>
<td>string</td>
<td>访问令牌</td>
</tr>
</tbody>
</table>
<hr />
<p><strong>简要描述:</strong></p>
<ul>
<li>
<h1>获取登陆验证码</h1>
</li>
</ul>
<p><strong>请求URL:</strong></p>
<ul>
<li><code>http://xx.com/verifyCode</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>GET</li>
</ul>
<p><strong>参数:</strong></p>
<h4>无参,不需要传请求头</h4>
<p><strong>返回示例:</strong></p>
<h4>返回结果为一张图片</h4>
<hr />
<p><strong>简要描述:</strong></p>
<ul>
<li>
<h1>获取用户权限</h1>
</li>
</ul>
<p><strong>请求URL:</strong></p>
<ul>
<li><code>http://xx.com/menu/info</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST</li>
</ul>
<p><strong>参数:</strong></p>
<ul>
<li>无参,只需传请求头access_token</li>
</ul>
<p><strong>返回示例</strong></p>
<pre><code>{
&quot;msg&quot;: &quot;success&quot;,
&quot;code&quot;: 0,
&quot;data&quot;: {
&quot;name&quot;: &quot;test&quot;,
&quot;decrypt&quot;: &quot;none&quot;,
&quot;hideTel&quot;: &quot;none&quot;,
&quot;allow_down&quot;: true,
&quot;allow_inspection&quot;: true,
&quot;permission&quot;: 1
}
}</code></pre>
<p><strong>返回参数说明</strong></p>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>string</td>
<td>用户名</td>
</tr>
<tr>
<td>decrypt</td>
<td>string</td>
<td>号码加密字符,由超管设置,级别一级,控制管理员和坐席,none:不加密,hide:隐藏中间四位;md5:MD5加密</td>
</tr>
<tr>
<td>hideTel</td>
<td>string</td>
<td>号码加密字符,由管理员设置,级别二级,控制坐席,none:不加密,hide:隐藏中间四位;md5:MD5加密</td>
</tr>
<tr>
<td>allow_down</td>
<td>string</td>
<td>管理员设置,是否支持坐席下载数据</td>
</tr>
<tr>
<td>allow_inspection</td>
<td>string</td>
<td>管理员设置,是否支持坐席质检录音</td>
</tr>
<tr>
<td>permission</td>
<td>string</td>
<td>用户权限,1:全局,2:项目,3:标签组,4:个人</td>
</tr>
</tbody>
</table>
<p><strong>简要描述:</strong></p>
<ul>
<li>
<h1>获取菜单</h1>
</li>
</ul>
<p><strong>请求URL:</strong></p>
<ul>
<li><code>http://xx.com/menu/get?own=null</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>get</li>
<li>admin登陆时own可以是super_admin</li>
</ul>
<p><strong>返回示例</strong></p>
<pre><code>{
&quot;msg&quot;:&quot;success&quot;,
&quot;code&quot;:0,
&quot;data&quot;:[
{
&quot;name&quot;:&quot;management&quot;,
&quot;title&quot;:&quot;数据管理&quot;,
&quot;icon&quot;:&quot;layui-icon-table&quot;,
&quot;list&quot;:[
{
&quot;name&quot;:&quot;cust_info&quot;,
&quot;title&quot;:&quot;客户信息&quot;,
&quot;jump&quot;:&quot;management/cust_info&quot;
},
{
&quot;name&quot;:&quot;record&quot;,
&quot;title&quot;:&quot;录音质检&quot;,
&quot;jump&quot;:&quot;management/record&quot;
},
{
&quot;name&quot;:&quot;cust_cdr&quot;,
&quot;title&quot;:&quot;客户话单&quot;,
&quot;jump&quot;:&quot;management/cust_cdr&quot;
}
]
},
{
&quot;name&quot;:&quot;chart&quot;,
&quot;title&quot;:&quot;报表&quot;,
&quot;icon&quot;:&quot;layui-icon-chart&quot;,
&quot;list&quot;:[
{
&quot;name&quot;:&quot;agent_report&quot;,
&quot;title&quot;:&quot;坐席报表&quot;,
&quot;jump&quot;:&quot;chart/agent_report&quot;
}
]
}
]
}</code></pre>
<p>|</p>
<p><strong>备注</strong></p>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul>