简要描述:
- 获取商品列表接口
请求域名:
请求URL:
route=plugin.store-cashier.frontend.store.center.coupon.getSearchGoods (无分页)
请求URL:
route=plugin.store-cashier.frontend.app.store.coupon.getSearchGoods (带分页)
参数:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
keyword | 是 | string | 搜索关键字 |
page | 否 | int | 当前页 |
返回示例:
正确时返回:
{
"result":1,
"msg":"成功",
"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":235,
"title":"测试66"
},
{
"id":251,
"title":"测试经销商提成"
}
]
}
}
失败时返回:
{
"result":0,
"msg":"您不是门店,跳转至门店申请!",
"data":{
"url":"https://dev5.yunzshop.com/addons/yun_shop/?menu#/o2o/storeApply?i=2"
}
}
返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
result | int | 返回状态,0为失败,1为成功 |
msg | string | 提示信息 |
data | array | 分页和商品列表信息 |
data分页和商品列表信息 | 类型 | 说明 |
---|---|---|
total | int | 总记录数 |
per_page | int | 每页记录数 |
current_page | int | 当前页数 |
last_page | int | 最后一页 |
data | array | 商品列表 |
data商品列表 | 类型 | 说明 |
---|---|---|
id | int | id |
name | string | 商品名 |
备注:
注意:当result=0并且data中url字段存在的时候,页面直接跳转至url中的地址