Merge branch 'master' of https://gitcode.com/hk_openRepo/OpenRepo_Portal into junjie_dev

# Conflicts:
#	src/views/Jyh/Home/index.vue
This commit is contained in:
@user8949
2025-03-19 13:26:27 +08:00
24 changed files with 554 additions and 262 deletions

View File

@@ -142,10 +142,48 @@ export const getVulnList = (data): Promise<any> => {
request({
url: `/api/v1/repo/vulnerability/page`,
method: 'post',
data,
data
})
);
}
};
// 获取SBOM依赖树
export const dependencyTree = (softwareId: any): Promise<any> => {
return reqCatchV2(() =>
request({
url: `/api/v1/repo/dependency/tree`,
method: 'POST',
data: {
softwareId,
current: 1,
size: 99999
}
})
);
};
// 获取开发者社区信息
export const communityInfo = (softwareId: any): Promise<any> => {
return reqCatchV2(() =>
request({
url: `/api/v1/repo/community/info`,
method: 'POST',
data: {
softwareId
}
})
);
};
// 编辑用户信息(包含订阅默认预警方式)
export const userEdit = (data: any): Promise<any> => {
return reqCatchV2(() =>
request({
url: `/api/v1/user/edit`,
method: 'POST',
data
})
);
};
// 获取漏洞数据
export const getVulnDetail = (data): Promise<any> => {
@@ -153,21 +191,65 @@ export const getVulnDetail = (data): Promise<any> => {
request({
url: `/api/v1/repo/vulnerability/info`,
method: 'POST',
data,
data
})
);
}
};
// 迁移批量导入
export function repoImport(data: types.commonRepoReqType){
export function repoImport(data: types.commonRepoReqType) {
return reqCatchV2(() =>
request({
url: `/api/v1/home/software/valid`,
method: 'post',
data,
headers: {
'Content-Type': 'multipart/form-data', // 设置请求头
},
'Content-Type': 'multipart/form-data' // 设置请求头
}
})
);
}
// 个人中心-获取预警列表
export const getNoticeList = (data): Promise<any> => {
return reqCatchV2(() =>
request({
url: `/api/v1/alert/notice/list`,
method: 'POST',
data
})
);
};
// 个人中心-获取组织级预警列表
export const getgroupNoticeList = (data): Promise<any> => {
return reqCatchV2(() =>
request({
url: `/api/v1/alert/group/notice/list`,
method: 'POST',
data
})
);
};
// 个人中心-获取订阅列表
export const getSubscribeList = (data): Promise<any> => {
return reqCatchV2(() =>
request({
url: `/api/v1/alert/subscribe/list`,
method: 'POST',
data,
})
);
}
// 个人中心-获取组织级订阅列表
export const getGroupSubscribeList = (data): Promise<any> => {
return reqCatchV2(() =>
request({
url: `/api/v1/alert/group/subscribe/list`,
method: 'POST',
data,
})
);
}

View File

@@ -40,7 +40,7 @@ export function inviteOrganizationMemberApi(params: { groupId: number, username:
export function deleteOrganizationMemberApi(params: { groupId: number, username: string }): Promise<UnitRes<boolean>> {
return request({
url: `/api/v1/group/member/remove`,
method: 'delete',
method: 'post',
data: params,
});
}