import request from '@/utils/request'

// 查询产品分类列表
export function listProductCategory(query) {
  return request({
    url: '/app/productCategory/list',
    method: 'get',
    params: query
  })
}

// 查询产品分类详细
export function getProductCategory(id) {
  return request({
    url: '/app/productCategory/' + id,
    method: 'get'
  })
}

// 新增产品分类
export function addProductCategory(data) {
  return request({
    url: '/app/productCategory',
    method: 'post',
    data: data
  })
}

// 修改产品分类
export function updateProductCategory(data) {
  return request({
    url: '/app/productCategory',
    method: 'put',
    data: data
  })
}

// 删除产品分类
export function delProductCategory(id) {
  return request({
    url: '/app/productCategory/' + id,
    method: 'delete'
  })
}

//产品下拉
export function getAllProductCategory() {
  return request({
    url: '/app/productCategory/optionselect',
    method: 'get'
  })
}
