import request from '@/utils/request'

// 创建素材管理
export function createDesignMaterial(data) {
  return request({
    url: '/manager/design-material/create',
    method: 'post',
    data: data
  })
}

// 更新素材管理
export function updateDesignMaterial(data) {
  return request({
    url: '/manager/design-material/update',
    method: 'put',
    data: data
  })
}

// 删除素材管理
export function deleteDesignMaterial(id) {
  return request({
    url: '/manager/design-material/delete?id=' + id,
    method: 'delete'
  })
}

// 获得素材管理
export function getDesignMaterial(id) {
  return request({
    url: '/manager/design-material/get?id=' + id,
    method: 'get'
  })
}

// 获得素材管理分页
export function getDesignMaterialPage(params) {
  return request({
    url: '/manager/design-material/page',
    method: 'get',
    params
  })
}
// 导出素材管理 Excel
export function exportDesignMaterialExcel(params) {
  return request({
    url: '/manager/design-material/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}