From 46eb668c3120d437974bc550860ca3dcad0bff4f Mon Sep 17 00:00:00 2001 From: d266377 Date: Wed, 4 Feb 2026 09:51:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=80=81=E5=8A=BF=E6=84=9F=E7=9F=A5=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0-=E6=AD=A6=E6=B1=89=E5=B8=82=E5=BC=80=E6=BA=90?= =?UTF-8?q?=E7=94=9F=E6=80=81=E5=BB=BA=E8=AE=BE-2025=E6=AD=A6=E6=B1=89?= =?UTF-8?q?=E4=BC=98=E7=A7=80=E5=BC=80=E6=BA=90=E9=A1=B9=E7=9B=AE=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Jyh/Community/index.vue | 49 +++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/src/views/Jyh/Community/index.vue b/src/views/Jyh/Community/index.vue index 5c07903..54a6a39 100644 --- a/src/views/Jyh/Community/index.vue +++ b/src/views/Jyh/Community/index.vue @@ -311,7 +311,7 @@ import * as echarts from 'echarts'; import { usePageResize } from '@/utils/hooks/usePageResize'; import StatsBar from './components/StatsBar.vue'; import HarmonyEcoCharts from './components/HarmonyEcoCharts.vue'; -import { wuhanGithubProjectsPage3, cityProjectPage3, chinaExcellentProjectsPage3 } from '@/api/jyh/situation'; +import { wuhanGithubProjectsPage3, cityProjectPage3, chinaExcellentProjectsPage3, excellentProjectsPage3 } from '@/api/jyh/situation'; const { widthType } = usePageResize(); @@ -425,20 +425,10 @@ const fetchCityProjectData = async() => { const activeTab = ref(0); -const excellentProjects = ref([ - { 'name': '调问(DWSurvey)', 'desc': '开源问卷表单系统', 'org': '极推科技' }, - { 'name': 'Eova', 'desc': '低代码开发平台', 'org': '武汉简码' }, - { 'name': 'ClickVisual', 'desc': '可视化日志分析告警平台', 'org': '武汉初心' }, - { 'name': 'Meta2d.js', 'desc': '2D图元可视化引擎', 'org': '乐吾乐科技' }, - { 'name': 'Juno', 'desc': '分布式微服务管理系统', 'org': '武汉斗鱼' }, - { 'name': 'Opentalent', 'desc': '开源人才评价系统', 'org': '湖北大学' }, - { 'name': 'Fountain', 'desc': '仓颉语言版 Spring 框架替代', 'org': '江汉大学' }, - { 'name': 'deepin', 'desc': '深度桌面操作系统', 'org': '深之度' }, - { 'name': 'RustSBI', 'desc': 'RISC-V 安全引导程序', 'org': '华中科技大学' }, - { 'name': 'NextDenovo', 'desc': '长读长序列组装工具', 'org': '武汉希望组' } -]); +const excellentProjects = ref([]); const chinaExcellentProjects = ref([]); + // 2024武汉优秀开源项目备用数据 const chinaExcellentProjectsdata = () => { chinaExcellentProjects.value = [ @@ -495,6 +485,22 @@ const chinaExcellentProjectsdata = () => { ]; }; +// 2025武汉优秀开源项目备用数据 +const excellentProjectsdata = () => { + excellentProjects.value = [ + { 'name': '调问(DWSurvey)', 'desc': '开源问卷表单系统', 'org': '极推科技' }, + { 'name': 'Eova', 'desc': '低代码开发平台', 'org': '武汉简码' }, + { 'name': 'ClickVisual', 'desc': '可视化日志分析告警平台', 'org': '武汉初心' }, + { 'name': 'Meta2d.js', 'desc': '2D图元可视化引擎', 'org': '乐吾乐科技' }, + { 'name': 'Juno', 'desc': '分布式微服务管理系统', 'org': '武汉斗鱼' }, + { 'name': 'Opentalent', 'desc': '开源人才评价系统', 'org': '湖北大学' }, + { 'name': 'Fountain', 'desc': '仓颉语言版 Spring 框架替代', 'org': '江汉大学' }, + { 'name': 'deepin', 'desc': '深度桌面操作系统', 'org': '深之度' }, + { 'name': 'RustSBI', 'desc': 'RISC-V 安全引导程序', 'org': '华中科技大学' }, + { 'name': 'NextDenovo', 'desc': '长读长序列组装工具', 'org': '武汉希望组' } + ]; +}; + const fetchchinaExcellentProjects = async() => { try { const response = await chinaExcellentProjectsPage3(); @@ -511,6 +517,22 @@ const fetchchinaExcellentProjects = async() => { } }; +const fetchexcellentProjects = async() => { + try { + const response = await excellentProjectsPage3(); + const projectdata = response.data; + if (projectdata?.code === 200 && projectdata?.data) { + excellentProjects.value = projectdata.data; + } else { + console.error('获取2025武汉优秀开源项目数据失败:', projectdata?.msg || '未知错误'); + excellentProjectsdata(); + } + } catch (error) { + console.error('请求2025武汉优秀开源项目数据时发生错误:', error); + excellentProjectsdata(); + } +}; + const wuhanCommunities = ref([ { name: '黄鹤开源社区', type: '核心生态', slogan: '国家级、城市级开源社区平台,武汉开源生态的核心枢纽' }, { name: '深度社区 (Deepin)', type: '操作系统', slogan: '全球最大桌面操作系统社区之一,全球用户超过 750 万' }, @@ -850,6 +872,7 @@ onMounted(async() => { await fetchGithubProjects(); await fetchCityProjectData(); // 获取城市项目数据 await fetchchinaExcellentProjects(); // 获取2024中国优秀开源项目数据 + await fetchexcellentProjects(); // 获取2025武汉优秀开源项目数据 init(); // 再初始化图表 });