// @ts-ignore

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

/** 获取商品类型  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 || {}),
  });
}
/** 新建商品类型 POST /kitchen/api/rule */
export async function GetDicList(TypeCode) {
  return request(`/kitchen/api/dict-data/dic-list/${TypeCode}`, {
    method: 'Get',
  });
}

export async function addGoodsType(data) {
  // http://localhost:5001
  return request('/kitchen/api/goods-type', {
    method: 'POST',
    // type:'json',
    data: data,
    // ...(options || {}),
  });
}

/** 更新商品类型 PUT /kitchen/api/rule */

export async function updateGoodsType(data) {
  return request('/kitchen/api/goods-type', {
    method: 'PUT',
    data: data,
    // ...(options || {}),
  });
}

/** 删除商品类型 DELETE /kitchen/api/rule */

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

