简要描述:

  • 根据商品编码获取商品列表

请求URL:

POST/wapstore/addons/execute/addons/store/controller/wapstore/action/getGoodsByCode

参数:

参数名 是否必须 类型 说明
bar_code string 商品条码

返回示例:

正确时返回:

{
  "code": 0,
  "message": "获取成功",
  "data": {
    "goodslist": [
      {
        "id": 1,
        "sku_id": 1,
        "website_id": 1,
        "store_id": 1,
        "shop_id": 0,
        "goods_id": 1,
        "sku_name": "",
        "attr_value_items": "",
        "price": "100.00",
        "market_price": "211.00",
        "stock": 2420,
        "bar_code": "464646546",
        "create_time": 1574150518,
        "goods_name": "啊啊啊",
        "picture": "http://test.vslai.net/upload/1/2019/11/18/14/1574057027418.png"
      }
    ],
    "count": 1
  }
}

错误时返回:

{
    "code": -1,
    "message": "错误信息"
}

返回参数说明:

参数名 类型 说明
goods_id int 商品id
goods_name string 商品名称
picture string 商品图片
sku_name string sku名称
price float 商品价格
market_price float 商品市场价
stock int 库存