import request from "@/utils/request";

// 获取内容列表
export function getCustomerPage(query) {
  return request({
    url: "/goods/customer/customerPage",
    method: "get",
    params: query,
  });
}
//新增
export function addCustomer(data) {
  return request({
    url: "/goods/customer/customerAdd",
    method: "post",
    data: data,
  });
}
//编辑
export function updateCustomer(data) {
  return request({
    url: "/goods/customer/customerEdit",
    method: "PUT",
    data: data,
  });
}
// 删除
export function deleteCustomer(id) {
  return request({
    url: '/goods/customer/customerDelete?id=' + id,
    method: "delete",
  });
}
//启用停用
export function updateCustomerEnable(data) {
  return request({
    url: "/goods/customer/customerEnable",
    method: "put",
    data: data,
  });
}

// 获取内容信息（id）
export function getInfo(id) {
  return request({
    url: `/goods/customer/customerInfo/${id}`,
    method: "get",
  });
}