feat: migrate static pages to native tabbar

This commit is contained in:
2026-04-23 21:25:24 +08:00
parent f3cd0c3a98
commit cd30f57f2c
116 changed files with 7143 additions and 311 deletions

View File

@@ -0,0 +1,81 @@
const { createMingliHallPageData: createBaseMingliHallPageData } = require('../../../../utils/static-ux/mingli')
const { ROUTES, openStaticRoute } = require('../../../../utils/static-ux/route-map')
function createMingliHallPageData() {
const baseData = createBaseMingliHallPageData()
return {
...baseData,
almanac: {
date: '乙巳年 · 宜研习 · 忌浮躁',
ganzhi: '壬寅日 · 辰时',
yi: '宜:开卷、推演 · 忌:断章',
icon: '盘'
},
wisdomCard: {
text: '知进退存亡,而不失其正者,其唯圣人乎。',
from: '《周易》'
},
hotTopics: [
{
key: 'topic-drops',
label: '滴天髓',
route: `${ROUTES.mingli.searchBooks}?keyword=滴天髓`
},
{
key: 'topic-bazi',
label: '八字',
route: ROUTES.mingli.bazi
},
{
key: 'topic-interpret',
label: '命理解读',
route: ROUTES.mingli.interpret
}
],
guideCards: [
{
key: 'guide-1',
title: '从排盘到解读',
description: '先完成静态排盘,再进入命理解读页承接结果结构。',
route: ROUTES.mingli.bazi
},
{
key: 'guide-2',
title: '从经典到术语',
description: '从易学典籍页进入静态阅读,再回到问题解释。',
route: `${ROUTES.mingli.bookDetail}?scene=classic-a`
}
],
recommendedBooks: [
{
key: 'book-a',
title: '滴天髓',
subtitle: '命理经典研习入口',
route: `${ROUTES.mingli.bookDetail}?scene=classic-a`
},
{
key: 'book-b',
title: '穷通宝鉴',
subtitle: '格局与用神的静态学习入口',
route: `${ROUTES.mingli.bookDetail}?scene=classic-b`
}
]
}
}
function showNavigate(route) {
openStaticRoute(route, wx)
}
Page({
data: createMingliHallPageData(),
handleRouteTap(event) {
showNavigate(event.currentTarget.dataset.route)
}
})
module.exports = {
createMingliHallPageData
}

View File

@@ -0,0 +1,5 @@
{
"navigationBarTitleText": "易学阁",
"navigationBarBackgroundColor": "#f8f0ee",
"navigationBarTextStyle": "black"
}

View File

@@ -0,0 +1,76 @@
<view class="hall-page">
<view class="almanac-card">
<view>
<text class="almanac-card__date">{{almanac.date}}</text>
<text class="almanac-card__ganzhi">{{almanac.ganzhi}}</text>
<text class="almanac-card__yi">{{almanac.yi}}</text>
</view>
<text class="almanac-card__icon">{{almanac.icon}}</text>
</view>
<view class="hall-grid">
<view
class="hall-card"
wx:for="{{quickCards}}"
wx:key="key"
data-route="{{item.route}}"
bindtap="handleRouteTap"
>
<view class="hall-card__icon">{{item.icon}}</view>
<text class="hall-card__title">{{item.title}}</text>
<text class="hall-card__subtitle">{{item.subtitle}}</text>
</view>
</view>
<view class="section-card">
<text class="section-card__title">每日一言</text>
<text class="section-card__text">{{wisdomCard.text}}</text>
<text class="section-card__from">—— {{wisdomCard.from}}</text>
</view>
<view class="section-card">
<text class="section-card__title">搜索热词</text>
<view class="chips-row">
<view
class="chips-row__item"
wx:for="{{hotTopics}}"
wx:key="key"
data-route="{{item.route}}"
bindtap="handleRouteTap"
>
{{item.label}}
</view>
</view>
</view>
<view class="section-card">
<text class="section-card__title">导读推荐</text>
<view
class="guide-card"
wx:for="{{guideCards}}"
wx:key="key"
data-route="{{item.route}}"
bindtap="handleRouteTap"
>
<text class="guide-card__title">{{item.title}}</text>
<text class="guide-card__desc">{{item.description}}</text>
</view>
</view>
<view class="section-card">
<text class="section-card__title">经典研习</text>
<view
class="book-row"
wx:for="{{recommendedBooks}}"
wx:key="key"
data-route="{{item.route}}"
bindtap="handleRouteTap"
>
<view class="book-row__cover">书</view>
<view class="book-row__body">
<text class="book-row__title">{{item.title}}</text>
<text class="book-row__subtitle">{{item.subtitle}}</text>
</view>
</view>
</view>
</view>

View File

@@ -0,0 +1,166 @@
page {
min-height: 100%;
background: linear-gradient(180deg, #f9f7f5 0%, #f3ebe8 100%);
}
.hall-page {
box-sizing: border-box;
min-height: 100vh;
padding: 28rpx 20rpx 72rpx;
}
.almanac-card,
.section-card,
.hall-card {
border: 1rpx solid rgba(139, 59, 49, 0.08);
border-radius: 28rpx;
background: rgba(255, 252, 248, 0.94);
box-shadow: 0 10rpx 26rpx rgba(139, 59, 49, 0.06);
}
.almanac-card {
display: flex;
align-items: center;
justify-content: space-between;
padding: 24rpx;
}
.almanac-card__date,
.almanac-card__yi,
.section-card__from {
display: block;
color: #7a6f64;
font-size: 22rpx;
line-height: 1.6;
}
.almanac-card__ganzhi {
display: block;
margin: 8rpx 0;
color: #8b3b31;
font-family: 'STSong', 'Songti SC', serif;
font-size: 34rpx;
font-weight: 700;
line-height: 1.3;
}
.almanac-card__icon {
color: #8b3b31;
font-size: 46rpx;
}
.hall-grid {
display: flex;
flex-wrap: wrap;
margin: 12rpx -6rpx 0;
}
.hall-card {
box-sizing: border-box;
width: 50%;
margin-top: 12rpx;
padding: 24rpx 18rpx;
background: #fff;
border-radius: 24rpx;
margin-left: 6rpx;
margin-right: 6rpx;
}
.hall-card__icon {
width: 82rpx;
height: 82rpx;
border-radius: 20rpx;
background: rgba(139, 59, 49, 0.08);
color: #8b3b31;
font-size: 34rpx;
line-height: 82rpx;
text-align: center;
}
.hall-card__title,
.section-card__title,
.guide-card__title,
.book-row__title {
display: block;
color: #2c2621;
font-family: 'STSong', 'Songti SC', serif;
font-size: 32rpx;
font-weight: 700;
line-height: 1.3;
}
.hall-card__title {
margin-top: 16rpx;
}
.hall-card__subtitle,
.guide-card__desc,
.book-row__subtitle,
.section-card__text {
display: block;
margin-top: 8rpx;
color: #7a6f64;
font-size: 24rpx;
line-height: 1.6;
}
.section-card {
margin-top: 18rpx;
padding: 24rpx;
}
.section-card__text {
margin-top: 14rpx;
font-size: 30rpx;
line-height: 1.8;
color: #352f29;
}
.chips-row {
margin: 14rpx -6rpx 0;
}
.chips-row__item {
display: inline-block;
margin: 6rpx;
padding: 12rpx 18rpx;
border-radius: 999rpx;
background: rgba(139, 59, 49, 0.08);
color: #8b3b31;
font-size: 22rpx;
line-height: 1;
}
.guide-card,
.book-row {
margin-top: 16rpx;
padding: 20rpx 0 0;
border-top: 1rpx solid rgba(139, 59, 49, 0.08);
}
.guide-card:first-of-type,
.book-row:first-of-type {
padding-top: 16rpx;
border-top: 0;
}
.book-row {
display: flex;
align-items: center;
}
.book-row__cover {
width: 72rpx;
height: 96rpx;
border-radius: 18rpx;
background: rgba(139, 59, 49, 0.1);
color: #8b3b31;
font-size: 28rpx;
line-height: 96rpx;
text-align: center;
}
.book-row__body {
flex: 1;
margin-left: 16rpx;
}