import request from '@/utils/request'

// 查询商品规格项列表
export function listSpec(query) {
  return request({
    url: '/bst/spec/list',
    method: 'get',
    params: query
  })
}

// 查询商品规格项详细
export function getSpec(id) {
  return request({
    url: '/bst/spec/' + id,
    method: 'get'
  })
}

// 新增商品规格项
export function addSpec(data) {
  return request({
    url: '/bst/spec',
    method: 'post',
    data: data
  })
}

// 修改商品规格项
export function updateSpec(data) {
  return request({
    url: '/bst/spec',
    method: 'put',
    data: data
  })
}

// 删除商品规格项
export function delSpec(id) {
  return request({
    url: '/bst/spec/' + id,
    method: 'delete'
  })
}
