import request from '@/utils/request'

// 创建标签库
export function createLabel(data) {
  return request({
    url: '/base/label/create',
    method: 'post',
    data: data
  })
}

// 更新标签库
export function updateLabel(data) {
  return request({
    url: '/base/label/update',
    method: 'put',
    data: data
  })
}

// 删除标签库
export function deleteLabel(id) {
  return request({
    url: '/base/label/delete?id=' + id,
    method: 'delete'
  })
}

// 获得标签库
export function getLabel(id) {
  return request({
    url: '/base/label/get?id=' + id,
    method: 'get'
  })
}

// 获得标签库分页
export function getLabelPage(params) {
  return request({
    url: '/base/label/page',
    method: 'get',
    params
  })
}
// 导出标签库 Excel
export function exportLabelExcel(params) {
  return request({
    url: '/base/label/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
