import { Method } from "alova"; import { alovaInstance } from "@/utils/alova/alova-iview"; import type { SchoolTreeNode } from "@/types/svc"; /** * 基础平台接口(Notice baseApi 平移):用户信息与已授权模块列表(菜单渲染数据源)。 * 模块清单在 UserBase 按本应用 appKey 配置(app_module),按登录人过滤下发。 */ const BASE = "/api/base"; function get(url: string, params?: Record): Method { return new Method("GET", alovaInstance, url, { params }); } class BaseApi { /** 当前登录用户信息 */ getUserInfo() { return get(`${BASE}/GetUserInfo`); } /** 当前用户已授权的模块列表(左侧菜单数据源) */ getUserMod() { return get(`${BASE}/GetUserMod`); } } export const baseApi = new BaseApi();