import { httpApp } from "@/plugins/axiosApp";

/** 获取app下载地址 */
export async function appDownloadApi() {
  return httpApp.get<string>(
    "/api/ecs_core/systemProperty/APP_DOWNLOAD_URL",
    {}
  );
}
/** 获取app是否可用 */
export async function appEnableApi(rootOrgId: number) {
  return httpApp.get<boolean>(
    `/api/ecs_core/org/property/${rootOrgId}/APP_ENABLED`,
    {}
  );
}

interface StuMenuOption {
  id: string;
  name: string;
  routeCode: string;
  weight: number;
  [propName: string]: any;
}
/** 获取用户菜单 */
export async function studentClientMenuApi(rootOrgId: number) {
  return httpApp.get<any, { data: StuMenuOption[] }>(
    "/api/ecs_core/rolePrivilege/getStudentClientMenu",
    { params: { rootOrgId } }
  );
}
