态势感知平台-全球开源风险态势感知监控中心接口字段修改
This commit is contained in:
@@ -49,10 +49,10 @@ const componentData = ref<ComponentData[]>([]);
|
||||
const fetchComponentData = async () => {
|
||||
try {
|
||||
const response = await highRiskComponentPage1();
|
||||
if (response.code === 200) {
|
||||
componentData.value = response.data;
|
||||
if (response.data.code === 200) {
|
||||
componentData.value = response.data.data;
|
||||
} else {
|
||||
console.error('获取高危组件数据失败:', response.msg);
|
||||
console.error('获取高危组件数据失败:', response.data.msg || '未知错误');
|
||||
// 如果接口调用失败,使用默认数据
|
||||
componentData.value = [
|
||||
{ name: 'Log4j2', cvss: 9.8, vulnCount: 15, usage: '1200万+', desc: 'CVE-2021-44228等严重RCE漏洞' },
|
||||
|
||||
Reference in New Issue
Block a user