import request from "@/utils/request";

// 根据id获取会议详情
export function getMeetingDetailById(id) {
  return request({
    url: `/app/meeting/${id}`,
    method: "get",
  });
}
// 生成签名
export function generateSignature(params) {
  return request({
    url: `/app/generateSignature`,
    method: "get",
    params,
  });
}
// 添加预约
export function newAppointment(data) {
  return request({
    url: `/app/appointment`,
    method: "post",
    data,
  });
}

// 白名单参会
export function whitelistJoinMeeting(params) {
  return request({
    url: `/app/whitelistJoinMeeting`,
    method: "post",
    params,
  });
}

// 登记参会
export function registerJoinUser(data) {
  return request({
    url: `/app/registerJoinUser`,
    method: "post",
    data,
  });
}
export function panelistJoinMeeting(params) {
  return request({
    url: `/app/panelistJoinMeeting`,
    method: "post",
    params,
  });
}

// /app/visitorJoinUser
// 游客参会
export function visitorJoinUser(params) {
  return request({
    url: `/app/visitorJoinUser`,
    method: "post",
    params,
  });
}

// 会议中签到
export function signMeeting(data) {
  return request({
    url: `/app/signMeeting`,
    method: "post",
    data,
  });
}
// /app/meeting
export function getQuestionsList(params) {
  return request({
    url: `/app/meeting`,
    method: "get",
    params,
  });
}

export function commitExam(data) {
  return request({
    url: `/app/commitExam`,
    method: "post",
    data,
  });
}
export function commitQuestionnaire(data) {
  return request({
    url: `/app/commitQuestionnaire`,
    method: "post",
    data,
  });
}

export function getMeetingSetting() {
  return request({
    url: `/app/meetingSetting`,
    method: "get",
  });
}

// 监管参会
export function superviseJoinMeeting(params) {
  return request({
    url: `/app/superviseJoinMeeting`,
    method: "post",
    // headers: { "Content-Type": "application/json" },
    params,
  });
}

// 点赞
export function addMeetingLikeTotal(meetingId) {
  return request({
    url: `/app/addMeetingLikeTotal`,
    method: "get",
    params: {
      meetingId,
    },
  });
}
export function getOnlineUserTotalAndLikes(meetingId) {
  return request({
    url: `/app/getOnlineUserTotalAndLikes`,
    method: "get",
    params: {
      meetingId,
    },
  });
}
