import request from "@/utils/request";

// 查询广告列表
export function listPoster(query) {
  return request({
    url: "/netEwm/poster/list",
    method: "get",
    params: query,
    headers: {
      isToken: false,
    },
  });
}

// 查询广告详细
export function getPoster(id) {
  return request({
    url: "/netEwm/poster/" + id,
    method: "get",
    headers: {
      isToken: false,
    },
  });
}

// 新增广告
export function addPoster(data) {
  return request({
    url: "/netEwm/poster",
    method: "post",
    data: data,
    headers: {
      isToken: false,
    },
  });
}

// 修改广告
export function updatePoster(data) {
  return request({
    url: "/netEwm/poster",
    method: "put",
    data: data,
    headers: {
      isToken: false,
    },
  });
}

// 删除广告
export function delPoster(id) {
  return request({
    url: "/netEwm/poster/" + id,
    method: "delete",
    headers: {
      isToken: false,
    },
  });
}

//广告批量分配给商户
export function batchAllocation(data) {
  return request({
    url: "/netEwm/poster/batchAllocation",
    method: "post",
    data: data,
    headers: {
      isToken: false,
    },
  });
}
