import request from "@/utils/request"

/** 共同富裕项目 — 分页列表 */
export function listCommonProsperityProject(query) {
  return request({
    url: "/commonProsperity/project/list",
    method: "get",
    params: query
  })
}

/** 详情 */
export function getCommonProsperityProject(id) {
  return request({
    url: "/commonProsperity/project/" + id,
    method: "get"
  })
}

/** 新增 */
export function addCommonProsperityProject(data) {
  return request({
    url: "/commonProsperity/project",
    method: "post",
    data
  })
}

/** 修改 */
export function updateCommonProsperityProject(data) {
  return request({
    url: "/commonProsperity/project",
    method: "put",
    data
  })
}

/** 删除 */
export function delCommonProsperityProject(ids) {
  return request({
    url: "/commonProsperity/project/" + ids,
    method: "delete"
  })
}

/** 发布 */
export function publishCommonProsperityProject(id) {
  return request({
    url: "/commonProsperity/project/publish/" + id,
    method: "post"
  })
}

/** 下架 */
export function offlineCommonProsperityProject(id) {
  return request({
    url: "/commonProsperity/project/offline/" + id,
    method: "post"
  })
}
