简要描述:

  • 商品搜索接口

请求URL:

GET/app/index.php?i=2&c=entry&do=shop&m=yun_shop&route=goods.goods.get-tag-goods-list

参数:

参数名 是否必须 类型 说明
keyword string 关键字
filter_ids strig 标签id(多个用逗号隔开,比如 1,2,3,4)

返回示例:

正确时返回:

{
  "result": 1,
  "msg": "成功",
  "data": {
    "tag_list": [
      {
        "id": 1,
        "parent_id": 0,
        "name": "111",
        "is_front_show": 1,
        "value": [
          {
            "id": 2,
            "parent_id": 1,
            "name": "111-1",
            "is_front_show": 1
          }
        ]
      },
      {
        "id": 3,
        "parent_id": 0,
        "name": "222",
        "is_front_show": 0,
        "value": [
          {
            "id": 4,
            "parent_id": 3,
            "name": "222-1",
            "is_front_show": 1
          },
          {
            "id": 5,
            "parent_id": 3,
            "name": "222-2",
            "is_front_show": 1
          }
        ]
      },
      {
        "id": 6,
        "parent_id": 0,
        "name": "333",
        "is_front_show": 0,
        "value": [
          {
            "id": 7,
            "parent_id": 6,
            "name": "333-1",
            "is_front_show": 1
          },
          {
            "id": 8,
            "parent_id": 6,
            "name": "333-2",
            "is_front_show": 1
          }
        ]
      }
    ],
    "goods_list": {
      "current_page": 1,
      "data": [
        {
          "thumb": "http://dev3.yunzshop.com/attachment/images/3/2017/09/dUVNVtadE6Exena2fuIn2aeX6TNVHh.jpg",
          "title": "限购测试",
          "status_name": null
        },
        {
          "thumb": "https://dev3.yunzshop.com/attachment/images/3/2017/08/zz6C5o8LZpKlq9K1H906PO1K976nTP.jpg",
          "title": "购物赠送余额测试",
          "status_name": null
        },
        {
          "thumb": "https://dev3.yunzshop.com/attachment/images/3/2018/01/E8zT6oZFt968q7q7Ti59ktsfo7393Q.png",
          "title": "测试",
          "status_name": null
        }
      ],
      "first_page_url": "http://127.0.0.4/addons/yun_shop/api.php?page=1",
      "from": 1,
      "last_page": 1,
      "last_page_url": "http://127.0.0.4/addons/yun_shop/api.php?page=1",
      "links": [
        {
          "url": null,
          "label": "« 上一页",
          "active": false
        },
        {
          "url": "http://127.0.0.4/addons/yun_shop/api.php?page=1",
          "label": "1",
          "active": true
        },
        {
          "url": null,
          "label": "下一页 »",
          "active": false
        }
      ],
      "next_page_url": null,
      "path": "http://127.0.0.4/addons/yun_shop/api.php",
      "per_page": 20,
      "prev_page_url": null,
      "to": 3,
      "total": 3
    }
  }
}

错误时返回:

{
result: 0,
msg: "商品不存在.",
data: [ ]
}

goods_list返回参数说明:

参数名 类型 说明
id int 商品ID
title string 商品标题
thumb string 商品图片完整路径

tag_list返回参数说明:

参数名 类型 说明
id int 标签ID
parent_id int 上级标签id
name string 标签名称
value int 子标签数组

备注:

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