import request from '@/utils/request'

// 查询商品分类列表
export function listGoods(query) {
  return request({
    url: '/bst/goods/list',
    method: 'get',
    params: query
  })
}

// 查询商品分类详细
export function getGoods(id) {
  return request({
    url: '/bst/goods/' + id,
    method: 'get'
  })
}

// 新增商品分类
export function addGoods(data) {
  return request({
    url: '/bst/goods',
    method: 'post',
    data: data
  })
}

// 修改商品分类
export function updateGoods(data) {
  return request({
    url: '/bst/goods',
    method: 'put',
    data: data
  })
}

// 删除商品分类
export function delGoods(id) {
  return request({
    url: '/bst/goods/' + id,
    method: 'delete'
  })
}
