态势感知平台-开源生态与贡献价值全景接口字段修改

This commit is contained in:
d266377
2026-01-30 11:08:30 +08:00
parent 15b04e6788
commit 7b59d3ac9c
8 changed files with 47 additions and 37 deletions

View File

@@ -62,9 +62,10 @@ const fetchStats = async () => {
try {
loading.value = true;
const response = await overviewDataPage2();
if (response.code === 200 && response.data) {
const { developer, project, company, valuation } = response.data;
const businessData = response.data; // Axios响应格式,业务数据在response.data中
if (businessData?.code === 200 && businessData.data) {
const { developer, project, company, valuation } = businessData.data;
// 格式化数据显示
activeDevelopers.value = `${formatNumber(developer)}+`;
@@ -72,7 +73,7 @@ const fetchStats = async () => {
openSourceCompanies.value = `${formatNumber(company)}+`;
industryValuation.value = `${formatValuation(valuation)}`;
} else {
console.error('获取统计数据失败:', response.msg || '未知错误');
console.error('获取统计数据失败:', businessData?.msg || '未知错误');
// 设置默认值
activeDevelopers.value = '200万+';
openSourceProjects.value = '300万+';