import request from '@/utils/request'

// 查询品类列表
export function listInfo(query) {
  return request({
    url: '/pc/product/info/list',
    method: 'get',
    params: query
  })
}

// 查询品类详细
export function getInfo(id) {
  return request({
    url: '/pc/product/info/' + id,
    method: 'get'
  })
}

// 新增品类
export function addInfo(data) {
  return request({
    url: '/pc/product/info',
    method: 'post',
    data: data
  })
}

// 修改品类
export function updateInfo(data) {
  return request({
    url: '/pc/product/info',
    method: 'put',
    data: data
  })
}

// 删除品类
export function delInfo(id) {
  return request({
    url: '/pc/product/info/' + id,
    method: 'delete'
  })
}

// 导出品类
export function exportInfo(query) {
  return request({
    url: '/pc/product/info/export',
    method: 'get',
    params: query
  })
}