Files
lunar-mini/mini/pages/settings/settings.wxml
T
gouki 5d40019ea5
Publish Mini Program Dev Version / publish (push) Successful in 3m16s
重构首页与tabBar:老黄历大日历+月历切换,新增百科页
tabBar(5个,全部带图标):
- 老黄历(首页) / 许愿 / 八字 / 百科(新) / 我的(原设置)
- 移除日历tab,月历并入首页左上角切换
- 移除运势tab,改从'我的'页进入

首页重构:
- custom 导航栏,标题'老黄历'
- 老式万年历大日历卡片:大日期+农历+干支+宜忌
- 左右箭头切换日期,'回到今天'
- 左上角'月历/日历'切换按钮,月历视图复用原日历网格
- 月历点选日期自动切回日视图

新增百科页:
- 二十四节气/农历节日/公历节日/干支生肖/黄历术语 分类
- 搜索 + 展开详情

我的页(原设置):
- 新增功能入口:每日运势/占卜/二十四节气/月历视图
2026-08-07 08:55:17 +00:00

90 lines
3.5 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.
<view class="container">
<!-- 用户信息 -->
<view class="card">
<view class="section-title">用户信息</view>
<view class="flex items-center gap-2" wx:if="{{userInfo}}">
<image src="{{userInfo.avatarUrl}}" class="avatar" mode="aspectFill"/>
<view>
<text class="text-base font-medium">{{userInfo.nickName}}</text>
<text class="text-xs text-muted block">已登录</text>
</view>
</view>
<view class="btn-primary" wx:else bindtap="login">微信登录</view>
</view>
<!-- 偏好设置 -->
<view class="card">
<view class="section-title">偏好设置</view>
<view class="setting-item">
<text class="setting-label">周起始日</text>
<view class="flex gap-2">
<view class="btn-outline {{weekStartDay === 0 ? 'active' : ''}}" bindtap="setWeekStart" data-v="0">周日</view>
<view class="btn-outline {{weekStartDay === 1 ? 'active' : ''}}" bindtap="setWeekStart" data-v="1">周一</view>
</view>
</view>
<view class="setting-item">
<text class="setting-label">子时流派</text>
<view class="flex gap-2">
<view class="btn-outline {{ziHourSect === 'lateZiNextDay' ? 'active' : ''}}" bindtap="setZiSect" data-v="lateZiNextDay">晚子时算次日</view>
<view class="btn-outline {{ziHourSect === 'lateZiSameDay' ? 'active' : ''}}" bindtap="setZiSect" data-v="lateZiSameDay">晚子时算当日</view>
</view>
</view>
<view class="setting-item">
<text class="setting-label">真太阳时校正</text>
<switch checked="{{solarTime}}" bindchange="onSolarTimeChange" color="#C41E3A"/>
</view>
</view>
<!-- 收藏管理 -->
<view class="card">
<view class="section-title">我的收藏</view>
<view class="bookmark-list" wx:if="{{bookmarks.length > 0}}">
<view class="bookmark-item" wx:for="{{bookmarks}}" wx:key="date">
<view class="flex justify-between items-center">
<view>
<text class="text-base font-medium">{{item.date}}</text>
<text class="text-xs text-muted block">{{item.lunarDate}}</text>
</view>
<view class="btn-ghost text-unlucky" bindtap="removeBookmark" data-date="{{item.date}}">删除</view>
</view>
</view>
</view>
<view class="text-center text-muted" wx:else>
<text>暂无收藏</text>
</view>
</view>
<!-- 功能入口 -->
<view class="card">
<view class="section-title">功能</view>
<view class="menu-item" bindtap="navTo" data-url="/pages/fortune/fortune">
<text class="menu-label">每日运势</text>
<text class="menu-arrow"></text>
</view>
<view class="menu-item" bindtap="navTo" data-url="/pages/divination/divination">
<text class="menu-label">占卜</text>
<text class="menu-arrow"></text>
</view>
<view class="menu-item" bindtap="navTo" data-url="/pages/solar-terms/solar-terms">
<text class="menu-label">二十四节气</text>
<text class="menu-arrow"></text>
</view>
<view class="menu-item" bindtap="navTo" data-url="/pages/calendar/calendar">
<text class="menu-label">月历视图</text>
<text class="menu-arrow"></text>
</view>
</view>
<!-- 关于 -->
<view class="card">
<view class="section-title">关于</view>
<view class="text-sm text-muted">
<text>老黄历小程序 v1.0.1</text>
<text class="block mt-1">提供农历、黄历、八字、许愿等功能</text>
</view>
</view>
</view>