import request from "@/utils/request";

// 活动列表
export function activityList(params) {
  return request({
    url: "/business/casActivity/list",
    method: "get",
    params,
  });
}
// 活动-添加
export function activityAdd(data) {
  return request({
    url: "/business/casActivity",
    method: "post",
    data,
  });
}
// 活动-详情
export function activityDetail(id) {
  return request({
    url: `/business/casActivity/${id}`,
    method: "get",
  });
}
// 活动-修改
export function activityEdit(data) {
  return request({
    url: "/business/casActivity",
    method: "put",
    data,
  });
}
// 活动-删除
export function activityDelete(ids) {
  return request({
    url: `/business/casActivity/${ids}`,
    method: "delete",
  });
}

// 报名列表
export function signUpList(data) {
  return request({
    url: "/business/casActivityApply/list",
    method: "post",
    data,
  });
}
// 活动申请列表
export function applyList(params) {
  return request({
    url: "/business/casActivityApply/list",
    method: "get",
    params,
  });
}
// 活动申请详情
export function applyDetail(id) {
  return request({
    url: `/business/casActivityApply/${id}`,
    method: "get",
  });
}
// 活动申请-处理
export function applyHandle(data) {
  return request({
    url: "/business/casActivityApply",
    method: "put",
    data,
  });
}
// 活动申请-删除
export function applyDelete(ids) {
  return request({
    url: `/business/casActivityApply/${ids}`,
    method: "delete",
  });
}
// 活动报名列表
export function activityEnrollList(params) {
  return request({
    url: `/business/activityEnroll/list`,
    method: "get",
    params,
  });
}
// 删除活动报名
export function activityEnrollDelete(ids) {
  return request({
    url: `/business/activityEnroll`,
    method: "delete",
    data: {
      ids,
    },
  });
}
//  修改活动报名
export function activityEnrollUpdate(data) {
  return request({
    url: `/business/activityEnroll`,
    method: "put",
    data,
  });
}
