简要描述:
- 返回用户的所有订单(包括 "已完成" & "已取消" & "待支付" & "待发货" & "待收货", 不包括"已删除"的订单)
请求域名:
请求URL:
GET/route=plugin.store-cashier.frontend.pos.order-list
参数:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
pagesize | 否 | int | 分页 - 每页数量; 默认是 5 |
page | 否 | int | 分页 - 页码 |
uid | 否 | int | 会员ID(卡号) |
order_sn | 否 | string | 订单号 |
time | 否 | array | [开始时间戳,结束时间戳] |
keyword | 否 | string | 关键字搜索 |
返回示例:
正确时返回:
{
"result": 1,
"msg": "ok",
"data": {
"total": 5,
"per_page": 5,
"current_page": 1,
"last_page": 1,
"next_page_url": null,
"prev_page_url": null,
"from": 1,
"to": 5,
"data": [
{
"id": 1,
"order_sn": "SH20170302032407269208",
"price": 480,
"goods_price": 600,
"goods_total":1,
"status_name": "待收货",
"button_models": [
{
"name": "确认收货",
"api": "/order/pay",
"value": 1
},
{
"name": "查看物流",
"api": "/order/op/",
"value": 8
}
],
"has_many_order_goods": [
{
"goods_id": 1,
"goods_price": "300.00",
"total": 1,
"price": 300,
"thumb": "http://demo.yunzshop.com/attachment/images/sz_yi/3/2017/01/ckUQfl.jpg",
"title": "外套"
},
{
"goods_id": 2,
"goods_price": "100.00",
"total": 3,
"price": 300,
"thumb": "http://demo.yunzshop.com/attachment/images/sz_yi/1/2017/03/9usdl9.jpg",
"title": "T 恤"
}
]
},
{
"id": 2,
"order_sn": "SH20170302032541822244",
"price": 1360,
"goods_price": 1700,
"status_name": "待付款",
"button_models": [
{
"name": "付款",
"api": "/order/op/pay",
"value": 1
},
{
"name": "取消订单",
"api": "/order/op/cancelPay",
"value": 9
}
],
"has_many_order_goods": [
{
"goods_id": 1,
"goods_price": "300.00",
"total": 4,
"price": 1200,
"thumb": "http://demo.yunzshop.com/attachment/images/sz_yi/3/2017/01/ckUQfl.jpg",
"title": "外套"
},
{
"goods_id": 2,
"goods_price": "100.00",
"total": 5,
"price": 500,
"thumb": "http://demo.yunzshop.com/attachment/images/sz_yi/1/2017/03/9usdl9.jpg",
"title": "T 恤"
}
],
"address": {
"address": "北京 北京市 门头沟区 测试",
"mobile": "15219025049",
"realname": "测试"
},
"dispatch_type_name": "快递",
"shop_name": "门店-轻微的",
"plugin_id": 32,
},
]
}
}
错误时返回:
- 缺少访问参数 memberid
{
"result": 0,
"msg": "缺少访问参数",
"data": []
}
- 未找到数据
{
"result": 0,
"msg": "未找到数据",
"data": [ ]
}
返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
id | int | 订单 ID |
order_sn | string | 订单号 |
price | int | 订单金额(实际支付) |
goods_price | int | 商品金额 |
status_name | string | 订单状态 |
pay_type_name | string | 支付方式 |
button_models | array | 操作按钮组 |
button_models['name'] | string | 按钮文字 |
button_models['api'] | string | 按钮关联的 API 路径 |
button_models['value'] | int | 显示在 HTML 表单的 Value 值 |
has_many_order_goods | array | 该订单下的商品列表 |
has_many_order_goods['goods_id'] | int | 商品 ID |
has_many_order_goods['goods_price'] | int | 商品价格 |
has_many_order_goods['total'] | int | 订单中该商品的数量 |
has_many_order_goods['price'] | int | 实际支付的该商品的总价 |
has_many_order_goods['title'] | string | 商品名称 |
has_many_order_goods['thumb'] | string | 商品图片 |
has_many_order_goods['payment_amount'] | string | 商品支付金额 |
address.address | string | 订单地址 |
address.mobile | string | 收货人电话 |
address.realname | string | 收货人姓名 |
dispatch_type_name | string | 配方方式名称 |
shop_name | string | 店铺名称 |
plugin_id | int | 订单类型 0自营 92供应商 31、32门店 |
is_all_send_goods | int | 订单已发货判断这个 0 正常全部发货 1部分发货 2多包裹全部发货 |
belongs_to_member[uid] | int | 会员卡号 |
belongs_to_member[nickname] | string | 会员昵称 |
create_time | string | 订单创建时间 |