import request from "@/utils/request.js";

/**
 *
 * @returns
 */
export function getJoinSettings() {
  return request.get("join/team/list");
}

/**
 *
 * @param {*} data
 * @returns
 */
export function applicationJoin(data) {
  return request.post("join-team/application/submit", data);
}

// 获取申请详情
export function applicationDetailAPI(roleType) {
  return request.get(
    `join-team/application/detail/user-role/?roleType=${roleType}`
  );
}
// 获取用户所有加盟角色
export function getJoinRolesAPI() {
  return request.get("join-team/user-role/user");
}
// 根据用户id获取代购详情
export function getJoinDetailAPI(uid) {
  return request.get(`daigou/detail/${uid}`);
}

/**
 * 获取推荐官看板数据
 * @returns
 */
export function getPromoterDashboard() {
  return request.get("promoter/dashboard");
}

// 获取推荐官拉新用户列表
export function getPromoterInvites(params) {
  return request.get("promoter/invites", { params });
}

// 获取推荐官收入明细列表
export function getPromoterIncomeDetails(params) {
  return request.get("promoter/income-details", { params });
}
