import request from "@/utils/request";

// 产品列表
export const getEnterpriseProduct = (params) => {
  return request({
    url: "/app/getEnterpriseProduct",
    method: "GET",
    params,
  });
};

// 新增产品
export const insertEnterpriseProduct = (data) => {
  return request({
    url: "/app/insertEnterpriseProduct",
    method: "POST",
    data,
  });
};

// 根据id获取产品信息
export const getProductById = (params) => {
  return request({
    url: "/app/getProductById",
    method: "GET",
    params,
  });
};
// 修改产品
export const updateEnterpriseProduct = (data) => {
  return request({
    url: "/app/updateEnterpriseProduct",
    method: "POST",
    data,
  });
};
// 修改产品
export const deleteEnterpriseProduct = (ids) => {
  return request({
    url: `/app/enterpriseProduct/${ids}`,
    method: "DELETE",
  });
};
