简要描述:

  • 酒柜货道管理

请求域名:

  • http://xx.com

请求URL:

plugin.gradevin.frontend.owner.cargo-road.index

参数:

参数名 是否必须 类型 说明
device_id int 设备ID

返回示例:

正确时返回:

{
  "result": 1,
  "msg": "ok",
  "data": {
    "record": {
      "current_page": 1,
      "data": [
        {
          "id": 1,
          "device_id": 1,
          "goods_id": 276,
          "name": "1",
          "status": 0,
          "stock": 0,
          "status_name": "下架",
          "goods": {
            "id": 276,
            "title": "爱心值价格显示 276",
            "thumb": "http://localhost/static/upload/image/a6171abe1fb392a2008dad92e260f2bf.png",
            "price": "200.00",
            "status_name": null
          }
        },
        {
          "id": 4,
          "device_id": 1,
          "goods_id": 18,
          "name": "3",
          "status": 1,
          "stock": 1,
          "status_name": "上架",
          "goods": {
            "id": 18,
            "title": "商品ID18",
            "thumb": "http://localhost/static/upload/image/a6171abe1fb392a2008dad92e260f2bf.png",
            "price": "100.00",
            "status_name": null
          }
        },
        {
          "id": 5,
          "device_id": 1,
          "goods_id": 276,
          "name": "4",
          "status": 1,
          "stock": 1,
          "status_name": "上架",
          "goods": {
            "id": 276,
            "title": "爱心值价格显示 276",
            "thumb": "http://localhost/static/upload/image/a6171abe1fb392a2008dad92e260f2bf.png",
            "price": "200.00",
            "status_name": null
          }
        }
      ],
      "first_page_url": "http://localhost/addons/yun_shop/api.php?page=1",
      "from": 1,
      "last_page": 1,
      "last_page_url": "http://localhost/addons/yun_shop/api.php?page=1",
      "next_page_url": null,
      "path": "http://localhost/addons/yun_shop/api.php",
      "per_page": 15,
      "prev_page_url": null,
      "to": 3,
      "total": 3
    },
    "action": [
      {
        "name": "选择商品",
        "api": "plugin.gradevin.frontend.owner.cargo-road.change",
        "params": [
          {
            "key": "title",
            "name": "商品名称",
            "must": false
          }
        ]
      },
      {
        "name": "更换商品",
        "api": "plugin.gradevin.frontend.owner.cargo-road.change",
        "params": [
          {
            "key": "id",
            "name": "货道ID",
            "must": true
          },
          {
            "key": "goods_id",
            "name": "商品ID",
            "must": true
          }
        ]
      },
      {
        "name": "上下架商品",
        "api": "plugin.gradevin.frontend.owner.cargo-road.status",
        "params": [
          {
            "key": "id",
            "name": "货道ID",
            "must": true
          },
          {
            "key": "status",
            "name": "状态",
            "must": true
          }
        ]
      },
      {
        "name": "清空货道商品",
        "api": "plugin.gradevin.frontend.owner.cargo-road.clear",
        "params": [
          {
            "key": "id",
            "name": "货道ID",
            "must": true
          }
        ]
      }
    ]
  }
}


返回参数说明:

参数名 类型 说明
data.record.device_id int 设备id
data.record.goods_id int 商品id
data.record.name string 货道名称
data.record.status int 货道状态

备注:

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