machineDetails.js 974 Bytes
Newer Older
lixiaomin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
import request from "@/utils/request";

// 机器详情列表
export function getMachineList(data) {
  return request({
    url: "/v1/machine/list",
    method: "post",
    data: data,
  });
}

// 机器出产日志
export function getMachineLog(id) {
  return request({
    url: "/v1/machine/log?machine_id=" + id,
    method: "get",
  });
}

// 机器硬件日志
export function getMachineComLog(id) {
  return request({
    url: "/v1/machine/component/log?machine_id=" + id,
    method: "get",
  });
}

// 机器组件
export function getComponentList(id) {
  return request({
    url: "/v1/machine/component?machine_id=" + id,
    method: "get",
  });
}

// 咖啡菜单
export function getCoffeeList(id) {
  return request({
    url: "/v1/coffee/product/list?machine_id=" + id,
    method: "get",
  });
}

// 提交原料
export function addMaterial(data) {
  return request({
    url: "v1/add/machine/component/material",
    method: "post",
    data: data,
  });
}