import request from '@/utils/request'

// 查询列表
export function listClassify(query) {
  return request({
    url: '/coupon/category/list',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getClassify(id) {
  return request({
    url: '/coupon/category/' + id,
    method: 'get'
  })
}

// 新增
export function addClassify(data) {
  return request({
    url: '/coupon/category',
    method: 'post',
    data: data
  })
}

// 修改
export function updateClassify(data) {
  return request({
    url: '/coupon/category/edit',
    method: 'post',
    data: data
  })
}

// 删除
export function delClassify(ids) {
  return request({
    url: '/coupon/category/' + ids,
    method: 'put'
  })
}
