import request from '@/utils/request'

// 查询服务分类列表
export function serviceCategorizePage (query) {
  return request({
    url: '/service/serviceCategorize/page',
    method: 'get',
    params: query
  })
}
// 新增服务分类
export function serviceCategorizeAdd (data) {
  return request({
    url: '/service/serviceCategorize/add',
    method: 'post',
    data: data
  })
}
// 获取服务分类详细信息
export function serviceCategorizeInfo (id) {
  return request({
    url: `/service/serviceCategorize/info/${id}`,
    method: 'get',
  })
}
// 修改服务分类
export function serviceCategorizeEdit (data) {
  return request({
    url: '/service/serviceCategorize/edit',
    method: 'post',
    data: data
  })
}
// 修改服务分类状态
export function serviceCategorizeSetStatus (id) {
  return request({
    url: `/service/serviceCategorize/setStatus/${id}`,
    method: 'post',
  })
}
// 删除服务分类
export function serviceCategorizeDel (id) {
  return request({
    url: `/service/serviceCategorize/del/${id}`,
    method: 'post',
  })
}
// 查询服务列表
export function serviceProductPage (query) {
  return request({
    url: '/service/serviceProduct/page',
    method: 'get',
    params: query
  })
}
// 新增服务
export function serviceProductAdd (data) {
  return request({
    url: '/service/serviceProduct/add',
    method: 'post',
    data: data
  })
}
// 查询服务分类列表 用于下拉
export function serviceCategorizeList (query) {
  return request({
    url: '/service/serviceCategorize/list',
    method: 'get',
    params: query
  })
}
// 服务单位
export function serviceProductEnum () {
  return request({
    url: '/service/serviceProduct/enum',
    method: 'get',
  })
}
// 获取服务详细信息
export function serviceProductInfo (id) {
  return request({
    url: `/service/serviceProduct/info/${id}`,
    method: 'get',
  })
}
// 修改服务
export function serviceProductEdit (data) {
  return request({
    url: '/service/serviceProduct/edit',
    method: 'post',
    data: data
  })
}
// 修改服务状态
export function serviceProductSetStatus (id) {
  return request({
    url: `/service/serviceProduct/setStatus/${id}`,
    method: 'post',
  })
}
// 删除服务
export function serviceProductDel (id) {
  return request({
    url: `/service/serviceProduct/del/${id}`,
    method: 'post',
  })
}