import request from '@/utils/request'

// 分页查询图库图片列表
export function pageListImages(query) {
  return request({
    url: '/gallery/images/pageList',
    method: 'get',
    params: query
  })
}

// 查询图库图片列表
export function listImages(query) {
  return request({
    url: '/gallery/images/list',
    method: 'get',
    params: query
  })
}

// 查询图库图片详细
export function getImages(id) {
  return request({
    url: '/gallery/images/' + id,
    method: 'get'
  })
}

// 新增图库图片
export function addImages(data) {
  return request({
    url: '/gallery/images',
    method: 'post',
    data: data
  })
}

// 修改图库图片
export function updateImages(data) {
  return request({
    url: '/gallery/images',
    method: 'put',
    data: data
  })
}

// 删除图库图片
export function delImages(id) {
  return request({
    url: '/gallery/images/' + id,
    method: 'delete'
  })
}

// 导出图库图片
export function exportImages(query) {
  return request({
    url: '/gallery/images/' + 'export',
    method: 'post',
    params: query
  })
}

// 合并图库图片
export function imageToGroup(data) {
  return request({
    url: '/gallery/images/generateImage',
    method: 'post',
    data: data
  })
}