This commit is contained in:
六如
2024-10-23 10:39:08 +08:00
parent d06a13df4a
commit 054c86a450
21 changed files with 646 additions and 130 deletions

View File

@@ -0,0 +1,38 @@
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<Result<any>> {
const params = {
groupId: groupId
};
return http.get<Result<any>, any>(apiUrl.listGroupApiId, { params });
},
/**
* 设置接口权限
*
* @param groupId groupId
* @param apiIdList apiIdList
*/
setting(groupId, apiIdList) {
const data = {
groupId: groupId,
apiIdList: apiIdList
};
return http.post<Result<any>, any>(apiUrl.setting, { data });
}
};