简要描述:

  • 配送订单的所有订单(包括 "已完成" & "已取消" & "待支付" & "待接单" & "待发货", 不包括"已删除"的订单)

  • 会员中心是否显示租赁订单列表 标识 is_open_lease_toy = 1 显示, 0 隐藏

请求域名:

请求URL:

全部订单:
GET/&route=plugin.lease-toy.api.order.order-list.index
待支付订单:
GET/&route=plugin.lease-toy.api.order.order-list.wait-pay
待发货:
GET/&route=plugin.lease-toy.api.order.order-list.wait-send
待收货:
GET/&route=plugin.lease-toy.api.order.order-list.wait-receive
已完成订单:
GET/&route=plugin.lease-toy.api.order.order-list.completed
待归还:
GET/&route=plugin.lease-toy.api.order.order-list.wait-refund

参数:

参数名 是否必须 类型 说明

返回示例:

正确时返回:

{
    result: 1, 
    msg: "ok", 
    data: {
        total: 2, 
        per_page: 20, 
        current_page: 1, 
        last_page: 1, 
        next_page_url: null, 
        prev_page_url: null, 
        from: 1, 
        to: 2, 
        data: [
            {
                id: 743, 
                order_sn: "SN20180716094336fD", 
                price: "300.00", 
                goods_price: "200.00", 
                goods_total: 1, 
                status: 3, 
                cancel_pay_time: "1970-01-01 08:00:00", 
                cancel_send_time: "1970-01-01 08:00:00", 
                dispatch_type_id: 0, 
                dispatch_price: "10.00", 
                discount_price: "10.00", 
                pay_type_id: 5, 
                order_goods_price: "200.00", 
                deduction_price: "0.00", 
                refund_id: 0, 
                is_plugin: 0, 
                change_price: "0.00", 
                change_dispatch_price: "0.00", 
                comment_status: 0, 
                order_pay_id: "0", 
                plugin_id: 40, 
                is_virtual: 1, 
                mark: "", 
                is_pending: 0, 
                note: null, 
                cost_amount: "0.00", 
                shop_name: null, 
                no_refund: 0, 
                need_address: 0, 
                invoice_type: null, 
                rise_type: null, 
                collect_name: null, 
                company_number: null, 
                invoice: null, 
                auto_receipt: 0, 
                fee_amount: "0.00", 
                status_name: "审核中", 
                pay_type_name: "后台", 
                button_models: [
                    {
                        name: "申请归还", 
                        value: "lease_toy_refund", 
                        api: "plugin.lease-toy.api.retreat.return.lease-apply", 
                        type: ""
                    }, 
                    {
                        name: "删除订单", 
                        value: 12, 
                        api: "order.operation.delete", 
                        type: ""
                    }
                ], 
                has_many_order_goods: [
                    {
                        goods_id: 100, 
                        goods_price: "200.00", 
                        total: 1, 
                        price: "200.00", 
                        thumb: "http://dev4.yunzshop.com/attachment/images/6/2017/11/s8Fk3Xe1O8cc33J8NmZWsJMK3EK88m.gif", 
                        title: "测试商品", 
                        goods_option_id: 0, 
                        goods_option_title: "", 
                        comment_status: 0, 
                        buttons: [ ]
                    }
                ], 
                has_one_pay_type: {
                    id: 5, 
                    name: "后台", 
                    plugin_id: 0, 
                    code: "backend", 
                    type: 1, 
                    unit: "元", 
                    updated_at: "2019-04-15 12:07:20", 
                    created_at: null, 
                    deleted_at: null, 
                    setting_key: "", 
                    need_password: 0, 
                    group_id: 4
                }, 
                has_one_lease_toy_order: {
                    id: 43, 
                    order_id: 743, 
                    member_id: 2455, 
                    deposit_total: "100.00", 
                    return_days: 1, 
                    start_time: "2018-07-16 09:44:02", 
                    return_time: null, 
                    return_deposit: "0.00", 
                    order_sn: "SN20180716094336fD", 
                    be_damaged: "0.00", 
                    be_overdue: "0.00", 
                    return_pay_type_id: 0, 
                    end_time: "2018-07-17 09:44:02", 
                    return_status: 1, 
                    explain: "", 
                    return_name: "待审核", 
                    return_mode: "其他退款"
                }, 
                process: [
                    {
                        id: 22, 
                        uid: 0, 
                        model_id: 743, 
                        flow_id: 8, 
                        status_id: 34, 
                        state: "processing", 
                        is_pending: 0, 
                        created_at: "2019-06-13 09:22:45", 
                        updated_at: "2019-06-13 10:38:11", 
                        deleted_at: null, 
                        note: null, 
                        uniacid: 6, 
                        name: "租赁", 
                        status_name: "审核中", 
                        status: {
                            id: 34, 
                            flow_id: 8, 
                            name: "审核中", 
                            code: "returnApply", 
                            order: 1, 
                            plugin_id: 40, 
                            created_at: "2019-04-26 17:21:57", 
                            updated_at: "2019-04-26 17:21:57", 
                            deleted_at: null
                        }
                    }
                ]
            }, 
            {
                id: 742, 
                order_sn: "SN20180716093927oz", 
                price: "300.00", 
                goods_price: "200.00", 
                goods_total: 1, 
                status: 3, 
                cancel_pay_time: "1970-01-01 08:00:00", 
                cancel_send_time: "1970-01-01 08:00:00", 
                dispatch_type_id: 0, 
                dispatch_price: "10.00", 
                discount_price: "10.00", 
                pay_type_id: 5, 
                order_goods_price: "200.00", 
                deduction_price: "0.00", 
                refund_id: 4, 
                is_plugin: 0, 
                change_price: "0.00", 
                change_dispatch_price: "0.00", 
                comment_status: 0, 
                order_pay_id: "0", 
                plugin_id: 40, 
                is_virtual: 1, 
                mark: "", 
                is_pending: 0, 
                note: null, 
                cost_amount: "0.00", 
                shop_name: null, 
                no_refund: 0, 
                need_address: 0, 
                invoice_type: null, 
                rise_type: null, 
                collect_name: null, 
                company_number: null, 
                invoice: null, 
                auto_receipt: 0, 
                fee_amount: "0.00", 
                status_name: "交易完成", 
                pay_type_name: "后台", 
                button_models: [
                    {
                        name: "删除订单", 
                        value: 12, 
                        api: "order.operation.delete", 
                        type: ""
                    }
                ], 
                has_many_order_goods: [
                    {
                        goods_id: 100, 
                        goods_price: "200.00", 
                        total: 1, 
                        price: "200.00", 
                        thumb: "http://dev4.yunzshop.com/attachment/images/6/2017/11/s8Fk3Xe1O8cc33J8NmZWsJMK3EK88m.gif", 
                        title: "测试商品", 
                        goods_option_id: 0, 
                        goods_option_title: "", 
                        comment_status: 0, 
                        buttons: [ ]
                    }
                ], 
                has_one_pay_type: {
                    id: 5, 
                    name: "后台", 
                    plugin_id: 0, 
                    code: "backend", 
                    type: 1, 
                    unit: "元", 
                    updated_at: "2019-04-15 12:07:20", 
                    created_at: null, 
                    deleted_at: null, 
                    setting_key: "", 
                    need_password: 0, 
                    group_id: 4
                }, 
                has_one_lease_toy_order: {
                    id: 42, 
                    order_id: 742, 
                    member_id: 2455, 
                    deposit_total: "100.00", 
                    return_days: 1, 
                    start_time: "2018-07-16 09:39:53", 
                    return_time: "2018-07-16 10:12:07", 
                    return_deposit: "100.00", 
                    order_sn: "SN20180716093927oz", 
                    be_damaged: "0.00", 
                    be_overdue: "0.00", 
                    return_pay_type_id: 3, 
                    end_time: "2018-07-17 09:39:53", 
                    return_status: 4, 
                    explain: "", 
                    return_name: "已归还", 
                    return_mode: "余额"
                }, 
                process: [ ]
            }
        ]
    }
}

错误时返回:

  {
  "result": 0,
  "msg": "错误信息",
}

返回参数说明:

参数名 类型 说明
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 商品图片

前端订单额外操作按钮 button_models:

按钮名称 vlaue值 api
申请归还 lease_toy_refund plugin.lease-toy.api.retreat.return.lease-apply
填写归还 lease_toy_apply_adopt plugin.lease-toy.api.retreat.return.index
归还详情 lease_toy_return_info plugin.lease-toy.api.retreat.return.return-detail

备注: