e643512dfa
部署到群晖 / deploy (push) Successful in 44s
- 人员详情页:日期下方显示完整农历「农历 YYYY年 X月X日」 - 日历页本月纪念日列表:日期下方显示农历月日「X月X日」 - 公历事件用 solarToLunar 算当年对应农历 - 农历事件按当年公历落点反算农历(与原始农历一致) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
58 lines
2.3 KiB
Plaintext
58 lines
2.3 KiB
Plaintext
<!--calendar.wxml-->
|
||
<view class="container">
|
||
<!-- 日历头部 -->
|
||
<view class="calendar-header">
|
||
<view class="month-navigation">
|
||
<view class="nav-btn" bindtap="onPrevMonth">‹</view>
|
||
<text class="month-title">{{currentYear}}年{{currentMonth}}月</text>
|
||
<view class="nav-btn" bindtap="onNextMonth">›</view>
|
||
</view>
|
||
<view class="today-btn" bindtap="onGoToday">今天</view>
|
||
</view>
|
||
|
||
<!-- 星期标题 -->
|
||
<view class="week-header">
|
||
<view wx:for="{{['日', '一', '二', '三', '四', '五', '六']}}" wx:key="*this" class="week-title">
|
||
<text>{{item}}</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 日历内容 -->
|
||
<scroll-view class="calendar-content" scroll-y>
|
||
<view class="calendar-grid">
|
||
<view wx:for="{{calendarDays}}" wx:key="index" class="calendar-cell {{item.isToday ? 'today' : ''}} {{item.isOtherMonth ? 'other-month' : ''}}">
|
||
<text class="date-num">{{item.day}}</text>
|
||
<view class="events">
|
||
<view wx:for="{{item.events}}" wx:key="id" wx:for-item="event" class="event-dot" style="background-color: {{event.color}};"></view>
|
||
</view>
|
||
<view wx:if="{{item.hasMore}}" class="more-text">+{{item.moreCount}}</view>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 列表视图 -->
|
||
<view class="events-list">
|
||
<view class="section-title">本月纪念日</view>
|
||
<view wx:if="{{monthEvents.length === 0}}" class="empty-state">
|
||
<text class="icon">📅</text>
|
||
<text class="text">本月没有纪念日</text>
|
||
</view>
|
||
<view wx:for="{{monthEvents}}" wx:key="id" class="event-card" bindtap="onEventTap" data-id="{{item.id}}">
|
||
<view class="event-header">
|
||
<text class="event-icon">{{item.typeIcon}}</text>
|
||
<text class="event-title">{{item.personName}} - {{item.typeName}}</text>
|
||
<view class="event-date-group">
|
||
<text class="event-date">{{item.dateText}}</text>
|
||
<text class="event-lunar">{{item.lunarMD}}</text>
|
||
</view>
|
||
</view>
|
||
<view class="event-info">
|
||
<text wx:if="{{item.isLunar}}" class="lunar-badge">农历</text>
|
||
<text wx:if="{{item.daysUntil === 0}}" class="status urgent">今天</text>
|
||
<text wx:elif="{{item.daysUntil === 1}}" class="status warning">明天</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</scroll-view>
|
||
</view>
|
||
|