获取分类数据
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>http://119.91.153.159:81/sort</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>GET </li>
</ul>
<p><strong>返回示例</strong></p>
<pre><code>{
"code": 200,
"msg": "success",
"data": [
{
"id": "1",
"name": "前端",
"pid": "0",
"level": 0,
"list": [
{
"id": "3",
"name": "HTML5",
"pid": "1",
"level": 1,
"list": []
},
{
"id": "4",
"name": "CSS3",
"pid": "1",
"level": 1,
"list": []
}
]
},
{
"id": "2",
"name": "后端",
"pid": "0",
"level": 0,
"list": [
{
"id": "5",
"name": "PHP",
"pid": "2",
"level": 1,
"list": []
}
]
}
]
}
</code></pre>
<h5>返回参数说明</h5>
<table>
<thead>
<tr>
<th>参数名</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>分类id</td>
</tr>
<tr>
<td>name</td>
<td>分类名称</td>
</tr>
<tr>
<td>level</td>
<td>分类等级</td>
</tr>
<tr>
<td>list</td>
<td>子分类</td>
</tr>
</tbody>
</table>