mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
5.0
This commit is contained in:
38
sop-admin/sop-admin-frontend/src/api/permGroupPermission.ts
Normal file
38
sop-admin/sop-admin-frontend/src/api/permGroupPermission.ts
Normal 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 });
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user