Files
lunar-mini/mini/pages/wish-tree/wish-tree.wxss
T
gouki 82c1a8d694
Publish Mini Program Dev Version / publish (push) Successful in 2m8s
首页老黄历全面升级 + 修复农历转换核心bug
【重要修复】重写农历双向转换算法(原来全错):
- solarToLunar/lunarToSolar 改用标准算法(基准1900-01-31正月初一,UTC避免时区误差)
- 验证:2026春节2-17、中秋9-25、端午6-19、2023闰二月全部正确

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

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

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

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

【设置页】
- 新增'显示佛历提醒'开关(默认关)
- 新增'初一十五高亮'开关(默认开)
2026-08-07 12:49:57 +00:00

305 lines
4.5 KiB
Plaintext

.container {
position: relative;
width: 100vw;
height: 100vh;
overflow: hidden;
background: #0f3460;
}
/* 全屏画布 */
.wish-tree-canvas {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
/* 顶部导航 */
.top-bar {
position: absolute;
top: 0;
left: 0;
right: 0;
padding: 80rpx 30rpx 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
z-index: 100;
}
.tree-switcher {
display: flex;
align-items: center;
gap: 20rpx;
background: rgba(0, 0, 0, 0.3);
padding: 10rpx 20rpx;
border-radius: 40rpx;
backdrop-filter: blur(10px);
}
.switch-btn {
width: 60rpx;
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
background: rgba(255, 255, 255, 0.2);
border-radius: 50%;
}
.switch-icon {
font-size: 40rpx;
color: #fff;
font-weight: bold;
}
.tree-name {
font-size: 32rpx;
color: #fff;
font-weight: bold;
min-width: 150rpx;
text-align: center;
}
/* 传感器控制 */
.sensor-controls {
display: flex;
gap: 16rpx;
}
.sensor-btn {
width: 70rpx;
height: 70rpx;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.3);
border-radius: 50%;
backdrop-filter: blur(10px);
transition: all 0.3s;
}
.sensor-btn.active {
background: rgba(255, 215, 0, 0.5);
box-shadow: 0 0 20rpx rgba(255, 215, 0, 0.5);
}
.sensor-icon {
font-size: 36rpx;
}
/* 许愿按钮 */
.action-bar {
position: absolute;
bottom: 60rpx;
left: 50%;
transform: translateX(-50%);
z-index: 100;
}
.btn-wish {
display: flex;
align-items: center;
justify-content: center;
gap: 12rpx;
background: linear-gradient(135deg, #C41E3A, #E74C3C);
color: #fff;
font-size: 32rpx;
padding: 24rpx 60rpx;
border-radius: 50rpx;
border: none;
box-shadow: 0 8rpx 30rpx rgba(196, 30, 58, 0.4);
}
.btn-wish .icon {
font-size: 36rpx;
}
/* 弹窗 */
.modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1000;
}
.modal-mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(5px);
}
.modal-content {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: #fff;
border-radius: 32rpx 32rpx 0 0;
max-height: 80vh;
overflow: hidden;
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 30rpx;
border-bottom: 1rpx solid #eee;
}
.modal-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
.modal-close {
font-size: 48rpx;
color: #999;
padding: 10rpx;
}
.modal-body {
padding: 30rpx;
max-height: 60vh;
overflow-y: auto;
}
/* 类型选择 */
.type-selector {
display: flex;
gap: 20rpx;
margin-bottom: 30rpx;
}
.type-item {
flex: 1;
padding: 24rpx;
border: 2rpx solid #eee;
border-radius: 16rpx;
text-align: center;
transition: all 0.3s;
}
.type-item.active {
border-color: #C41E3A;
background: #FFF5F5;
}
.type-name {
display: block;
font-size: 28rpx;
font-weight: bold;
color: #333;
margin-bottom: 8rpx;
}
.type-desc {
font-size: 22rpx;
color: #999;
}
/* 输入框 */
.wish-input {
width: 100%;
height: 200rpx;
padding: 20rpx;
border: 2rpx solid #eee;
border-radius: 16rpx;
font-size: 28rpx;
box-sizing: border-box;
}
.input-count {
text-align: right;
font-size: 22rpx;
color: #999;
margin-top: 10rpx;
}
/* 商品选择 */
.product-section {
margin-top: 30rpx;
}
.section-title {
font-size: 28rpx;
font-weight: bold;
color: #333;
margin-bottom: 20rpx;
}
.product-list {
display: flex;
flex-direction: column;
gap: 16rpx;
}
.product-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 24rpx;
border: 2rpx solid #eee;
border-radius: 16rpx;
transition: all 0.3s;
}
.product-item.active {
border-color: #C41E3A;
background: #FFF5F5;
}
.product-name {
font-size: 28rpx;
font-weight: bold;
color: #333;
}
.product-desc {
font-size: 22rpx;
color: #999;
margin-top: 8rpx;
}
.product-price {
font-size: 32rpx;
font-weight: bold;
color: #C41E3A;
}
/* 底部按钮 */
.modal-footer {
display: flex;
gap: 20rpx;
padding: 30rpx;
border-top: 1rpx solid #eee;
}
.modal-footer button {
flex: 1;
padding: 24rpx;
border-radius: 50rpx;
font-size: 28rpx;
}
.btn-outline {
background: #fff;
border: 2rpx solid #C41E3A;
color: #C41E3A;
}
.btn-primary {
background: linear-gradient(135deg, #C41E3A, #E74C3C);
color: #fff;
border: none;
}