fix(home): 修复节日速查显示问题
Publish Mini Program Dev Version / publish (push) Successful in 45s

1. 节日速查显示最近10条(之前只显示3条)
2. 修复右侧'还有XX天'溢出问题
   - fest-left 添加 flex-shrink: 0 和 min-width
   - 确保文字不会溢出屏幕
This commit is contained in:
gouki
2026-08-11 19:16:49 +00:00
parent 9ccab93c5b
commit 0256f4e7f3
3 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -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,
+3 -3
View File
@@ -123,14 +123,14 @@
</view>
</view>
<!-- 节日速查(默认显示3条,点击查看更多) -->
<!-- 节日速查(显示最近10条,点击查看更多) -->
<view class="card">
<view class="fest-head">
<text class="section-title">节日速查</text>
<text class="fest-more" bindtap="openZoom" data-type="fest-year" data-date="{{dayItem.key}}">更多 >></text>
</view>
<view class="fest-quick" wx:if="{{dayItem.upcoming.length > 0}}">
<view class="fest-quick-item" wx:for="{{dayItem.upcoming.slice(0, 3)}}" wx:key="name" catchtap="goFestival" data-date="{{item.solarDate}}">
<view class="fest-quick" wx:if="{{dayItem.upcoming && dayItem.upcoming.length > 0}}">
<view class="fest-quick-item" wx:for="{{dayItem.upcoming}}" wx:key="name" catchtap="goFestival" data-date="{{item.solarDate}}">
<text class="fest-name">{{item.name}}</text>
<text class="fest-date">{{item.solarMonth}}月{{item.solarDay}}日</text>
<text class="fest-left {{item.daysLeft === 0 ? 'is-today' : ''}}">{{item.daysLeft === 0 ? '今天' : item.daysLeft + '天后'}}</text>
+3
View File
@@ -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 {