import request from "@/utils/request";

// 个人信息录入
export const insertClientUser = (data) => {
  return request({
    url: "/app/insertClientUser",
    method: "POST",
    data,
  });
};

// 企业信息修改
export const updateEnterprise = (data) => {
  return request({
    url: "/app/updateEnterprise",
    method: "POST",
    data,
  });
};

// 企业服务需求列表
export const demandList = (params) => {
  return request({
    url: "/app/demandList",
    method: "GET",
    params,
  });
};
// 新增企业服务需求
export const insertDemand = (data) => {
  return request({
    url: "/app/insertDemand",
    method: "post",
    data,
  });
};

// 产品列表
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 activitysList = (params) => {
  return request({
    url: "/app/getActivitys",
    method: "GET",
    params,
  });
};

// 企业技术需求列表
export const technologyDemandList = (params) => {
  return request({
    url: "/app/technologyDemandList",
    method: "GET",
    params,
  });
};

// 新增企业技术需求
export const insertTechnologyDemand = (data) => {
  return request({
    url: "/app/insertTechnologyDemand",
    method: "POST",
    data,
  });
};

// 获取订单列表
export const casDealLogList = (params) => {
  return request(
    {
      url: '/business/casDealLog/list',
      method: 'GET',
      params
    }
  )
}
// 根据id获取订单信息
export const casDealLogDetail = (id) => {
  return request(
    {
      url: `/business/casDealLog/${id}`,
      method: 'GET',
    }
  )
}

// 修改订单
export const updateCasDealLog = (data) => {
  return request(
    {
      url: `/business/casDealLog`,
      method: 'PUT',
      data
    }
  )
}
// 删除订单
export const deleteCasDealLog = (ids) => {
  return request(
    {
      url: `/business/casDealLog/${ids}`,
      method: 'DELETE',
    }
  )
}