import request from "@/utils/request"

/** 产业政策宣传 — 分页列表 */
export function listPolicyPublicity(query) {
  return request({
    url: "/industryPolicy/publicity/list",
    method: "get",
    params: query
  })
}

/** 详情 */
export function getPolicyPublicity(id) {
  return request({
    url: "/industryPolicy/publicity/" + id,
    method: "get"
  })
}

/** 新增 */
export function addPolicyPublicity(data) {
  return request({
    url: "/industryPolicy/publicity",
    method: "post",
    data
  })
}

/** 修改 */
export function updatePolicyPublicity(data) {
  return request({
    url: "/industryPolicy/publicity",
    method: "put",
    data
  })
}

/** 删除 */
export function delPolicyPublicity(ids) {
  return request({
    url: "/industryPolicy/publicity/" + ids,
    method: "delete"
  })
}

/** 发布 */
export function publishPolicyPublicity(id) {
  return request({
    url: "/industryPolicy/publicity/publish/" + id,
    method: "post"
  })
}

/** 下架 */
export function offlinePolicyPublicity(id) {
  return request({
    url: "/industryPolicy/publicity/offline/" + id,
    method: "post"
  })
}
