// @ts-ignore

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

/** 获取机械店铺类型   GET /kitchen/api/rule */
export async function unitList(data) {
  return request(`/kitchen/api/unit/type`, {
    method: 'Post',
    data: data,
  });
}

/** 新建机械店铺类型 POST /kitchen/api/rule */

export async function addunit(data) {
  // http://localhost:7002
  return request('/kitchen/api/unit', {
    method: 'POST',
    // type:'json',
    data: data,
    // ...(options || {}),
  });
}
/** 修改机械店铺类型 PUT /kitchen/api/rule */

export async function updateunit(data) {
  return request('/kitchen/api/unit', {
    method: 'PUT',
    data: data,
  });
}

/** 批量删除机械店铺类型 DELETE /kitchen/api/rule */

export async function removeunit(data) {
  console.log(data);
  return request(`/kitchen/api/unit`, {
    method: 'DELETE',
    data: data,
    // ...(options || {}),
  });
}

/** 删除单个加盟商类型 DELETE /kitchen/api/rule */

export async function removeSingleunit(id) {
  return request(`/kitchen/api/unit/${id}`, {
    method: 'DELETE',
  });
}
