import request from '@/utils/request'

// 分页查询产品海报列表
export function pageListPoster(query) {
  return request({
    url: '/poster/poster/pageList',
    method: 'get',
    params: query
  })
}

// 查询产品海报列表
export function listPoster(query) {
  return request({
    url: '/poster/poster/list',
    method: 'get',
    params: query
  })
}

// 查询产品海报详细
export function getPoster(id) {
  return request({
    url: '/poster/poster/' + id,
    method: 'get'
  })
}

// 新增产品海报
export function addPoster(data) {
  return request({
    url: '/poster/poster',
    method: 'post',
    data: data
  })
}

// 修改产品状态
export function changeStatusByPoster(data) {
  return request({
    url: '/poster/poster/changeStatus',
    method: 'put',
    data: data
  })
}

// 修改产品海报
export function updatePoster(data) {
  return request({
    url: '/poster/poster',
    method: 'put',
    data: data
  })
}

// 删除产品海报
export function delPoster(id) {
  return request({
    url: '/poster/poster/' + id,
    method: 'delete'
  })
}

// 导出产品海报
export function exportPoster(query) {
  return request({
    url: '/poster/poster/' + 'export',
    method: 'post',
    params: query
  })
}
