首页老黄历全面升级 + 修复农历转换核心bug
Publish Mini Program Dev Version / publish (push) Successful in 2m8s

【重要修复】重写农历双向转换算法(原来全错):
- solarToLunar/lunarToSolar 改用标准算法(基准1900-01-31正月初一,UTC避免时区误差)
- 验证:2026春节2-17、中秋9-25、端午6-19、2023闰二月全部正确

【首页大日历】
- 日期数字加大到240rpx,超醒目
- 节假日红色喜庆卡片+红数字(春节/国庆/中秋等法定假日)
- 工作日绿色卡片+绿数字(一眼知道要上班)
- 周末红色数字+米黄卡片
- 节气显示具体时刻(如 立秋 20:29)
- 初一/十五金色标记(可在设置关闭)
- 佛历提醒:距下一佛诞还有几天(可在设置开启)

【全屏放大弹窗(老年友好)】
- 大日历卡片/宜忌/详情/节日速查 点击均可全屏放大
- 宜忌放大后字号44rpx,详情放大后40rpx

【月历视图】
- swiper 左右滑动换月,预计算5个月居中显示
- 滑到边缘自动补月,可无限滚动
- 点选日期切回日视图

【节日速查】
- 首页显示近期5个节日(中秋/重阳等)+公历日期+倒计时
- 点击直接跳到该日老黄历

【设置页】
- 新增'显示佛历提醒'开关(默认关)
- 新增'初一十五高亮'开关(默认开)
This commit is contained in:
gouki
2026-08-07 12:49:57 +00:00
parent 5d40019ea5
commit 82c1a8d694
11 changed files with 1636 additions and 425 deletions
+24 -32
View File
@@ -1,48 +1,40 @@
<view class="container">
<!-- 许愿树画布 -->
<view class="canvas-container">
<canvas
canvas-id="wishTree"
class="wish-tree-canvas"
style="width: {{canvasWidth}}px; height: {{canvasHeight}}px;"
></canvas>
<!-- 全屏画布 -->
<canvas
canvas-id="wishTree"
class="wish-tree-canvas"
style="width: {{canvasWidth}}px; height: {{canvasHeight}}px;"
bindtouchstart="onCanvasTouch"
></canvas>
<!-- 顶部导航 -->
<view class="top-bar">
<view class="tree-switcher">
<view class="switch-btn" bindtap="switchTree" data-direction="prev">
<text class="switch-icon"></text>
</view>
<view class="tree-name">{{trees[currentTreeIndex].name || '许愿树'}}</view>
<view class="switch-btn" bindtap="switchTree" data-direction="next">
<text class="switch-icon"></text>
</view>
</view>
<!-- 许愿条覆盖层 -->
<view class="wishes-overlay">
<view
wx:for="{{wishes}}"
wx:key="id"
class="wish-tag {{item.type}} {{item.isRobot ? 'robot' : ''}}"
style="left: {{item.x}}px; top: {{item.y}}px;"
bindtap="viewWishDetail"
data-id="{{item.id}}"
>
<text class="wish-text">{{item.content}}</text>
<view class="wish-badge" wx:if="{{item.type === 'paid'}}">VIP</view>
<!-- 传感器控制 -->
<view class="sensor-controls">
<view class="sensor-btn {{micEnabled ? 'active' : ''}}" bindtap="enableMicrophone">
<text class="sensor-icon">🎤</text>
</view>
</view>
</view>
<!-- 许愿按钮 -->
<view class="action-bar">
<button class="btn-primary btn-wish" bindtap="openCreateModal">
<button class="btn-wish" bindtap="openCreateModal">
<text class="icon">🙏</text>
<text>我要许愿</text>
</button>
</view>
<!-- 许愿说明 -->
<view class="tips-section">
<view class="tip-item">
<text class="tip-icon">🎋</text>
<text class="tip-text">免费许愿:20字以内,可能被覆盖</text>
</view>
<view class="tip-item">
<text class="tip-icon">✨</text>
<text class="tip-text">付费许愿:100字以内,优先展示,长期保留</text>
</view>
</view>
<!-- 许愿弹窗 -->
<view class="modal" wx:if="{{showCreateModal}}">
<view class="modal-mask" bindtap="closeCreateModal"></view>