Files
wxserver/pages/calendar/calendar.wxml
T
yuming 3965e542fc
部署到群晖 / deploy (push) Failing after 6m22s
接入自建后端 + Gitea CI/CD
- 新增 server/:Node + Express + SQLite + node-cron 实现登录、纪念日 CRUD 和定时订阅消息推送
- 新增 .gitea/workflows/deploy.yml:推送即触发群晖 Docker 部署,监听 15002
- utils/api.js:自动按 envVersion 切换本地/线上 BASE_URL
- app.js 与 add-anniversary.js 移除 wx.cloud 调用,改走自建后端
- cloudfunctions/ 暂保留以便回滚
- 一并提交此前未入库的首页 / 设置页 / 日历 / 万年历等改造

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-01 15:44:09 +08:00

55 lines
2.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--calendar.wxml-->
<view class="container">
<!-- 日历头部 -->
<view class="calendar-header">
<view class="month-navigation">
<text class="nav-btn" bindtap="onPrevMonth"></text>
<text class="month-title">{{currentYear}}年{{currentMonth}}月</text>
<text class="nav-btn" bindtap="onNextMonth"></text>
</view>
<button class="today-btn" bindtap="onGoToday">今天</button>
</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>
<text class="event-date">{{item.dateText}}</text>
</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>