晶硕后台登录
<p><strong>简要描述:</strong>
【接口功能】根据token 查询最新一条演练预设的 演练信息</p>
<ul>
<li>接口编写人员:xx</li>
<li>接口开发人员:xx</li>
</ul>
<p><strong>请求URL:</strong></p>
<ul>
<li><code>http://xxx</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>GET </li>
<li>http请求head需设置数据编码方式:Content-Type=application/json;charset=utf-8</li>
</ul>
<p><strong>是否需要登录:</strong>不需要</p>
<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;">username</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>用户名</td>
</tr>
<tr>
<td style="text-align: left;">password</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>密码</td>
</tr>
</tbody>
</table>
<p>测试账号
// //王全昱 123456
// userIds.add("1817103986915065858");
// //王建椿 123456
// userIds.add("1817104117898985474");
// //戴炜婷 123456
// userIds.add("1817104720884711425");</p>
<p><strong>请求示例</strong></p>
<pre><code>curl --location --request POST 'http://192.168.110.5:8896/info_college/spnpc1main/apiLogin' \
--header 'Content-Type: application/json' \
--data-raw '{
&quot;username&quot;: &quot;戴炜婷&quot;,
&quot;password&quot;: &quot;123456&quot;
}'</code></pre>
<p><strong>返回示例</strong></p>
<pre><code>{
&quot;msg&quot;: &quot;success&quot;,
&quot;code&quot;: 0,
&quot;userId&quot;: &quot;1817104720884711425&quot;,
&quot;token&quot;: &quot;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTgxNzEwNDcyMDg4NDcxMTQyNSwidXNlcm5hbWUiOiLmiLTngpzlqbciLCJyZWFsTmFtZSI6IuaItOeCnOWptyIsImhlYWRVcmwiOiIiLCJnZW5kZXIiOiJmZW1hbGUiLCJpYXQiOjE3MjUwOTcwMDUsIm5iZiI6MTcyNTA5NzAwNSwiZXhwIjoxNzI1MTI1ODA1fQ.k3d6ViWvgqAaHDNtiu99W0X7DdLe4w_ss8Ob9GV_0DU&quot;
}
{
&quot;msg&quot;: &quot;{\&quot;code\&quot;:10004,\&quot;msg\&quot;:\&quot;账号或密码错误\&quot;,\&quot;data\&quot;:null}&quot;,
&quot;code&quot;: 500
}</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;">code</td>
<td style="text-align: left;">int</td>
<td>请求状态 0成功,非0失败</td>
</tr>
<tr>
<td style="text-align: left;">userId</td>
<td style="text-align: left;">string</td>
<td>玩家id</td>
</tr>
<tr>
<td style="text-align: left;">token</td>
<td style="text-align: left;">string</td>
<td>token</td>
</tr>
</tbody>
</table>
<p><strong>备注</strong> </p>
<p>更多返回错误代码请看[首页-公共-错误代码描述]的描述
1.<strong>Content-Type=application/json</strong>
2.<strong>请求参数传JSON格式:</strong></p>
<p>通过判断code是否等于0判断是否正常返回</p>