创建订单
<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/my/orders/create</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST</li>
</ul>
<p><strong>请求头参数:</strong></p>
<table>
<thead>
<tr>
<th>参数名</th>
<th>必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>Authorization</td>
<td>是</td>
<td>string</td>
<td>用户登录成功获取的token值</td>
</tr>
</tbody>
</table>
<p><strong>请求体参数</strong>:</p>
<table>
<thead>
<tr>
<th>参数名</th>
<th>必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>order_price</td>
<td>是</td>
<td>string</td>
<td>订单总价格</td>
</tr>
<tr>
<td>consignee_addr</td>
<td>是</td>
<td>string</td>
<td>收货地址</td>
</tr>
<tr>
<td>goods</td>
<td>是</td>
<td>Array</td>
<td>订单数组</td>
</tr>
</tbody>
</table>
<p><strong>goods字段说明</strong></p>
<table>
<thead>
<tr>
<th>参数名</th>
<th>必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>goods_id</td>
<td>是</td>
<td>number</td>
<td>商品id</td>
</tr>
<tr>
<td>goods_number</td>
<td>是</td>
<td>number</td>
<td>购买的数量</td>
</tr>
<tr>
<td>goods_price</td>
<td>是</td>
<td>number</td>
<td>单价</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<pre><code> {
&quot;error_code&quot;: 0,
&quot;data&quot;: {
&quot;uid&quot;: &quot;1&quot;,
&quot;username&quot;: &quot;12154545&quot;,
&quot;name&quot;: &quot;吴系挂&quot;,
&quot;groupid&quot;: 2 ,
&quot;reg_time&quot;: &quot;1436864169&quot;,
&quot;last_login_time&quot;: &quot;0&quot;,
}
}</code></pre>
<p><strong>返回参数说明</strong></p>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>参数说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>order_id</td>
<td>string</td>
<td>订单唯一ID</td>
</tr>
<tr>
<td>user_id</td>
<td>string</td>
<td>用户ID</td>
</tr>
<tr>
<td>order_number</td>
<td>string</td>
<td>订单编号</td>
</tr>
<tr>
<td>order_price</td>
<td>number</td>
<td>订单价格</td>
</tr>
<tr>
<td>order_pay</td>
<td>number</td>
<td>订单支付方式</td>
</tr>
<tr>
<td>consignee_addr</td>
<td>string</td>
<td>订单地址</td>
</tr>
<tr>
<td>pay_status</td>
<td>number</td>
<td>订单支付状态</td>
</tr>
</tbody>
</table>