用户登陆
<p><strong>简要描述:</strong> </p>
<ul>
<li>用户登陆接口</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://xx.com/api/mall/login</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST </li>
</ul>
<p><strong>参数:</strong> </p>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">code</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>微信code</td>
</tr>
<tr>
<td style="text-align: left;">share_key</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>分享者Key</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<pre><code> {
"result":"success",
"data":{
"access_token":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3RcL2FwaVwvYWRtaW5cL2xvZ2luIiwiaWF0IjoxNTI4MDg0NzMxLCJleHAiOjE1MjgzMDA3MzEsIm5iZiI6MTUyODA4NDczMSwianRpIjoia09QWVdsOEc0eXNkbzFoVSIsInN1YiI6MSwicHJ2IjoiODdlMGFmMWVmOWZkMTU4MTJmZGVjOTcxNTNhMTRlMGIwNDc1NDZhYSJ9.QyR5kKvHR6IFoXE7dFrAFYQMn2MkJ1d6wSAsT0IBAs4",
"user":{
"id":1,
"login":"admin",
"avatar":null,
"remember_token":null,
"nickname":null,
"mobile":null,
"email":null,
"language":"zh",
"role_id":0,
"last_login_at":null,
"created_at":null,
"updated_at":null,
"created_by":null,
"updated_by":null,
"deleted_at":null
}
},
"message":"登录成功"
}</code></pre>
<p><strong>返回参数说明</strong> </p>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">groupid</td>
<td style="text-align: left;">int</td>
<td>用户组id,1:超级管理员;2:普通用户</td>
</tr>
</tbody>
</table>
<p><strong>备注</strong> </p>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul>
<p>欢迎使用ShowDoc!</p>