简要描述:

  • 优惠券管理主页

请求域名:

请求URL:

GET:route=plugin.store-cashier.frontend.store.center.coupon.index

参数:

参数名 是否必须 类型 说明
page int 当前页数

返回示例:

正确时返回:

{
    "result":1,
    "msg":"成功",
    "data":{
        "total":3,
        "per_page":10,
        "current_page":1,
        "last_page":1,
        "next_page_url":null,
        "prev_page_url":null,
        "from":1,
        "to":3,
        "data":[
            {
                "id":23,
                "uniacid":2,
                "cat_id":0,
                "name":"门店优惠券测试1",
                "get_type":1,
                "level_limit":-1,
                "get_max":5,
                "use_type":5,
                "return_type":0,
                "bgcolor":"",
                "enough":0,
                "coupon_type":0,
                "time_limit":1,
                "time_days":11,
                "time_start":"2019-01-30 00:00:00",
                "time_end":"2019-04-30 00:00:00",
                "coupon_method":1,
                "discount":"0.00",
                "deduct":"11.00",
                "back_type":0,
                "back_money":"",
                "back_credit":"",
                "back_redpack":"",
                "back_when":0,
                "thumb":"",
                "desc":null,
                "total":111,
                "status":1,
                "money":"0.00",
                "resp_desc":null,
                "resp_thumb":"",
                "resp_title":"",
                "resp_url":"",
                "credit":0,
                "usecredit2":0,
                "remark":"",
                "descnoset":0,
                "display_order":0,
                "supplier_uid":0,
                "getcashier":0,
                "cashiersids":null,
                "cashiersnames":null,
                "category_ids":[
                    "49",
                    "50"
                ],
                "categorynames":[
                    "门店优惠券商品分类1",
                    "门店优惠券商品分类1子分类"
                ],
                "goods_names":[
                    "测试66",
                    "测试经销商提成"
                ],
                "goods_ids":[
                    "235",
                    "251"
                ],
                "storeids":20,
                "storenames":[
                    "测试门店"
                ],
                "getstore":0,
                "getsupplier":0,
                "supplierids":null,
                "suppliernames":null,
                "createtime":0,
                "created_at":"2019-01-30 15:09:21",
                "updated_at":"2019-03-05 10:31:19",
                "deleted_at":null,
                "is_complex":0,
                "plugin_id":32,
                "gettotal":1,
                "usetotal":0,
                "lasttotal":110
            },
            {
                "id":22,
                "uniacid":2,
                "cat_id":0,
                "name":"测试优惠券",
                "get_type":1,
                "level_limit":9,
                "get_max":1,
                "use_type":1,
                "return_type":0,
                "bgcolor":"",
                "enough":0,
                "coupon_type":0,
                "time_limit":0,
                "time_days":1,
                "time_start":"2019-01-29 00:00:00",
                "time_end":"2019-02-05 00:00:00",
                "coupon_method":1,
                "discount":"0.00",
                "deduct":"10.00",
                "back_type":0,
                "back_money":"",
                "back_credit":"",
                "back_redpack":"",
                "back_when":0,
                "thumb":"",
                "desc":null,
                "total":11,
                "status":1,
                "money":"0.00",
                "resp_desc":null,
                "resp_thumb":"",
                "resp_title":"",
                "resp_url":"",
                "credit":0,
                "usecredit2":0,
                "remark":"",
                "descnoset":0,
                "display_order":0,
                "supplier_uid":0,
                "getcashier":0,
                "cashiersids":null,
                "cashiersnames":null,
                "category_ids":[
                    "49"
                ],
                "categorynames":[
                    "门店优惠券商品分类1"
                ],
                "goods_names":null,
                "goods_ids":null,
                "storeids":20,
                "storenames":[
                    "测试门店"
                ],
                "getstore":0,
                "getsupplier":0,
                "supplierids":null,
                "suppliernames":null,
                "createtime":0,
                "created_at":"2019-01-29 17:04:57",
                "updated_at":"2019-02-20 14:38:31",
                "deleted_at":null,
                "is_complex":0,
                "plugin_id":32,
                "gettotal":0,
                "usetotal":0,
                "lasttotal":11
            }
        ]
    }
}
  • 失败时返回
{
    "result":0,
    "msg":"您不是门店,跳转至门店申请!",
    "data":{
        "url":"https://dev5.yunzshop.com/addons/yun_shop/?menu#/o2o/storeApply?i=2"
    }
}

返回参数说明:

参数名 类型 说明
result int 返回状态,0为失败,1为成功
msg string 提示信息
data object 分页和优惠券信息
data分页和优惠券信息 类型 说明
total int 优惠券总记录数
per_page int 每页记录数
current_page int 当前页数
last_page int 最后一页
data array 优惠券列表
publish int 是否可以发布优惠券 1 开启 0 关闭
data优惠券列表 类型 说明
id int 优惠券id
name string 优惠券名称
display_order int 排序
status int 状态,0为关闭,1为开启
enough int 使用条件-订单金额
level_limit int 会员等级id,-1为所有会员
time_limit int 使用时间限制,0为获得time_days天内有效,1为时间范围
time_days int 获得time_days天内有效
time_start int时间戳 开始时间
time_end int时间戳 结束时间
is_complex int 使用方式,0为单张,1为多张
coupon_method int 优惠方式,1为立减,2为打折
deduct int 立减数
discount int 打折数
use_type int 适用范围,5为全类适用,1为指定分类,2为指定商品
get_type int 是否可领取,1为可以,0为不可以
get_max int 每人限领取张数
total int 总发放数
usetotal int 已使用数
lasttotal int 剩余数
gettotal int 已发出数

备注:

注意:当result=0并且data中url字段存在的时候,页面直接跳转至url中的地址