import request from '@/utils/request'

// 分页查询
export const pageList = (query) => {
  return request({
    url: '/coupon/couponInfo/pageList',
    method: 'get',
    params: query
  })
}
// 获取分销商列表
export const pageTableList = (query) => {
  return request({
    url: '/member/marketPersons/pageList',
    method: 'get',
    params: query
  })
}

// 未绑定优惠劵数据集
export const unBoundList = (query) => {
  return request({
    url: '/coupon/couponInfo/list',
    method: 'get',
    params: query
  })
}

// 新增修改
export const saveAndEdit = (data) => {
  return request({
    url: '/coupon/couponInfo/insertOrUpdate',
    method: 'post',
    data: data
  })
}

// 详情
export function getSelectById(id) {
  return request({
    url: '/coupon/couponInfo/selectById?id=' + id,
    method: 'get'
  })
}


// 删除
export const deleteById = (id) => {
  return request({
    url: '/coupon/couponInfo/deleteById',
    method: 'delete',
    params: {id:id}
  })
}
