订单列表路由
<h5>接口描述</h5>
<ul>
<li>订单列表模板</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>/api/admin/orders</code></li>
</ul>
<h5>请求方式</h5>
<ul>
<li>GET</li>
</ul>
<h5>请求头部</h5>
<p>|参数名|必选|类型|说明|
|:---- |:---|:----- |----- |
|Authorization |是 |string |JWT token|</p>
<h5>Query 请求参数</h5>
<p>|参数名|必选|类型|说明|
|:---- |:---|:----- |----- |
|order_no |是 |string |查询订单单号 |
|trade_no |是 |string |查询支付单号 |
|status |是 |string |查询订单状态 |
|include |是 |string |user,orderDetails.goods |</p>
<h5>返回示例</h5>
<ul>
<li>状态码 200 请求成功</li>
</ul>
<pre><code>{
&quot;data&quot;: [
{
&quot;id&quot;: 1,
&quot;user_id&quot;: 1,
&quot;order_no&quot;: &quot;20240331&quot;,
&quot;amount&quot;: 100,
&quot;status&quot;: 2,
&quot;address_id&quot;: 1,
&quot;express_type&quot;: &quot;SF&quot;,
&quot;express_no&quot;: &quot;240331&quot;,
&quot;pay_time&quot;: &quot;2024-03-31 20:39:28&quot;,
&quot;pay_type&quot;: &quot;微信&quot;,
&quot;trade_no&quot;: &quot;2024331&quot;,
&quot;created_at&quot;: &quot;2024-03-31T20:33:53.000000Z&quot;,
&quot;updated_at&quot;: &quot;2024-03-31T20:33:55.000000Z&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;orderDetails&quot;: {
&quot;data&quot;: [
{
&quot;id&quot;: 1,
&quot;order_id&quot;: 1,
&quot;goods_id&quot;: 1,
&quot;price&quot;: 50,
&quot;num&quot;: 1,
&quot;created_at&quot;: null,
&quot;updated_at&quot;: null,
&quot;goods&quot;: {
&quot;data&quot;: {
&quot;id&quot;: 1,
&quot;category_id&quot;: 7,
&quot;description&quot;: &quot;这是一台电脑&quot;,
&quot;price&quot;: 4999,
&quot;stock&quot;: 999,
&quot;cover&quot;: &quot;默认头像.jpg&quot;,
&quot;cover_url&quot;: &quot;https://laravel-shop-api-study.oss-cn-hongkong.aliyuncs.com/默认头像.jpg&quot;,
&quot;pics&quot;: [
&quot;a.png&quot;,
&quot;b.png&quot;
],
&quot;pics_url&quot;: [
&quot;https://laravel-shop-api-study.oss-cn-hongkong.aliyuncs.com/a.png&quot;,
&quot;https://laravel-shop-api-study.oss-cn-hongkong.aliyuncs.com/b.png&quot;
],
&quot;details&quot;: &quot;这是一台好用的电脑&quot;,
&quot;title&quot;: &quot;电脑111&quot;,
&quot;is_on&quot;: 1,
&quot;is_recommend&quot;: 1,
&quot;created_at&quot;: &quot;2024-03-30T09:18:17.000000Z&quot;,
&quot;updated_at&quot;: &quot;2024-03-30T17:43:05.000000Z&quot;
}
}
},
{
&quot;id&quot;: 2,
&quot;order_id&quot;: 1,
&quot;goods_id&quot;: 2,
&quot;price&quot;: 50,
&quot;num&quot;: 1,
&quot;created_at&quot;: null,
&quot;updated_at&quot;: null,
&quot;goods&quot;: {
&quot;data&quot;: {
&quot;id&quot;: 2,
&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;cover_url&quot;: &quot;https://laravel-shop-api-study.oss-cn-hongkong.aliyuncs.com//imgs/img/1.png&quot;,
&quot;pics&quot;: [
&quot;a.png&quot;,
&quot;b.png&quot;
],
&quot;pics_url&quot;: [
&quot;https://laravel-shop-api-study.oss-cn-hongkong.aliyuncs.com/a.png&quot;,
&quot;https://laravel-shop-api-study.oss-cn-hongkong.aliyuncs.com/b.png&quot;
],
&quot;details&quot;: &quot;这是一台好用的电脑&quot;,
&quot;title&quot;: &quot;电脑2&quot;,
&quot;is_on&quot;: 0,
&quot;is_recommend&quot;: 0,
&quot;created_at&quot;: &quot;2024-03-30T09:18:21.000000Z&quot;,
&quot;updated_at&quot;: &quot;2024-03-30T09:18:21.000000Z&quot;
}
}
}
]
}
}
],
&quot;meta&quot;: {
&quot;pagination&quot;: {
&quot;total&quot;: 1,
&quot;count&quot;: 1,
&quot;per_page&quot;: 15,
&quot;current_page&quot;: 1,
&quot;total_pages&quot;: 1,
&quot;links&quot;: {}
}
}
}</code></pre>
<ul>
<li>
<p>状态码 200 成功</p>
</li>
<li>状态码 422 参数错误</li>
</ul>