商品分类
<p><strong>简要描述:</strong></p>
<ul>
<li>商品分类</li>
</ul>
<p><strong>请求URL:</strong></p>
<ul>
<li><code>https://api-hmugo-web.itheima.net/api/public/v1/categories</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>GET</li>
</ul>
<p><strong>参数:</strong> 无</p>
<p><strong>返回示例</strong></p>
<pre><code>{
&quot;message&quot;: [
{
&quot;cat_id&quot;: 1,
&quot;cat_name&quot;: &quot;大家电&quot;,
&quot;cat_pid&quot;: 0,
&quot;cat_level&quot;: 0,
&quot;cat_deleted&quot;: false,
&quot;cat_icon&quot;: &quot;&quot;,
&quot;children&quot;: [
{
&quot;cat_id&quot;: 3,
&quot;cat_name&quot;: &quot;电视&quot;,
&quot;cat_pid&quot;: 1,
&quot;cat_level&quot;: 1,
&quot;cat_deleted&quot;: false,
&quot;cat_icon&quot;: &quot;&quot;,
&quot;children&quot;: [
{
&quot;cat_id&quot;: 5,
&quot;cat_name&quot;: &quot;曲面电视&quot;,
&quot;cat_pid&quot;: 3,
&quot;cat_level&quot;: 2,
&quot;cat_deleted&quot;: false,
&quot;cat_icon&quot;: &quot;https://api-hmugo-web.itheima.net/full/2fb113b32f7a2b161f5ee4096c319afedc3fd5a1.jpg&quot;
}
]
}
]
}
],
&quot;meta&quot;: {
&quot;msg&quot;: &quot;获取成功&quot;,
&quot;status&quot;: 200
}
}</code></pre>
<p><strong>返回参数说明</strong></p>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>cat_id</td>
<td>int</td>
<td>分类id</td>
</tr>
<tr>
<td>cat_name</td>
<td>string</td>
<td>分类名称</td>
</tr>
<tr>
<td>children</td>
<td>array</td>
<td>子节点</td>
</tr>
<tr>
<td>cat_icon</td>
<td>string</td>
<td>图标</td>
</tr>
</tbody>
</table>
<p><strong>备注</strong></p>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul>