// @ts-ignore

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

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

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

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

export async function updateproducttype(data) {
  return request('/kitchen/api/product-type', {
    method: 'PUT',
    data: data,
  });
}

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

export async function removeproducttype(data) {
  console.log("批量删除",data);
  return request(`/kitchen/api/product-type`, {
    method: 'DELETE',
    data: data,
    // ...(options || {}),
  });
}

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

export async function removeSingleproducttype(id) {
  console.log("批量删除",id);
  return request(`/kitchen/api/product-type/${id}`, {
    method: 'DELETE',
  });
}
export async function  IsModifyOrDel(data,status,typevalue){
  return request(`/kitchen/api/product/is-modify-or-del/${typevalue}/${status}?ids=${data}`, {
    method: 'POST',
    data: data,
    // ...(options || {}),
  });
}


