import request from '@/utils/request'

// 创建图片素材
export function createDesignPic(data) {
  return request({
    url: '/manager/design-pic/create',
    method: 'post',
    data: data
  })
}

// 更新图片素材
export function updateDesignPic(data) {
  return request({
    url: '/manager/design-pic/update',
    method: 'put',
    data: data
  })
}

// 删除图片素材
export function deleteDesignPic(id) {
  return request({
    url: '/manager/design-pic/delete?id=' + id,
    method: 'delete'
  })
}

// 获得图片素材
export function getDesignPic(id) {
  return request({
    url: '/manager/design-pic/get?id=' + id,
    method: 'get'
  })
}

// 获得图片素材分页
export function getDesignPicPage(params) {
  return request({
    url: '/manager/design-pic/page',
    method: 'get',
    params
  })
}
// 导出图片素材 Excel
export function exportDesignPicExcel(params) {
  return request({
    url: '/manager/design-pic/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}