简要描述:

  • 商品列表+搜索 只展示未删除的商城自营,供应商,门店的商品

请求域名:

  • http://xx.com

请求URL:

GET/route=plugin.promotion-assistant.api.goods.get-goods-list
POST/route=plugin.promotion-assistant.api.goods.get-goods-list

参数:

参数名 是否必须 类型 说明
keyword string 搜索商品标题
page int 页码
pagesize int 每页的数据量

返回示例:

正确时返回:

{
    "result": 1,
    "msg": "成功",
    "data": {
        "total": 56,
        "per_page": "3",
        "current_page": 2,
        "last_page": 19,
        "next_page_url": "http://www.yzdev8.com/addons/yun_shop/api.php?page=3",
        "prev_page_url": "http://www.yzdev8.com/addons/yun_shop/api.php?page=1",
        "from": 4,
        "to": 6,
        "data": [
            {
                "title": "测试 枕套",
                "id": 193,
                "thumb_url": "",
                "price": "30.00",
                "thumb": "images/1/2020/04/TPjsdBfyztBtmttj5byctr3Ttm338C.jpg",
                "display_order": 556
            },
            {
                "title": "测试 枕套",
                "id": 195,
                "thumb_url": "",
                "price": "30.00",
                "thumb": "images/1/2020/04/TPjsdBfyztBtmttj5byctr3Ttm338C.jpg",
                "display_order": 556
            },
            {
                "title": "测试 枕套",
                "id": 198,
                "thumb_url": "",
                "price": "30.00",
                "thumb": "images/1/2020/04/TPjsdBfyztBtmttj5byctr3Ttm338C.jpg",
                "display_order": 556
            }
        ]
    }
}

错误时返回:

  {
    "result": 0,
    "msg": "暂无数据",
    "data": []
}

返回参数说明:

参数名 类型 说明
total int 一共有多少页
per_page int 每页的数量
current_page int 当前页码
data['id'] int 主键ID
data['thumb_url'] string 商品缩略图
data['price'] int 商品价格
data['thumb'] string 商品图片
data['display_order'] int 排序

备注:

  • 更多返回错误代码请看首页的错误代码描述