This commit is contained in:
2026-05-06 19:07:54 +08:00
parent fcc6acbcee
commit 0a85cd4c49
3 changed files with 52 additions and 38 deletions
+12
View File
@@ -30,3 +30,15 @@
### 注意事项
- GORM AutoMigrate 会自动添加新字段
- 前端颜色选择与日程类型联动
## 修复:calendar/events jsonErr
**问题**`fromGetCalendarEvents``start/end``*time.Time` 类型,无法直接解析字符串格式的日期。
**修复**:改为直接用类型断言解析字符串,用 `time.Parse("2006-01-02", ...)` 解析。
## 优化:BgColor 弃用,前端根据 ScheduleType 渲染颜色
**前端**:添加 `getColorByScheduleType()` 函数,`getEvents` 中使用 scheduleType 映射颜色。
**后端**:只存储 ScheduleType,不处理颜色逻辑。颜色完全由前端 `colorOptions` 控制。