From 0256f4e7f3a6ecf2dabc86a145d6b311f1392336 Mon Sep 17 00:00:00 2001 From: gouki Date: Tue, 11 Aug 2026 19:16:49 +0000 Subject: [PATCH] =?UTF-8?q?fix(home):=20=E4=BF=AE=E5=A4=8D=E8=8A=82?= =?UTF-8?q?=E6=97=A5=E9=80=9F=E6=9F=A5=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 节日速查显示最近10条(之前只显示3条) 2. 修复右侧'还有XX天'溢出问题 - fest-left 添加 flex-shrink: 0 和 min-width - 确保文字不会溢出屏幕 --- mini/pages/home/home.js | 2 +- mini/pages/home/home.wxml | 6 +++--- mini/pages/home/home.wxss | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/mini/pages/home/home.js b/mini/pages/home/home.js index f6f9727..9b26571 100644 --- a/mini/pages/home/home.js +++ b/mini/pages/home/home.js @@ -97,7 +97,7 @@ Page({ const termTime = dayInfo.solarTerm ? (SOLAR_TERM_TIMES[dayInfo.solarTerm] || '') : ''; const isFirstOrFifteen = this.data.highlightLunar && (dayInfo.lunarDay === 1 || dayInfo.lunarDay === 15); const nextBuddhist = this.data.showBuddhist ? getNextBuddhistFestival(y, m, d) : null; - const upcoming = getUpcomingFestivals(5, y, m, d); + const upcoming = getUpcomingFestivals(10, y, m, d); return { key: fmt(y, m, d), dayInfo, almanac, legalHoliday, workday, termTime, diff --git a/mini/pages/home/home.wxml b/mini/pages/home/home.wxml index 574d37a..955c789 100644 --- a/mini/pages/home/home.wxml +++ b/mini/pages/home/home.wxml @@ -123,14 +123,14 @@ - + 节日速查 更多 >> - - + + {{item.name}} {{item.solarMonth}}月{{item.solarDay}}日 {{item.daysLeft === 0 ? '今天' : item.daysLeft + '天后'}} diff --git a/mini/pages/home/home.wxss b/mini/pages/home/home.wxss index 5d70718..20e07fd 100644 --- a/mini/pages/home/home.wxss +++ b/mini/pages/home/home.wxss @@ -491,6 +491,9 @@ font-size: 24rpx; color: #C41E3A; font-weight: 500; + flex-shrink: 0; + min-width: 100rpx; + text-align: right; } .fest-left.is-today {