ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
**1.接口地址**:http://api.zishahui.vip/product-order/create-order **2.支持格式**:json **3.请求方式**:post **4.请求参数**: | 参数 | 必填 | 类型 | 说明 | | --- | --- | --- | --- | |user_id |是 | int | 用户ID| |user_name |是 | string | 收货人姓名| |phone |是 | int | 收货人电话| |address |是 | string | 收货人地址| |total_money |是 | int | 总金额| **从商品页面购买** | 参数 | 必填 | 类型 | 说明 | | --- | --- | --- | --- | |goods_id |是 | int | 商品ID| |num |是 | int | 商品数量| |note |否 | string | 买家留言| **从购物车购买** | 参数 | 必填 | 类型 | 说明 | | --- | --- | --- | --- | |cart_id |是 | string | 购物车id,多个购物车ID按照逗号连接| |note |否 | string | 买家留言(,多个店铺要对应,一个商家对应一个留言信息)| ***5.返回字段说明*** |名称|类型|说明| |---|:---:|--:|--:| |code|int|返回码| |msg|string|返回提示信息| |data|string|返回数据| ***5.data字段说明*** |名称|类型|说明| |---|:---:|--:|--:| |id|int|订单ID| |order_num|int|订单编号| |pay_way|int|支付方式| |total_money|int|总金额| *******成功示列******* { "code": "1", "msg": "添加成功", "data": { "id": "4", "order_num": "228340372711", "total_money": " 1200.00", "pay_way": "1" } } { "code": "1", "msg": "添加成功", "data": { "1": { "order_id": "70", "order_num": "227836564697", "total_money": " 21476.00", "pay_way": "1" }, "2": { "order_id": "71", "order_num": "227836587249", "total_money": " 2400.00", "pay_way": "1" } } } *******获取失败******* { "code": "-1", "msg": "库存不足!", "data": [] } { "code": "-1", "msg": "非法金额!", "data": [] } { "code": "-1", "msg": "失败!", "data": [] }