态势感知中心-全球开源风险态势感知监控中心情报流对接接口
This commit is contained in:
@@ -20,39 +20,92 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, onUnmounted, watch, nextTick } from 'vue';
|
import { ref, onMounted, onUnmounted, watch, nextTick } from 'vue';
|
||||||
|
import { feedListPage1 } from '@/api/jyh/situation';
|
||||||
|
|
||||||
|
//定义组件数据结构
|
||||||
|
interface FeedData {
|
||||||
|
type: string;
|
||||||
|
content: string;
|
||||||
|
}
|
||||||
|
|
||||||
// 接收外部数据作为属性
|
// 接收外部数据作为属性
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
initialData?: Array<any>;
|
initialData?: Array<FeedData>;
|
||||||
|
loading?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
// 情报流数据
|
//组件数据
|
||||||
const feedList = ref([
|
const feedList = ref<FeedData[]>([]);
|
||||||
{
|
|
||||||
type: 'CISA',
|
//获取情报流数据
|
||||||
content: 'CISA KEV新增: WordPress 的 OneClick Chat to Order 插件,存在不安全的直接对象引用漏洞 (CVE-2025-13526) '
|
const fetchFeedData = async () => {
|
||||||
},
|
try {
|
||||||
{
|
console.log('开始请求情报流数据...');
|
||||||
type: '投毒',
|
const response = await feedListPage1();
|
||||||
content: '投毒监控: npm 基建级包大规模投毒事件,影响chalk, debug, ansi-styles 等 18 个包'
|
if (response.code === 200) {
|
||||||
},
|
feedList.value = response.data || [];
|
||||||
{
|
} else {
|
||||||
type: 'CNVD',
|
console.error('获取情报流数据失败:', response?.msg || '未知错误');
|
||||||
content: 'CNVD预警: Google Chrome信息泄露漏洞(CNVD-2025-3038304)'
|
// 如果接口调用失败,使用默认数据
|
||||||
},
|
feedList.value = [
|
||||||
{
|
{
|
||||||
type: 'GitHub',
|
type: 'CISA',
|
||||||
content: 'GitHub安全通告: MovableType 软件的 ContentType 页面 "编辑分类集" 功能存在存储型跨站脚本漏洞'
|
content: 'CISA KEV新增: WordPress 的 OneClick Chat to Order 插件,存在不安全的直接对象引用漏洞 (CVE-2025-13526) '
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: '修复',
|
type: '投毒',
|
||||||
content: '漏洞修复: Node.js 发布 v20.11.0 版本,修复 3 个高危漏洞'
|
content: '投毒监控: npm 基建级包大规模投毒事件,影响chalk, debug, ansi-styles 等 18 个包'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: '供应链',
|
type: 'CNVD',
|
||||||
content: '供应链预警: Maven 中央仓库发现 12 个伪造开源组件,包含后门程序'
|
content: 'CNVD预警: Google Chrome信息泄露漏洞(CNVD-2025-3038304)'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'GitHub',
|
||||||
|
content: 'GitHub安全通告: MovableType 软件的 ContentType 页面 "编辑分类集" 功能存在存储型跨站脚本漏洞'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: '修复',
|
||||||
|
content: '漏洞修复: Node.js 发布 v20.11.0 版本,修复 3 个高危漏洞'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: '供应链',
|
||||||
|
content: '供应链预警: Maven 中央仓库发现 12 个伪造开源组件,包含后门程序'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('获取情报流数据异常:', error);
|
||||||
|
// 发生异常时使用默认数据
|
||||||
|
feedList.value = [
|
||||||
|
{
|
||||||
|
type: 'CISA',
|
||||||
|
content: 'CISA KEV新增: WordPress 的 OneClick Chat to Order 插件,存在不安全的直接对象引用漏洞 (CVE-2025-13526) '
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: '投毒',
|
||||||
|
content: '投毒监控: npm 基建级包大规模投毒事件,影响chalk, debug, ansi-styles 等 18 个包'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'CNVD',
|
||||||
|
content: 'CNVD预警: Google Chrome信息泄露漏洞(CNVD-2025-3038304)'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'GitHub',
|
||||||
|
content: 'GitHub安全通告: MovableType 软件的 ContentType 页面 "编辑分类集" 功能存在存储型跨站脚本漏洞'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: '修复',
|
||||||
|
content: '漏洞修复: Node.js 发布 v20.11.0 版本,修复 3 个高危漏洞'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: '供应链',
|
||||||
|
content: '供应链预警: Maven 中央仓库发现 12 个伪造开源组件,包含后门程序'
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
]);
|
};
|
||||||
|
|
||||||
|
|
||||||
// 如果提供了初始数据,则使用提供的数据
|
// 如果提供了初始数据,则使用提供的数据
|
||||||
watch(() => props.initialData, (newData) => {
|
watch(() => props.initialData, (newData) => {
|
||||||
@@ -126,7 +179,8 @@ const resumeScroll = (containerKey: number) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 7. 组件挂载时启动滚动
|
// 7. 组件挂载时启动滚动
|
||||||
onMounted(() => {
|
onMounted(async() => {
|
||||||
|
await fetchFeedData(); // 获取情报流数据
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
autoScroll(1);
|
autoScroll(1);
|
||||||
});
|
});
|
||||||
@@ -142,6 +196,7 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user