import request from "@/utils/request";

// 查询活动列表（getActivityByUser）
export const getActivityByUser = (query) => {
  return request({
    url: "/app/activity/getActivityByUser",
    method: "get",
    params: query,
  });
};

// 查询活动列表（getNewActivityByUser）
export const getNewActivityByUser = (query) => {
  return request({
    url: "/app/activity/getNewActivityByUser",
    method: "get",
    params: query,
  });
};

// 查询是否可以参加活动及返回必要信息
export const getActInfo = (query) => {
  return request({
    url: "/app/activity/getActInfo",
    method: "get",
    params: query,
  });
};

// 查询活动内容详情接口
export const getActivityDetail = (query) => {
  return request({
    url: "/app/activity/getActivityDetail",
    method: "get",
    params: query,
  });
};

// 查询最新活动详情接口
export const getNewActivityDetail = (query) => {
  return request({
    url: "/app/activity/getNewActivityDetail",
    method: "get",
    params: query,
  });
};

// 保存最新活动申请
export function participateSave(data) {
  return request({
    url: "/app/activity/participateSave",
    method: "post",
    data: data,
  });
}