菜单列表路由
<h5>接口描述</h5>
<ul>
<li>菜单列表模板</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>/api/admin/menus</code></li>
</ul>
<h5>请求方式</h5>
<ul>
<li>GET</li>
</ul>
<h5>请求头部</h5>
<p>|参数名|必选|类型|说明|
|:---- |:---|:----- |----- |
|Authorization |是 |string |JWT token|</p>
<h5>Query 请求参数</h5>
<p>|参数名|必选|类型|说明|
|:---- |:---|:----- |----- |
|type |否 |string |all 显示所有 |</p>
<h5>返回示例</h5>
<ul>
<li>状态码 200 请求成功</li>
</ul>
<pre><code>[
{
&quot;id&quot;: 50,
&quot;pid&quot;: 0,
&quot;level&quot;: 1,
&quot;name&quot;: &quot;用户管理&quot;,
&quot;status&quot;: 1,
&quot;children&quot;: [
{
&quot;id&quot;: 51,
&quot;pid&quot;: 50,
&quot;name&quot;: &quot;用户列表&quot;,
&quot;level&quot;: 2,
&quot;status&quot;: 1,
&quot;children&quot;: []
}
]
},
{
&quot;id&quot;: 52,
&quot;pid&quot;: 0,
&quot;level&quot;: 1,
&quot;name&quot;: &quot;分类管理&quot;,
&quot;status&quot;: 1,
&quot;children&quot;: [
{
&quot;id&quot;: 53,
&quot;pid&quot;: 52,
&quot;name&quot;: &quot;分类列表&quot;,
&quot;level&quot;: 2,
&quot;status&quot;: 1,
&quot;children&quot;: []
},
{
&quot;id&quot;: 54,
&quot;pid&quot;: 52,
&quot;name&quot;: &quot;添加分类&quot;,
&quot;level&quot;: 2,
&quot;status&quot;: 1,
&quot;children&quot;: []
}
]
},
{
&quot;id&quot;: 55,
&quot;pid&quot;: 0,
&quot;level&quot;: 1,
&quot;name&quot;: &quot;商品管理&quot;,
&quot;status&quot;: 1,
&quot;children&quot;: [
{
&quot;id&quot;: 56,
&quot;pid&quot;: 55,
&quot;name&quot;: &quot;商品列表&quot;,
&quot;level&quot;: 2,
&quot;status&quot;: 1,
&quot;children&quot;: []
},
{
&quot;id&quot;: 57,
&quot;pid&quot;: 55,
&quot;name&quot;: &quot;添加商品&quot;,
&quot;level&quot;: 2,
&quot;status&quot;: 1,
&quot;children&quot;: []
}
]
},
{
&quot;id&quot;: 58,
&quot;pid&quot;: 0,
&quot;level&quot;: 1,
&quot;name&quot;: &quot;评价管理&quot;,
&quot;status&quot;: 1,
&quot;children&quot;: [
{
&quot;id&quot;: 59,
&quot;pid&quot;: 58,
&quot;name&quot;: &quot;评价列表&quot;,
&quot;level&quot;: 2,
&quot;status&quot;: 1,
&quot;children&quot;: []
}
]
},
{
&quot;id&quot;: 60,
&quot;pid&quot;: 0,
&quot;level&quot;: 1,
&quot;name&quot;: &quot;订单管理&quot;,
&quot;status&quot;: 1,
&quot;children&quot;: [
{
&quot;id&quot;: 61,
&quot;pid&quot;: 60,
&quot;name&quot;: &quot;订单列表&quot;,
&quot;level&quot;: 2,
&quot;status&quot;: 1,
&quot;children&quot;: []
}
]
},
{
&quot;id&quot;: 62,
&quot;pid&quot;: 0,
&quot;level&quot;: 1,
&quot;name&quot;: &quot;轮播管理&quot;,
&quot;status&quot;: 1,
&quot;children&quot;: [
{
&quot;id&quot;: 63,
&quot;pid&quot;: 62,
&quot;name&quot;: &quot;轮播列表&quot;,
&quot;level&quot;: 2,
&quot;status&quot;: 1,
&quot;children&quot;: []
},
{
&quot;id&quot;: 64,
&quot;pid&quot;: 62,
&quot;name&quot;: &quot;添加轮播&quot;,
&quot;level&quot;: 2,
&quot;status&quot;: 1,
&quot;children&quot;: []
}
]
},
{
&quot;id&quot;: 65,
&quot;pid&quot;: 0,
&quot;level&quot;: 1,
&quot;name&quot;: &quot;菜单管理&quot;,
&quot;status&quot;: 1,
&quot;children&quot;: [
{
&quot;id&quot;: 66,
&quot;pid&quot;: 65,
&quot;name&quot;: &quot;菜单列表&quot;,
&quot;level&quot;: 2,
&quot;status&quot;: 1,
&quot;children&quot;: []
},
{
&quot;id&quot;: 67,
&quot;pid&quot;: 65,
&quot;name&quot;: &quot;添加菜单&quot;,
&quot;level&quot;: 2,
&quot;status&quot;: 1,
&quot;children&quot;: []
}
]
}
]</code></pre>
<ul>
<li>
<p>状态码 201 成功</p>
</li>
<li>状态码 401</li>
</ul>