From 71d2432df550329b1acc56a69a3551866534e563 Mon Sep 17 00:00:00 2001 From: chenpanliang <3245129380@qq.com> Date: Wed, 27 Aug 2025 18:18:45 +0800 Subject: [PATCH] =?UTF-8?q?refactor(Calendar):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E7=94=A8=E7=9A=84console.log=E8=AF=AD?= =?UTF-8?q?=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 清理组件中用于调试的console.log输出,保持代码整洁 --- my-vue-app/src/views/secondTop/components/Calendar.vue | 6 ------ 1 file changed, 6 deletions(-) diff --git a/my-vue-app/src/views/secondTop/components/Calendar.vue b/my-vue-app/src/views/secondTop/components/Calendar.vue index e5ae585..1786b5e 100644 --- a/my-vue-app/src/views/secondTop/components/Calendar.vue +++ b/my-vue-app/src/views/secondTop/components/Calendar.vue @@ -685,7 +685,6 @@ const parseDateRange = (dateRangeStr) => { // 组件挂载时选中今天并获取营期数据 onMounted(async () => { - console.log('Calendar组件挂载,开始初始化...'); const todayDate = calendarDates.value.find(date => date.isToday); if (todayDate) { selectedDate.value = todayDate; @@ -693,13 +692,10 @@ onMounted(async () => { // 获取现有的营期数据 try { - console.log('开始获取营期数据...'); const result = await CenterCampPeriodAdmin(); - console.log('获取营期数据结果:', result); // 如果没有获取到营期数据,添加一些测试数据以便测试结束营期功能 if (!result || !result.data || !result.data.camp_period) { - console.log('没有获取到营期数据,添加测试数据...'); // 添加一些测试营期事件 events.value.push({ id: 999, @@ -709,12 +705,10 @@ onMounted(async () => { isCampEvent: true, type: 'data' }); - console.log('已添加测试营期数据,events:', events.value); } } catch (error) { console.error('获取营期数据失败:', error); // 即使API失败,也添加测试数据 - console.log('API失败,添加测试数据...'); events.value.push({ id: 999, date: formatDateToString(new Date()),