简要描述:
请求域名:
请求URL:
GET/addons/yun_shop/api.php?i=1&type=5&route=coupon.member-coupon.get-store-and-goods&coupon_id=2&latitude=23.243454&longitude=113.330431&store_page=1&goods_page=1
参数:
| 参数名 |
是否必须 |
类型 |
说明 |
| coupon_id |
是 |
string |
优惠卷id |
| longitude |
否 |
string |
纬度(不填没有距离) |
| latitude |
否 |
string |
经度(不填没有距离) |
| store_page |
是 |
int |
门店页数 |
| goods_page |
是 |
int |
商品分页 |
返回示例:
正确时返回:
{
"result": 1,
"msg": "成功",
"data": {
"goods_list": {
"current_page": 1,
"data": [
{
"title": "棒棒糖",
"price": "10.00",
"thumb": "newimage/39878e49c34d9eb5c6c6946ee8786b4f.png",
"thumb_image": "http://yzhonshop.com/static/upload/newimage/39878e49c34d9eb5c6c6946ee8786b4f.png"
},
{
"title": "小桌子",
"price": "0.00",
"thumb": "images/6/2022/05/dfe42b4be1c017fb5d657fda087b2615.png",
"thumb_image": "http://yzhonshop.com/static/upload/images/6/2022/05/dfe42b4be1c017fb5d657fda087b2615.png"
},
],
"first_page_url": "http://yzhonshop.com/addons/yun_shop/api.php?goods_page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://yzhonshop.com/addons/yun_shop/api.php?goods_page=1",
"next_page_url": null,
"path": "http://yzhonshop.com/addons/yun_shop/api.php",
"per_page": 16,
"prev_page_url": null,
"to": 9,
"total": 9
},
"store_list": {
"current_page": 1,
"data": [
{
"store_name": "肯德基",
"distance": 11.7,
"address": "广州市天河区18号",
"unit": "km"
},
{
"store_name": "必胜客",
"distance": 11.7,
"address": "广州市天河区18号",
"unit": "km"
}
],
"first_page_url": "http://yzhonshop.com/addons/yun_shop/api.php?store_page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://yzhonshop.com/addons/yun_shop/api.php?store_page=1",
"next_page_url": null,
"path": "http://yzhonshop.com/addons/yun_shop/api.php",
"per_page": 16,
"prev_page_url": null,
"to": 5,
"total": 5
},
"condition_type": 2,
"is_all_good": 0,
"is_all_store": 0
}
}
返回参数说明:
| 参数名 |
类型 |
说明 |
| goods_list |
array |
商品数据 |
| store_list |
array |
门店数据 |
| condition_type |
int |
条件类型 1:指定门店,2:指定商品和门店 |
| is_all_good |
int |
0:指定商品,1:全部商品 |
| is_all_store |
int |
0:指定商品,1:全部商品 |
| is_shop |
bool |
true:门店优惠卷,false:商城 |
分页数据[]
| 参数名 |
类型 |
说明 |
| current_page |
int |
当前页数 |
| last_page |
int |
最后一页的页数 |
| per_page |
int |
每页显示的数据量 |
| total |
int |
总数据量(可以作为门店数量) |
关联数据goods_list[]
| 参数名 |
类型 |
说明 |
| title |
string |
商品名称 |
| price |
float |
价格 |
| thumb_image |
string |
图片路径 |
关联数据store_list[]
| 参数名 |
类型 |
说明 |
| id |
int |
门店id |
| store_name |
string |
门店名称 |
| distance |
float |
距离 |
| unit |
string |
单位 |
| address |
string |
地址 |
| thumb |
string |
门店logo |
备注:
- condition_type等于1时没有商品数据
- condition_type等于2时才有is_all_good和is_all_store字段
- is_all_good或者is_all_store是1,是没有分页数据的并且只显示10条数据