// @ts-ignore

/* eslint-disable */
import { request } from 'umi';

/** 获取商品  sdsa GET /kitchen/api/rule */
export async function goods(data) {
  return request(`/kitchen/api/goods/goodss`, {
    method: 'Post',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}

/** 新建商品 POST /kitchen/api/rule */

export async function addGoods(data) {
  // http://localhost:7002
  return request(`/kitchen/api/goods`, {
    method: 'POST',
    // type:'json',
    data: data,
    // ...(options || {}),
  });
}
/** 修改商品 PUT /kitchen/api/rule */

export async function updateGoods(data) {
  console.log('商品数据修改', data);
  return request(`/kitchen/api/goods`, {
    method: 'PUT',
    data: data,
    // ...(options || {}),
  });
}
/** 删除商品 DELETE /kitchen/api/rule */

export async function removeGoods(data) {
  return request(`/kitchen/api/goods`, {
    method: 'DELETE',
    data: data,
    // ...(options || {}),
  });
}

/** 获取商品类型  sdsa GET /kitchen/api/rule */
export async function goodsType(data) {
  return request(`/kitchen/api/goods-type/goods-types`, {
    method: 'POST',
    data: data,
    // params: { ...params },
    // ...(options || {}),
  });
}
/** 商品下发 Get*/
export async function goodPush(goodId) {
  return request(`/kitchen/api/goods/push-good/${goodId}`, {
    method: 'Get',
  });
}


