import request from '@/utils/request'

// 获取列表
export function getList(params) {
  return request({
    url: '/promotion/discount/list',
    method: 'get',
    params
  })
}

// 获取详情
export function getDetail(params) {
  return request({
    url: '/promotion/discount/detail',
    method: 'get',
    params
  })
}

// 新增
export function addData(params) {
  return request({
    url: '/promotion/discount/add',
    method: 'post',
    data: params
  })
}

// 编辑
export function editData(params) {
  return request({
    url: '/promotion/discount/update',
    method: 'post',
    data: params
  })
}

// 删除
export function deleteData(params) {
  return request({
    url: '/promotion/discount/delete',
    method: 'post',
    params
  })
}

// 获取活动列表
export function getActivityList(params) {
  return request({
    url: '/promotion/group/list',
    method: 'get',
    params
  })
}