import request from "@/utils/request";

// 获取内容列表
export function getInformation(query) {
  return request({
    url: "/contentManage/information/informationPage",
    method: "get",
    params: query,
  });
}
//新增内容
export function addConten(data) {
  return request({
    url: "/contentManage/information/informationAdd",
    method: "post",
    data: data,
  });
}
//编辑内容
export function updateInformation(data) {
  return request({
    url: "/contentManage/information/informationEdit",
    method: "PUT",
    data: data,
  });
}
// 删除内容
export function deleteInformation(id) {
  return request({
    url: '/contentManage/information/informationDelete?id=' + id,
    method: "delete",
  });
}
//内容启用停用
export function updateInformationEnable(data) {
  return request({
    url: "/contentManage/information/informationEnable",
    method: "put",
    data: data,
  });
}

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