简化纪念日类型:去掉"农历生日"类型,公历/农历改由 isLunar 字段决定
部署到群晖 / deploy (push) Successful in 44s

- typeList 从 5 项简化到 4 项:生日 / 结婚纪念日 / 订婚纪念日 / 其他纪念日
- TYPE_NAMES / TYPE_ICONS 中 lunar_birthday 保留兼容映射(也映射到「生日」+ 🎂),
  让线上历史数据自然回显,无需数据库迁移(方案 A)
- getTypeIndex('lunar_birthday') = 0,老数据编辑时正确回显「生日」
- index.js 列表筛选和 wxml 图标判断本来已含 lunar_birthday 兼容,无需改

老数据自然淘汰:用户重新保存时新数据写 type='birthday',老数据 type 保留
直到下次编辑保存才升级。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
yuming
2026-06-02 07:30:37 +08:00
parent 59ed635dcf
commit 756d57d818
4 changed files with 17 additions and 13 deletions
+4 -3
View File
@@ -11,8 +11,9 @@ const ANNIVERSARY_TYPES = {
}
const TYPE_NAMES = {
birthday: '公历生日',
lunar_birthday: '农历生日',
birthday: '生日',
// lunar_birthday 已合并到 birthday(公历/农历由 isLunar 决定),保留映射用于兼容老数据回显
lunar_birthday: '生日',
wedding: '结婚纪念日',
engagement: '订婚纪念日',
other: '其他纪念日'
@@ -20,7 +21,7 @@ const TYPE_NAMES = {
const TYPE_ICONS = {
birthday: '🎂',
lunar_birthday: '🌙',
lunar_birthday: '🎂',
wedding: '💍',
engagement: '💕',
other: '📅'