import request from '@/utils/request'

// 创建模板
export function createDesignTemplate(data) {
  return request({
    url: '/manager/design-template/create',
    method: 'post',
    data: data
  })
}

// 更新模板
export function updateDesignTemplate(data) {
  return request({
    url: '/manager/design-template/update',
    method: 'put',
    data: data
  })
}

// 删除模板
export function deleteDesignTemplate(id) {
  return request({
    url: '/manager/design-template/delete?id=' + id,
    method: 'delete'
  })
}

// 获得模板
export function getDesignTemplate(id) {
  return request({
    url: '/manager/design-template/get?id=' + id,
    method: 'get'
  })
}

// 获得模板分页
export function getDesignTemplatePage(params) {
  return request({
    url: '/manager/design-template/page',
    method: 'get',
    params
  })
}
// 导出模板 Excel
export function exportDesignTemplateExcel(params) {
  return request({
    url: '/manager/design-template/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}