import request from '@/utils/request'

// 创建信息
export function createLabel(data) {
  return request({
    url: '/system/label/create',
    method: 'post',
    data: data
  })
}

// 更新信息
export function updateLabel(data) {
  return request({
    url: '/system/label/update',
    method: 'put',
    data: data
  })
}

// 删除信息
export function deleteLabel(id) {
  return request({
    url: '/system/label/delete?id=' + id,
    method: 'delete'
  })
}

// 获得信息
export function getLabel(id) {
  return request({
    url: '/system/label/get?id=' + id,
    method: 'get'
  })
}

// 获得信息分页
export function getLabelPage(query) {
  return request({
    url: '/system/label/page',
    method: 'get',
    params: query
  })
}

// 导出信息 Excel
export function exportLabelExcel(query) {
  return request({
    url: '/system/label/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
