态势感知平台-全球开源风险态势感知监控中心接口字段修改

This commit is contained in:
d266377
2026-01-30 10:22:54 +08:00
parent f640eca25c
commit c09541afb7
8 changed files with 58 additions and 47 deletions

View File

@@ -96,11 +96,12 @@ const handleResize = () => {
const fetchIndustryData = async () => {
try {
const response = await industryDistributionPage1();
if (response.code === 200) {
internalData.value = response.data;
const businessData = response.data; // Axios响应格式业务数据在response.data中
if (businessData.code === 200 && businessData.data) {
internalData.value = businessData.data;
} else {
console.error('获取行业分布数据失败:', response.msg);
// 如果接口调用失败,使用默认数据
console.error('获取行业分布数据失败:', businessData.msg || '未知错误');
internalData.value = [
{ value: 25.8, name: '人工智能' },
{ value: 18.4, name: '云计算' },
@@ -114,7 +115,6 @@ const fetchIndustryData = async () => {
}
} catch (error) {
console.error('请求行业分布数据时发生错误:', error);
// 发生异常时使用默认数据
internalData.value = [
{ value: 25.8, name: '人工智能' },
{ value: 18.4, name: '云计算' },