import request from '@/utils/request'

// 查询服务内容列表
export function listServiceGoods(query) {
  return request({
    url: '/system/ServiceGoods/list',
    method: 'get',
    params: query
  })
}

// 查询服务内容详细
export function getServiceGoods(id) {
  return request({
    url: '/system/ServiceGoods/' + id,
    method: 'get'
  })
}
// 查询服务内容详细
export function selectServiceCateList(id) {
  return request({
    url: '/system/ServiceGoods/selectServiceCateList',
    method: 'get'
  })
}

// 新增服务内容
export function addServiceGoods(data) {
  return request({
    url: '/system/ServiceGoods',
    method: 'post',
    data: data
  })
}
// 任务状态修改
export function changefenleiStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/system/ServiceGoods/changeStatus',
    method: 'put',
    data: data
  })
}
// 修改服务内容
export function updateServiceGoods(data) {
  return request({
    url: '/system/ServiceGoods',
    method: 'put',
    data: data
  })
}

// 删除服务内容
export function delServiceGoods(id) {
  return request({
    url: '/system/ServiceGoods/' + id,
    method: 'delete'
  })
}
