v2.1.0 流程改造 + 农历准确性修复 + 双向同步 + 闰月支持
部署到群晖 / deploy (push) Successful in 44s

- Phase 1: 添加纪念日合并人物创建流程(方案 B)
- Phase 2: 农历提醒按 lunarMonth/Day 计算每年公历
- Phase 3: 人员数据同步到后端(新增 /api/person)
- Phase 4: 新设备启动从云端恢复数据
- Phase 5: 工具函数收敛 utils/format.js
- Phase 6: 同步失败入队 + 启动重试
- Phase 7: 闰月生日完整支持(含 isLeapMonth + UI 警示)
- 修复 lunarInfo 数据表错位(替换为权威源 jjonline/calendar.js)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
yuming
2026-06-02 05:51:17 +08:00
parent 06d22884b9
commit ddcfe3334e
16 changed files with 1001 additions and 167 deletions
+5 -26
View File
@@ -1,7 +1,7 @@
// person-detail.js
const storage = require('../../utils/storage')
const dateUtils = require('../../utils/date')
const { TYPE_NAMES, TYPE_ICONS, IMPORTANCE_TEXTS } = require('../../utils/constants')
const fmt = require('../../utils/format')
Page({
data: {
@@ -58,10 +58,10 @@ Page({
date,
dateText: dateUtils.formatDate(date, 'YYYY年MM月DD日'),
daysUntil,
daysUntilAbs: Math.abs(daysUntil), // 添加绝对值
typeIcon: this.getTypeIcon(a.type),
typeName: a.customTypeName || this.getTypeName(a.type),
importanceText: this.getImportanceText(a.importance)
daysUntilAbs: Math.abs(daysUntil),
typeIcon: fmt.getTypeIcon(a.type),
typeName: fmt.getTypeName(a.type, a.customTypeName),
importanceText: fmt.getImportanceText(a.importance)
}
})
@@ -71,27 +71,6 @@ Page({
this.setData({ anniversaries: formatted })
},
/**
* 获取类型图标
*/
getTypeIcon(type) {
return TYPE_ICONS[type] || '📅'
},
/**
* 获取类型名称
*/
getTypeName(type) {
return TYPE_NAMES[type] || '其他'
},
/**
* 获取重要程度文本
*/
getImportanceText(importance) {
return IMPORTANCE_TEXTS[importance] || '一般'
},
/**
* 编辑人员
*/