import { createUrl, http } from "@/utils/http"; import type { Result } from "@/model"; // 后端请求接口 const apiUrl: any = createUrl({ listGroupApiId: "perm/group/permission/list", setting: "perm/group/permission/setting" }); /** * 接口管理 */ export const api: any = { /** * 查询分组权限 * * @param groupId groupId */ listGroupApiId(groupId: number): Promise> { const params = { groupId: groupId }; return http.get, any>(apiUrl.listGroupApiId, { params }); }, /** * 设置接口权限 * * @param groupId groupId * @param apiIdList apiIdList */ setting(groupId, apiIdList) { const data = { groupId: groupId, apiIdList: apiIdList }; return http.post, any>(apiUrl.setting, { data }); } };