import { request } from '@/service/request';

/**
 * 所有列表
 * @returns
 */
export function fetchGetActivityList(data: any) {
  return request({
    url: `/smqjh-system/sys-api/coupon/page`,
    method: 'get',
    params: data
  });
}

/**
 *
    新增
 * @param data
 * @returns
 */

export function fetchAddActivity(data: any) {
  return request({
    url: `/smqjh-system/sys-api/coupon/save`,
    method: 'post',
    data
  });
}

/**
 *
    编辑
 * @param data
 * @returns
 */

export function fetchEditActivity(data: any) {
  return request({
    url: `/smqjh-system/sys-api/coupon/update`,
    method: 'PUT',
    data
  });
}

/**
 *
    删除
 * @param data
 * @returns
 */

export function delActivity(id: any) {
  return request({
    url: `/smqjh-system/sys-api/coupon/delete/${id}`,
    method: 'DELETE'
  });
}

/**
 * 获取领取记录
 * @returns
 */
export function fetchReceiveRecord(data: any) {
  return request({
    url: `/smqjh-system/sys-api/coupon/receiveRecord`,
    method: 'get',
    params: data
  });
}

/**
 * 获取领取记录统计
 * @returns
 */
export function fetchReceiveRecordCount(data: any) {
  return request({
    url: `/smqjh-system/sys-api/coupon/receiveRecordCount`,
    method: 'get',
    params: data
  });
}
