refactor(Calendar): 移除调试用的console.log语句
清理组件中用于调试的console.log输出,保持代码整洁
This commit is contained in:
@@ -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()),
|
||||
|
||||
Reference in New Issue
Block a user