商品列表路由
<h5>接口描述</h5>
<ul>
<li>商品列表模块</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>/api/admin/goods</code></li>
</ul>
<h5>请求方式</h5>
<ul>
<li>GET</li>
</ul>
<h5>请求头部</h5>
<p>|参数名|必选|类型|说明|
|:---- |:---|:----- |----- |
|Authorization |是 |string |JWT token|</p>
<h5>Query 请求参数</h5>
<p>|参数名|必选|类型|说明|
|:---- |:---|:----- |----- |
|include |是 |string |额外的分类数据:category,user 和 comments |
|title |是 |string |指定的title |</p>
<h5>返回示例</h5>
<ul>
<li>状态码 200 请求成功</li>
</ul>
<pre><code>{
&quot;data&quot;: [
{
&quot;id&quot;: 3,
&quot;category_id&quot;: 7,
&quot;description&quot;: &quot;这是一台电脑&quot;,
&quot;price&quot;: 4999,
&quot;stock&quot;: 999,
&quot;cover&quot;: &quot;/imgs/img/1.png&quot;,
&quot;pics&quot;: [
&quot;a.png&quot;,
&quot;b.png&quot;
],
&quot;details&quot;: &quot;这是一台好用的电脑&quot;,
&quot;title&quot;: &quot;电脑3&quot;,
&quot;is_on&quot;: 0,
&quot;is_recommend&quot;: 0,
&quot;created_at&quot;: &quot;2024-03-30T09:18:25.000000Z&quot;,
&quot;updated_at&quot;: &quot;2024-03-30T09:18:25.000000Z&quot;,
&quot;category&quot;: {
&quot;data&quot;: {
&quot;id&quot;: 7,
&quot;name&quot;: &quot;华硕&quot;
}
},
&quot;user&quot;: {
&quot;data&quot;: {
&quot;id&quot;: 1,
&quot;name&quot;: &quot;a&quot;,
&quot;email&quot;: &quot;a@a.com&quot;,
&quot;created_at&quot;: null,
&quot;updated_at&quot;: &quot;2024-03-27T20:04:08.000000Z&quot;
}
}
}
],
&quot;meta&quot;: {
&quot;pagination&quot;: {
&quot;total&quot;: 1,
&quot;count&quot;: 1,
&quot;per_page&quot;: 2,
&quot;current_page&quot;: 1,
&quot;total_pages&quot;: 1,
&quot;links&quot;: {}
}
}
}</code></pre>
<ul>
<li>
<p>状态码 200 成功</p>
</li>
<li>状态码 401</li>
</ul>