简要描述:

  • 返回用户的所有订单(包括 "已完成" & "已取消" & "待支付" & "待发货" & "待收货", 不包括"已删除"的订单)

请求域名:

请求URL:

全部订单:
GET/&route=plugin.hotel.frontend.hotel.list
待支付订单:
GET/&route=plugin.hotel.frontend.hotel.list.wait-pay
待确认订单:
GET/&route=plugin.hotel.frontend.hotel.list.wait-send
待入住订单:
GET/&route=plugin.hotel.frontend.hotel.list.wait-enter
待退房订单:
GET/&route=plugin.hotel.frontend.hotel.list.check-out
已完成订单:
GET/&route=plugin.hotel.frontend.hotel.list.completed

参数:

参数名 是否必须 类型 说明
pagesize int 分页 - 每页数量; 默认是 5
page int 分页 - 页码

返回示例:

正确时返回:

{
    "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 恤"
                    }
                ]
            }, 
        ]
    }
}

错误时返回:

  • 缺少访问参数 memberid
{
	"result": 0,
	"msg": "缺少访问参数",
	"data": []
}
  • 未找到数据
{
    "result": 0, 
    "msg": "未找到数据", 
    "data": [ ]
}

返回参数说明:

参数名 类型 说明
id int 订单 ID
order_sn string 订单号
price int 订单金额(实际支付)
goods_price int 商品金额
status_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 商品图片

###酒店订单参数说明 hotel_order

参数名 类型 说明
enter_at string 开始租房时间
leave_at string 结束租房时间

备注: