修复节气计算/佛历倒计时/顶部固定高度+老黄历方框

- 节气改用精确查表(2000-2060天文算法生成),修复立秋等大偏差
- 佛历倒计时/节日速查以当前选中日期为基准,切换日期实时更新
- 大日历顶部节日区/佛历区固定高度,空着也占位不再跳动
- 大日期加老黄历式方框(双线边框,节假日红/工作日绿)
This commit is contained in:
gouki
2026-08-07 22:57:26 +00:00
parent bb9c19c99f
commit 2bd84eea88
5 changed files with 130 additions and 24 deletions
+5 -2
View File
@@ -82,6 +82,7 @@ Page({
const almanac = getAlmanacInfo(y, m, d);
this.setData({ dayInfo, almanac, currentYear: y, currentMonth: m });
this.refreshDerived();
this.loadUpcoming();
},
/** 计算派生数据(节假日/工作日/佛历/初一十五) */
@@ -92,12 +93,14 @@ Page({
const workday = isWorkday(y, m, d);
const termTime = dayInfo.solarTerm ? (SOLAR_TERM_TIMES[dayInfo.solarTerm] || '') : '';
const isFirstOrFifteen = highlightLunar && (dayInfo.lunarDay === 1 || dayInfo.lunarDay === 15);
const nextBuddhist = showBuddhist ? getNextBuddhistFestival() : null;
const nextBuddhist = showBuddhist ? getNextBuddhistFestival(y, m, d) : null;
this.setData({ legalHoliday, workday, termTime, isFirstOrFifteen, nextBuddhist });
},
loadUpcoming() {
this.setData({ upcoming: getUpcomingFestivals(5) });
const { dayInfo } = this.data;
const { solarYear: y, solarMonth: m, solarDay: d } = dayInfo;
this.setData({ upcoming: getUpcomingFestivals(5, y, m, d) });
},
prevDay() { this.shiftDay(-1); },