查询用户信息
<h2>查询用户信息接口</h2>
<h3>接口描述</h3>
<p>该接口用于查询用户的详细信息。</p>
<h3>请求方式</h3>
<p>GET</p>
<h3>请求地址</h3>
<p><code>/nrl/api/user/info</code></p>
<h3>请求参数</h3>
<ul>
<li><font color='red'>header需要带授权X-Token</font></li>
</ul>
<table>
<thead>
<tr>
<th>参数名</th>
<th>参数类型</th>
<th>是否必填</th>
<th>参数描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>userId</td>
<td>int</td>
<td>是</td>
<td>用户ID</td>
</tr>
</tbody>
</table>
<h3>响应参数</h3>
<table>
<thead>
<tr>
<th>参数名</th>
<th>参数类型</th>
<th>参数描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>userId</td>
<td>int</td>
<td>用户ID</td>
</tr>
<tr>
<td>username</td>
<td>string</td>
<td>用户名</td>
</tr>
<tr>
<td>role</td>
<td>int</td>
<td>角色(1:管理员,2:审核员,3:核查员,4:审定员)</td>
</tr>
<tr>
<td>roleName</td>
<td>string</td>
<td>角色名称</td>
</tr>
</tbody>
</table>
<h3>响应示例</h3>
<pre><code class="language-json">{
&quot;code&quot;: 200,
&quot;message&quot;: &quot;操作成功&quot;,
&quot;data&quot;: {
&quot;userId&quot;: 1,
&quot;username&quot;: &quot;John Doe&quot;,
&quot;role&quot;: 1,
&quot;roleName&quot;: &quot;管理员&quot;
}
}</code></pre>
<h3>错误码</h3>
<table>
<thead>
<tr>
<th>错误码</th>
<th>错误信息</th>
</tr>
</thead>
<tbody>
<tr>
<td>500</td>
<td>操作失败</td>
</tr>
<tr>
<td>401</td>
<td>暂未登录或token已经过期</td>
</tr>
<tr>
<td>403</td>
<td>没有相关权限</td>
</tr>
<tr>
<td>404</td>
<td>参数检验失败</td>
</tr>
</tbody>
</table>