简要描述:

请求URL:

GET/plugin.redpack-user.frontend.homePage.index

返回示例:

正确时返回:

{
    "result": 1,
    "msg": "成功",
    "data": {
        "show_button": true,
        "redpack_list": {
            "current_page": 1,
            "data": [
                {
                    "id": 2,
                    "uid": 698211,
                    "title": "测试红包",
                    "thumb": "https://fjfff-1301507422.cos.ap-guangzhou.myqcloud.com/newimage/8da397309873b7d6273e7915ef473bac.jpeg",
                    "valid_hours": 50,
                    "status": 1,
                    "created_at": "2021-07-23 16:13:54",
                    "valid_time_date": "2021-07-25 18:13:54",
                   "buttons": [
                        {
                            "name": "抢红包",
                            "api": "plugin.redpack-user.frontend.receive.index",
                            "id": 8,
                            "status": 1
                        }
                    ],
                    "redpack_type_name": "固定红包",
                    "status_name": "有效",
                    "member": {
                        "uid": 698211,
                        "nickname": "15945596374",
                        "realname": "",
                        "mobile": "15945596374",
                        "avatar": "https://fjfff-1301507422.cos.ap-guangzhou.myqcloud.com/newimage/6c3ebd43e5bf23543930dcbbe9e7629f.jpeg",
                        "avatar_image": "https://fjfff-1301507422.cos.ap-guangzhou.myqcloud.com/newimage/6c3ebd43e5bf23543930dcbbe9e7629f.jpeg",
                        "username": "15945596374"
                    }
                },
                {
                    "id": 1,
                    "uid": 698211,
                    "title": "测试红包",
                    "thumb": "https://fjfff-1301507422.cos.ap-guangzhou.myqcloud.com/newimage/8da397309873b7d6273e7915ef473bac.jpeg",
                    "valid_hours": 30,
                    "status": 1,
                    "created_at": "2021-07-23 16:13:54",
                    "valid_time_date": "2021-07-24 22:13:54",
                    "buttons": [
                        {
                            "name": "已领取",
                            "api": ""
                        },
                        {
                            "name": "领取记录",
                            "api": "plugin.redpack-user.frontend.receiveLogDetail.index",
                            "id": 1
                        }
                    ],
                    "redpack_type_name": "固定红包",
                    "status_name": "有效",
                    "member": {
                        "uid": 698211,
                        "nickname": "15945596374",
                        "realname": "",
                        "mobile": "15945596374",
                        "avatar": "https://fjfff-1301507422.cos.ap-guangzhou.myqcloud.com/newimage/6c3ebd43e5bf23543930dcbbe9e7629f.jpeg",
                        "avatar_image": "https://fjfff-1301507422.cos.ap-guangzhou.myqcloud.com/newimage/6c3ebd43e5bf23543930dcbbe9e7629f.jpeg",
                        "username": "15945596374"
                    }
                }
            ],
            "first_page_url": "http://mdzz.com/admin/shop?page=1",
            "from": 1,
            "last_page": 1,
            "last_page_url": "http://mdzz.com/admin/shop?page=1",
            "next_page_url": null,
            "path": "http://mdzz.com/admin/shop",
            "per_page": 5,
            "prev_page_url": null,
            "to": 2,
            "total": 2
        }
    }
}

返回参数说明:

参数名 类型 说明
show_button bool 是否显示发红包按钮
redpack_list arr 红包列表,带分页,每页5个
redpack_list->data->id int 红包id
redpack_list->data->title str 红包名称
redpack_list->data->thumb str 红包图标
redpack_list->data->valid_time_date str 红包截止时间
redpack_list->data->buttons arr 红包按钮信息
redpack_list->data->buttons->status int 按钮状态,1可领取红包0显示已领取按钮,领取记录按钮
redpack_list->data->buttons->name str 按钮名称
redpack_list->data->buttons->api str 请求api
redpack_list->data->buttons->id int 红包id, 请求api时的参数
redpack_list->data->member arr 会员信息
redpack_list->data->member->nickname str 会员昵称
redpack_list->data->member->avatar_image str 会员头像