获取用户token
<p><br />
<strong>简要描述:</strong> </p>
<ul>
<li>获取用户token</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>https://api-hmugo-web.itheima.net/api/public/v1/users/wxlogin</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST </li>
</ul>
<p><strong>参数:</strong> </p>
<p>以下字段主要用作后台服务器生成用户token所有,无特殊用意</p>
<table>
<thead>
<tr>
<th>参数名</th>
<th>必选</th>
<th>类型</th>
<th>参数说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>encryptedData</td>
<td>是</td>
<td>string</td>
<td>执行小程序 获取用户信息后 得到</td>
</tr>
<tr>
<td>rawData</td>
<td>是</td>
<td>string</td>
<td>执行小程序 获取用户信息后 得到</td>
</tr>
<tr>
<td>iv</td>
<td>是</td>
<td>string</td>
<td>执行小程序 获取用户信息后 得到</td>
</tr>
<tr>
<td>signature</td>
<td>是</td>
<td>string</td>
<td>执行小程序 获取用户信息后 得到</td>
</tr>
<tr>
<td>code</td>
<td>是</td>
<td>string</td>
<td>执行小程序登录后获取</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<pre><code class="language-json">{
"message": {
"user_id": 23,
"user_email_code": null,
"is_active": null,
"user_sex": "男",
"user_qq": "",
"user_tel": "",
"user_xueli": "本科",
"user_hobby": "",
"user_introduce": null,
"create_time": 1562221487,
"update_time": 1562221487,
"token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjIzLCJpYXQiOjE1NjQ3MzAwNzksImV4cCI6MTAwMTU2NDczMDA3OH0.YPt-XeLnjV-_1ITaXGY2FhxmCe4NvXuRnRB8OMCfnPo"
},
"meta": {
"msg": "登录成功",
"status": 200
}
}</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;">token</td>
<td style="text-align: left;">string</td>
<td>用户的唯一凭据,后期用在其他敏感接口的验证</td>
</tr>
</tbody>
</table>