文档
测试

生成预订单

POST
http://192.168.0.101/v1/order

接口描述

生成预订单

请求头

参数名
类型
描述
必填
token
string
示例:8e86c255678885c499d7be6942f41a5c
必填

请求参数

参数名
类型
描述
必填
goods
array
数据集合
必填
goods[0][goods_id]
int
商品id
必填
goods[0][name]
string
商品名
必填
goods[0][goods_num]
int
购买数量
必填
goods[0][attr_id]
int
组合id
必填

响应参数

参数名
类型
描述
必填
errorCode
int
自定义错误码
必填
msg
string
消息
必填
rows
object
数据字典
必填
orderPrice
int
订单总额
必填
totalCount
int
订单购买总数
必填
pStatus
array
数据列表
必填
goods_id
int
商品id
必填
goods_name
string
商品名
必填
goods_image
string
商品主图
必填
goods_num
string
商品购买数
必填
totalPrice
int
商品总额
必填
goods_price
string
商品单价
必填
attr_id
string
组合id
必填
snapAddress
object
数据字典
必填
id
int
地址id
必填
username
string
姓名
必填
telphone
string
电话号码
必填
provice
string
地址所在省
必填
address
string
详细地址
必填
is_default
int
默认选中
必填
status
int
使用状态 0正常
必填
uid
int
用户id号
必填
createtime
string
创建时间
必填
snapName
string
订单的商品简介
必填
snapImg
string
订单商品简介图
必填
shopping_price
int
运费总额
必填
user_sale
int
商品折扣率(百分制)
必填
sale_price
int
折扣金额
必填
realPrice
int
实际支付金额
必填
orderType
int
所属订单类型 1原料 2粉料
必填

说明 / 示例

{ "errorCode": 1000, "msg": "获取预订单信息成功", "rows": { "orderPrice": 20, "totalCount": 2, "pStatus": [ { "goods_id": 3, "goods_name": "牛肉汤料", "goods_image": "http://qiniu.emjiayuan.com/upload_file/ems/2018071610161252234", "goods_num": "1", "totalPrice": 10, "goods_price": "10.00", "attr_id": "1", "counts": "1" }, { "goods_id": 5, "goods_name": "鸡精", "goods_image": "http://qiniu.emjiayuan.com/upload_file/ems/2018071610161252234", "goods_num": "1", "totalPrice": 10, "goods_price": "10.00", "attr_id": "", "counts": "1" } ], "snapAddress": { "id": 2, "username": "子峰", "telphone": "15000000000", "provice": "浙江", "address": "宁波镇海区", "is_default": 1, "status": 0, "uid": 1, "createtime": "2020-04-30 18:00:00" }, "snapName": "牛肉汤料等", "snapImg": "http://qiniu.emjiayuan.com/upload_file/ems/2018071610161252234", "shopping_price": 22, "user_sale": 90, "sale_price": 2, "realPrice": 40, "orderType": 1 } }