feat: 完整重构小程序匹配功能 + 修复UI对齐 + 文章数据API

主要更新:
1. 按H5网页端完全重构匹配功能(match页面)
   - 4种匹配类型: 创业合伙/资源对接/导师顾问/团队招募
   - 资源对接等类型弹出手机号/微信号输入框
   - 去掉重新匹配按钮,改为返回按钮

2. 修复所有卡片对齐和宽度问题
   - 目录页附录卡片居中
   - 首页阅读进度卡片满宽度
   - 我的页面菜单卡片对齐
   - 推广中心分享卡片统一宽度

3. 修复目录页图标和文字对齐
   - section-icon固定40rpx宽高
   - section-title与图标垂直居中

4. 更新真实完整文章标题(62篇)
   - 从book目录读取真实markdown文件名
   - 替换之前的简化标题

5. 新增文章数据API
   - /api/db/chapters - 获取完整书籍结构
   - 支持按ID获取单篇文章内容
This commit is contained in:
卡若
2026-01-21 15:49:12 +08:00
parent 1ee25e3dab
commit b60edb3d47
197 changed files with 34430 additions and 7345 deletions

View File

@@ -1,232 +1,139 @@
// pages/index/index.js
/**
* Soul创业实验 - 首页
* 开发: 卡若
* 技术支持: 存客宝
*/
const app = getApp()
Page({
data: {
bookStats: {
chapters: 64,
words: '15万',
readers: '1.5万'
// 系统信息
statusBarHeight: 44,
navBarHeight: 88,
// 用户信息
isLoggedIn: false,
hasFullBook: false,
purchasedCount: 0,
// 书籍数据
totalSections: 62,
bookData: [],
// 推荐章节
featuredSections: [
{ id: '1.1', title: '荷包:电动车出租的被动收入模式', tag: '免费', tagClass: 'tag-free', part: '真实的人' },
{ id: '3.1', title: '3000万流水如何跑出来', tag: '热门', tagClass: 'tag-pink', part: '真实的行业' },
{ id: '8.1', title: '流量杠杆:抖音、Soul、飞书', tag: '推荐', tagClass: 'tag-purple', part: '真实的赚钱' }
],
// 最新章节
latestSection: {
id: '9.14',
title: '大健康私域一个月150万的70后',
part: '真实的赚钱'
},
allChapters: [],
// 内容概览
partsList: [
{ id: 'part-1', number: '一', title: '真实的人', subtitle: '人与人之间的底层逻辑' },
{ id: 'part-2', number: '二', title: '真实的行业', subtitle: '电商、内容、传统行业解析' },
{ id: 'part-3', number: '三', title: '真实的错误', subtitle: '我和别人犯过的错' },
{ id: 'part-4', number: '四', title: '真实的赚钱', subtitle: '底层结构与真实案例' },
{ id: 'part-5', number: '五', title: '真实的社会', subtitle: '未来职业与商业生态' }
],
// 加载状态
loading: true
},
onLoad() {
this.loadAllChapters()
// 获取系统信息
this.setData({
statusBarHeight: app.globalData.statusBarHeight,
navBarHeight: app.globalData.navBarHeight
})
// 初始化数据
this.initData()
},
onShow() {
// 每次显示时刷新数据
this.refreshData()
},
// 加载所有章节
loadAllChapters() {
wx.showLoading({ title: '加载中...', mask: true })
// 先尝试读取本地生成的章节数据
wx.request({
url: `${app.globalData.apiBase}/book/all-chapters`,
method: 'GET',
success: (res) => {
if (res.statusCode === 200 && res.data.chapters) {
this.setData({
allChapters: res.data.chapters,
bookStats: {
chapters: res.data.total || res.data.chapters.length,
words: '15万',
readers: '1.5万'
},
loading: false
})
// 缓存到本地
wx.setStorageSync('allChapters', res.data.chapters)
} else {
this.loadLocalChapters()
}
},
fail: () => {
// 使用本地缓存数据
this.loadLocalChapters()
},
complete: () => {
wx.hideLoading()
}
})
},
// 加载本地章节数据(离线模式)
loadLocalChapters() {
// 尝试从缓存读取
const cached = wx.getStorageSync('allChapters')
if (cached && cached.length > 0) {
this.setData({
allChapters: cached,
bookStats: {
chapters: cached.length,
words: '15万',
readers: '1.5万'
},
loading: false
})
return
// 设置TabBar选中状态
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({ selected: 0 })
}
// 更新用户状态
this.updateUserStatus()
},
// 如果没有缓存,使用模拟数据
const mockChapters = [
{ index: 1, id: 'preface', title: '序言为什么我每天早上6点在Soul开播', updateTime: '今天', words: 3200, partTitle: '序言' },
{ index: 2, id: 'ch1-1', title: '1.1 荷包:电动车出租的被动收入模式', updateTime: '今天', words: 4500, partTitle: '第一篇|真实的人' },
{ index: 3, id: 'ch1-2', title: '1.2 老墨:资源整合高手的社交方法', updateTime: '今天', words: 3800, partTitle: '第一篇|真实的人' },
]
// 初始化数据
async initData() {
this.setData({ loading: true })
try {
// 获取书籍数据
await this.loadBookData()
} catch (e) {
console.error('初始化失败:', e)
} finally {
this.setData({ loading: false })
}
},
// 加载书籍数据
async loadBookData() {
try {
const res = await app.request('/api/book/all-chapters')
if (res && res.data) {
this.setData({
bookData: res.data,
totalSections: res.totalSections || 62
})
}
} catch (e) {
console.error('加载书籍数据失败:', e)
}
},
// 更新用户状态
updateUserStatus() {
const { isLoggedIn, hasFullBook, purchasedSections } = app.globalData
this.setData({
allChapters: mockChapters,
bookStats: {
chapters: mockChapters.length,
words: '15万',
readers: '1.5万'
},
loading: false
isLoggedIn,
hasFullBook,
purchasedCount: hasFullBook ? this.data.totalSections : (purchasedSections?.length || 0)
})
},
// 刷新数据
refreshData() {
const bookData = app.globalData.bookData
if (bookData) {
this.setData({
bookStats: {
chapters: bookData.totalChapters || 65,
words: bookData.totalWords || '12万',
readers: bookData.totalReaders || '1.2万'
}
})
}
},
// 立即阅读(跳转到第一章)
readNow() {
if (this.data.allChapters.length > 0) {
const firstChapter = this.data.allChapters[0]
wx.navigateTo({
url: `/pages/read/read?id=${firstChapter.id}`
})
} else {
wx.showToast({
title: '章节加载中...',
icon: 'none'
})
}
},
// 阅读章节
readChapter(e) {
const chapterId = e.currentTarget.dataset.id
wx.navigateTo({
url: `/pages/read/read?id=${chapterId}`
})
},
// 查看全部章节
// 跳转到目录
goToChapters() {
wx.navigateTo({
url: '/pages/chapters/chapters'
})
wx.switchTab({ url: '/pages/chapters/chapters' })
},
// 购买处理
handlePurchase() {
// 检查登录状态
const userInfo = app.getUserInfo()
if (!userInfo) {
// 未登录,先登录
this.showLoginModal()
return
}
// 跳转到购买页面
wx.navigateTo({
url: '/pages/purchase/purchase'
})
// 跳转到阅读页
goToRead(e) {
const id = e.currentTarget.dataset.id
wx.navigateTo({ url: `/pages/read/read?id=${id}` })
},
// 显示登录弹窗
showLoginModal() {
wx.showModal({
title: '需要登录',
content: '购买前需要先登录账号',
confirmText: '立即登录',
success: (res) => {
if (res.confirm) {
this.doLogin()
}
}
})
// 跳转到匹配页
goToMatch() {
wx.switchTab({ url: '/pages/match/match' })
},
// 执行登录
doLogin() {
wx.showLoading({ title: '登录中...', mask: true })
app.wxLogin((success, user) => {
wx.hideLoading()
if (success) {
wx.showToast({
title: '登录成功',
icon: 'success'
})
// 登录成功后自动跳转购买
setTimeout(() => {
this.handlePurchase()
}, 1500)
} else {
wx.showToast({
title: '登录失败',
icon: 'none'
})
}
})
},
// 跳转推广页
goToReferral() {
wx.switchTab({
url: '/pages/my/my?tab=referral'
})
// 跳转到我的页面
goToMy() {
wx.switchTab({ url: '/pages/my/my' })
},
// 下拉刷新
onPullDownRefresh() {
this.loadAllChapters()
setTimeout(() => {
wx.stopPullDownRefresh()
}, 1000)
},
// 分享到微信
onShareAppMessage() {
const userInfo = app.getUserInfo()
const inviteCode = userInfo ? userInfo.inviteCode : ''
return {
title: 'Soul派对·创业实验 - 一场真实的商业探索',
path: `/pages/index/index?invite=${inviteCode}`,
imageUrl: '/assets/images/share-cover.png'
}
},
// 分享到朋友圈
onShareTimeline() {
const userInfo = app.getUserInfo()
const inviteCode = userInfo ? userInfo.inviteCode : ''
return {
title: 'Soul派对·创业实验',
query: `invite=${inviteCode}`,
imageUrl: '/assets/images/share-cover.png'
}
async onPullDownRefresh() {
await this.initData()
this.updateUserStatus()
wx.stopPullDownRefresh()
}
})

View File

@@ -0,0 +1,6 @@
{
"usingComponents": {},
"enablePullDownRefresh": true,
"backgroundTextStyle": "light",
"backgroundColor": "#000000"
}

View File

@@ -1,135 +1,144 @@
<!--pages/index/index.wxml-->
<view class="container page-transition">
<!-- 头部装饰光晕 -->
<view class="header-glow"></view>
<!-- 顶部标签 -->
<view class="top-tag">
<text class="tag-icon">🎉</text>
<text class="tag-text">Soul · 派对房</text>
</view>
<!-- 书籍标题区 -->
<view class="header-section">
<view class="main-title">一场SOUL的</view>
<view class="sub-title gradient-text">创业实验场</view>
<view class="tagline">来自Soul派对房的真实商业故事</view>
<view class="quote-line">"社会不是靠努力,是靠洞察与选择"</view>
</view>
<!-- 数据统计卡片 -->
<view class="stats-card card">
<view class="stat-item">
<view class="stat-value brand-color">¥9.9</view>
<view class="stat-label">整本价格</view>
</view>
<view class="stat-divider"></view>
<view class="stat-item">
<view class="stat-value">{{bookStats.chapters}}</view>
<view class="stat-label">商业案例</view>
</view>
</view>
<!-- 作者信息 -->
<view class="author-bar card">
<view class="author-info">
<view class="author-avatar">卡</view>
<view>
<view class="author-label">作者</view>
<view class="author-name">卡若</view>
<!--Soul创业实验 - 首页 1:1还原Web版本-->
<view class="page page-transition">
<!-- 自定义导航栏占位 -->
<view class="nav-placeholder" style="height: {{statusBarHeight + 44}}px;"></view>
<!-- 顶部区域 -->
<view class="header" style="padding-top: {{statusBarHeight}}px;">
<view class="header-content">
<view class="logo-section">
<view class="logo-icon">
<text class="logo-text">S</text>
</view>
<view class="logo-info">
<view class="logo-title">
<text class="text-white">Soul</text>
<text class="brand-color">创业实验</text>
</view>
<text class="logo-subtitle">来自派对房的真实故事</text>
</view>
</view>
</view>
<view class="live-info">
<view class="live-label">每日直播</view>
<view class="live-time brand-color">06:00-09:00</view>
</view>
</view>
<!-- 立即阅读按钮 -->
<button class="btn-primary main-btn" bindtap="readNow">
📖 立即阅读
</button>
<view class="btn-tip">首章免费 · 部分章节3天后解锁</view>
<!-- 寄语卡片 -->
<view class="quote-card card">
<view class="quote-icon">"</view>
<view class="quote-content">
这不是一本教你成功的鸡汤书。这是我每天早上6点到9点在Soul派对房和几百个陌生人分享的真实故事。
</view>
<view class="quote-footer">
<view class="footer-avatar">卡</view>
<view>
<view class="footer-name">卡若</view>
<view class="footer-desc">Soul派对房主理人</view>
<view class="header-right">
<view class="chapter-badge">{{totalSections}}章</view>
</view>
</view>
</view>
<!-- 三个数据展示 -->
<view class="highlights-grid">
<view class="highlight-item">
<view class="h-value">{{bookStats.chapters}}+</view>
<view class="h-label">真实案例</view>
</view>
<view class="highlight-item">
<view class="h-value">5</view>
<view class="h-label">核心篇章</view>
</view>
<view class="highlight-item">
<view class="h-value">100+</view>
<view class="h-label">商业洞察</view>
</view>
</view>
<!-- 所有章节列表 -->
<view class="chapters-section card">
<view class="section-title">
<text class="title-text">全部章节</text>
<text class="chapter-count">共{{allChapters.length}}章</text>
</view>
<view class="chapter-list">
<view
class="chapter-item"
wx:for="{{allChapters}}"
wx:key="id"
bindtap="readChapter"
data-id="{{item.id}}"
>
<view class="chapter-number">{{item.index}}</view>
<view class="chapter-info">
<view class="chapter-title">{{item.title}}</view>
<view class="chapter-meta">
<text class="chapter-time">{{item.updateTime}}</text>
<text class="chapter-words">{{item.words}}字</text>
</view>
</view>
<view class="chapter-arrow">→</view>
<!-- 搜索栏 -->
<view class="search-bar" bindtap="goToChapters">
<view class="search-icon">
<view class="search-circle"></view>
<view class="search-handle"></view>
</view>
<text class="search-placeholder">搜索章节...</text>
</view>
</view>
<!-- 主内容区 -->
<view class="main-content">
<!-- Banner卡片 - 最新章节 -->
<view class="banner-card" bindtap="goToRead" data-id="{{latestSection.id}}">
<view class="banner-glow"></view>
<view class="banner-tag">最新更新</view>
<view class="banner-title">{{latestSection.title}}</view>
<view class="banner-part">{{latestSection.part}}</view>
<view class="banner-action">
<text class="banner-action-text">开始阅读</text>
<view class="banner-arrow">→</view>
</view>
</view>
</view>
<!-- 购买提示 -->
<view class="purchase-section card">
<view class="purchase-title">开启完整阅读</view>
<view class="purchase-desc">解锁全部章节,支持作者持续创作</view>
<view class="price-info">
<text class="price-current">¥9.9</text>
<text class="price-tip">起(每天+1元</text>
<!-- 阅读进度卡 -->
<view class="progress-card card">
<view class="progress-header">
<text class="progress-title">我的阅读</text>
<text class="progress-count">{{purchasedCount}}/{{totalSections}}章</text>
</view>
<view class="progress-bar-wrapper">
<view class="progress-bar-bg">
<view class="progress-bar-fill" style="width: {{(purchasedCount / totalSections) * 100}}%;"></view>
</view>
</view>
<view class="progress-stats">
<view class="stat-item">
<text class="stat-value brand-color">{{purchasedCount}}</text>
<text class="stat-label">已读</text>
</view>
<view class="stat-item">
<text class="stat-value">{{totalSections - purchasedCount}}</text>
<text class="stat-label">待读</text>
</view>
<view class="stat-item">
<text class="stat-value">5</text>
<text class="stat-label">篇章</text>
</view>
<view class="stat-item">
<text class="stat-value">11</text>
<text class="stat-label">章节</text>
</view>
</view>
</view>
<button class="btn-primary purchase-btn" bindtap="handlePurchase">
立即购买
</button>
</view>
<!-- 推广入口 -->
<view class="referral-banner card" bindtap="goToReferral">
<view class="referral-content">
<view class="referral-title">分享赚佣金</view>
<view class="referral-desc">推荐好友购买最高获得90%佣金</view>
<!-- 精选推荐 -->
<view class="section">
<view class="section-header">
<text class="section-title">精选推荐</text>
<view class="section-more" bindtap="goToChapters">
<text class="more-text">查看全部</text>
<text class="more-arrow">→</text>
</view>
</view>
<view class="featured-list">
<view
class="featured-item"
wx:for="{{featuredSections}}"
wx:key="id"
bindtap="goToRead"
data-id="{{item.id}}"
>
<view class="featured-content">
<view class="featured-meta">
<text class="featured-id brand-color">{{item.id}}</text>
<text class="tag {{item.tagClass}}">{{item.tag}}</text>
</view>
<text class="featured-title">{{item.title}}</text>
<text class="featured-part">{{item.part}}</text>
</view>
<view class="featured-arrow">→</view>
</view>
</view>
</view>
<!-- 内容概览 -->
<view class="section">
<text class="section-title">内容概览</text>
<view class="parts-list">
<view
class="part-item"
wx:for="{{partsList}}"
wx:key="id"
bindtap="goToChapters"
>
<view class="part-icon">
<text class="part-number">{{item.number}}</text>
</view>
<view class="part-info">
<text class="part-title">{{item.title}}</text>
<text class="part-subtitle">{{item.subtitle}}</text>
</view>
<view class="part-arrow">→</view>
</view>
</view>
</view>
<!-- 序言入口 -->
<view class="preface-card" bindtap="goToRead" data-id="preface">
<view class="preface-content">
<text class="preface-title">序言</text>
<text class="preface-desc">为什么我每天早上6点在Soul开播?</text>
</view>
<view class="tag tag-free">免费</view>
</view>
<view class="referral-icon">💰</view>
</view>
<!-- 底部留白 -->

View File

@@ -1,81 +1,267 @@
/* pages/index/index.wxss */
/**
* Soul创业实验 - 首页样式
* 1:1还原Web版本UI
*/
.container {
.page {
min-height: 100vh;
background: #000000;
padding-bottom: 120rpx;
padding-bottom: 200rpx;
}
/* 顶部标签 */
.top-tag {
display: inline-flex;
/* ===== 导航栏占位 ===== */
.nav-placeholder {
width: 100%;
}
/* ===== 顶部区域 ===== */
.header {
padding: 0 32rpx 32rpx;
}
.header-content {
display: flex;
align-items: center;
gap: 8rpx;
padding: 12rpx 24rpx;
background: rgba(48, 209, 88, 0.1);
border: 2rpx solid rgba(48, 209, 88, 0.3);
border-radius: 40rpx;
margin: 40rpx 0 0 32rpx;
justify-content: space-between;
margin-bottom: 32rpx;
padding-top: 24rpx;
}
.tag-icon {
font-size: 28rpx;
.logo-section {
display: flex;
align-items: center;
gap: 16rpx;
}
.tag-text {
font-size: 24rpx;
color: #30D158;
font-weight: 600;
.logo-icon {
width: 80rpx;
height: 80rpx;
border-radius: 20rpx;
background: linear-gradient(135deg, #00CED1 0%, #20B2AA 100%);
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 8rpx 24rpx rgba(0, 206, 209, 0.3);
}
/* 标题区 */
.header-section {
padding: 60rpx 48rpx 40rpx;
text-align: center;
}
.main-title {
font-size: 56rpx;
font-weight: 700;
.logo-text {
color: #ffffff;
margin-bottom: 8rpx;
font-size: 36rpx;
font-weight: 700;
}
.sub-title {
font-size: 64rpx;
font-weight: 800;
.logo-info {
display: flex;
flex-direction: column;
}
.logo-title {
font-size: 36rpx;
font-weight: 700;
}
.text-white {
color: #ffffff;
}
.brand-color {
color: #00CED1;
}
.logo-subtitle {
font-size: 22rpx;
color: rgba(255, 255, 255, 0.4);
margin-top: 4rpx;
}
.header-right {
display: flex;
align-items: center;
gap: 16rpx;
}
.chapter-badge {
font-size: 22rpx;
color: #00CED1;
background: rgba(0, 206, 209, 0.1);
padding: 8rpx 16rpx;
border-radius: 32rpx;
}
/* ===== 搜索栏 ===== */
.search-bar {
display: flex;
align-items: center;
gap: 24rpx;
padding: 24rpx 32rpx;
background: #1c1c1e;
border-radius: 24rpx;
border: 2rpx solid rgba(255, 255, 255, 0.05);
}
.search-icon {
position: relative;
width: 32rpx;
height: 32rpx;
}
.search-circle {
width: 20rpx;
height: 20rpx;
border: 4rpx solid rgba(255, 255, 255, 0.4);
border-radius: 50%;
}
.search-handle {
position: absolute;
bottom: 0;
right: 0;
width: 12rpx;
height: 4rpx;
background: rgba(255, 255, 255, 0.4);
transform: rotate(45deg);
border-radius: 2rpx;
}
.search-placeholder {
font-size: 28rpx;
color: rgba(255, 255, 255, 0.4);
}
/* ===== 主内容区 ===== */
.main-content {
padding: 0 32rpx;
width: 100%;
box-sizing: border-box;
}
/* ===== Banner卡片 ===== */
.banner-card {
position: relative;
padding: 40rpx;
border-radius: 32rpx;
overflow: hidden;
background: linear-gradient(135deg, #0d3331 0%, #1a1a2e 50%, #16213e 100%);
margin-bottom: 24rpx;
}
.gradient-text {
background: linear-gradient(135deg, #30D158 0%, #00E5FF 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
.banner-glow {
position: absolute;
top: 0;
right: 0;
width: 256rpx;
height: 256rpx;
background: #00CED1;
border-radius: 50%;
filter: blur(120rpx);
opacity: 0.2;
}
.tagline {
.banner-tag {
display: inline-block;
padding: 8rpx 16rpx;
background: #00CED1;
color: #000000;
font-size: 22rpx;
font-weight: 500;
border-radius: 8rpx;
margin-bottom: 24rpx;
}
.banner-title {
font-size: 36rpx;
font-weight: 700;
color: #ffffff;
margin-bottom: 16rpx;
padding-right: 64rpx;
}
.banner-part {
font-size: 28rpx;
color: rgba(255, 255, 255, 0.6);
margin-bottom: 16rpx;
margin-bottom: 24rpx;
}
.quote-line {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.4);
font-style: italic;
}
/* 数据统计卡片 */
.stats-card {
.banner-action {
display: flex;
align-items: center;
justify-content: space-around;
gap: 8rpx;
}
.banner-action-text {
font-size: 28rpx;
color: #00CED1;
font-weight: 500;
}
.banner-arrow {
color: #00CED1;
font-size: 28rpx;
}
/* ===== 通用卡片 ===== */
.card {
background: #1c1c1e;
border-radius: 32rpx;
padding: 32rpx;
margin: 32rpx 32rpx;
background: rgba(255, 255, 255, 0.03);
border: 1rpx solid rgba(255, 255, 255, 0.1);
border: 2rpx solid rgba(255, 255, 255, 0.05);
margin: 0 0 24rpx 0;
width: 100%;
box-sizing: border-box;
}
/* ===== 阅读进度卡 ===== */
.progress-card {
width: 100%;
background: #1c1c1e;
border-radius: 24rpx;
padding: 28rpx;
border: 2rpx solid rgba(255, 255, 255, 0.05);
margin: 0 0 24rpx 0;
box-sizing: border-box;
}
.progress-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 24rpx;
}
.progress-title {
font-size: 28rpx;
color: #ffffff;
font-weight: 500;
}
.progress-count {
font-size: 22rpx;
color: rgba(255, 255, 255, 0.4);
}
.progress-bar-wrapper {
margin-bottom: 24rpx;
}
.progress-bar-bg {
width: 100%;
height: 16rpx;
background: #2c2c2e;
border-radius: 8rpx;
overflow: hidden;
}
.progress-bar-fill {
height: 100%;
background: linear-gradient(90deg, #00CED1 0%, #20B2AA 100%);
border-radius: 8rpx;
transition: width 0.3s ease;
}
.progress-stats {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 24rpx;
}
.stat-item {
@@ -83,376 +269,236 @@
}
.stat-value {
font-size: 48rpx;
font-size: 36rpx;
font-weight: 700;
color: #ffffff;
margin-bottom: 8rpx;
}
.brand-color {
color: #30D158;
display: block;
}
.stat-label {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.5);
}
.stat-divider {
width: 2rpx;
height: 60rpx;
background: rgba(255, 255, 255, 0.1);
}
/* 作者信息栏 */
.author-bar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 24rpx 32rpx;
margin: 0 32rpx 32rpx;
}
.author-info {
display: flex;
align-items: center;
gap: 20rpx;
}
.author-avatar {
width: 80rpx;
height: 80rpx;
background: rgba(48, 209, 88, 0.2);
color: #30D158;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 36rpx;
font-weight: 700;
}
.author-label {
font-size: 22rpx;
color: rgba(255, 255, 255, 0.4);
margin-bottom: 4rpx;
}
.author-name {
font-size: 28rpx;
color: #ffffff;
font-weight: 600;
/* ===== 区块标题 ===== */
.section {
margin-bottom: 24rpx;
}
.live-info {
text-align: right;
}
.live-label {
font-size: 22rpx;
color: rgba(255, 255, 255, 0.4);
margin-bottom: 4rpx;
}
.live-time {
font-size: 28rpx;
font-weight: 600;
}
/* 主按钮 */
.main-btn {
width: 686rpx;
height: 96rpx;
line-height: 96rpx;
margin: 0 32rpx 16rpx;
font-size: 32rpx;
font-weight: 600;
}
.btn-tip {
text-align: center;
font-size: 22rpx;
color: rgba(255, 255, 255, 0.4);
margin-bottom: 40rpx;
}
/* 寄语卡片 */
.quote-card {
margin: 32rpx;
padding: 40rpx 32rpx;
position: relative;
}
.quote-icon {
font-size: 80rpx;
color: rgba(48, 209, 88, 0.2);
line-height: 1;
margin-bottom: 20rpx;
}
.quote-content {
font-size: 28rpx;
color: rgba(255, 255, 255, 0.8);
line-height: 1.8;
margin-bottom: 32rpx;
}
.quote-footer {
display: flex;
align-items: center;
gap: 20rpx;
}
.footer-avatar {
width: 64rpx;
height: 64rpx;
background: rgba(48, 209, 88, 0.2);
color: #30D158;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
font-weight: 700;
}
.footer-name {
font-size: 26rpx;
color: #ffffff;
font-weight: 600;
margin-bottom: 4rpx;
}
.footer-desc {
font-size: 22rpx;
color: rgba(255, 255, 255, 0.5);
}
/* 三个数据展示 */
.highlights-grid {
display: flex;
justify-content: space-around;
padding: 32rpx;
margin: 0 32rpx 32rpx;
background: rgba(255, 255, 255, 0.03);
border: 1rpx solid rgba(255, 255, 255, 0.1);
border-radius: 24rpx;
}
.highlight-item {
text-align: center;
}
.h-value {
font-size: 48rpx;
font-weight: 700;
color: #30D158;
margin-bottom: 8rpx;
}
.h-label {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.5);
}
/* 章节列表 */
.chapters-section {
margin: 32rpx;
padding: 32rpx;
}
.section-title {
.section-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 24rpx;
}
.title-text {
.section-title {
font-size: 32rpx;
font-weight: 600;
color: #ffffff;
}
.chapter-count {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.5);
.section-more {
display: flex;
align-items: center;
gap: 8rpx;
}
.chapter-list {
.more-text {
font-size: 24rpx;
color: #00CED1;
}
.more-arrow {
font-size: 24rpx;
color: #00CED1;
}
/* ===== 精选推荐列表 ===== */
.featured-list {
display: flex;
flex-direction: column;
gap: 16rpx;
gap: 24rpx;
}
.chapter-item {
.featured-item {
display: flex;
align-items: center;
gap: 20rpx;
padding: 24rpx;
background: rgba(255, 255, 255, 0.03);
border-radius: 16rpx;
transition: all 0.3s ease;
align-items: flex-start;
justify-content: space-between;
padding: 32rpx;
background: #1c1c1e;
border-radius: 24rpx;
border: 2rpx solid rgba(255, 255, 255, 0.05);
}
.chapter-item:active {
background: rgba(255, 255, 255, 0.08);
.featured-item:active {
transform: scale(0.98);
background: #2c2c2e;
}
.chapter-number {
width: 48rpx;
height: 48rpx;
background: rgba(48, 209, 88, 0.2);
color: #30D158;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
font-weight: 600;
flex-shrink: 0;
}
.chapter-info {
.featured-content {
flex: 1;
}
.chapter-title {
font-size: 28rpx;
color: #ffffff;
margin-bottom: 8rpx;
font-weight: 500;
}
.chapter-meta {
.featured-meta {
display: flex;
align-items: center;
gap: 16rpx;
margin-bottom: 16rpx;
}
.featured-id {
font-size: 24rpx;
font-weight: 500;
}
.tag {
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 22rpx;
padding: 6rpx 16rpx;
min-width: 80rpx;
border-radius: 8rpx;
box-sizing: border-box;
text-align: center;
}
.tag-free {
background: rgba(0, 206, 209, 0.1);
color: #00CED1;
}
.tag-pink {
background: rgba(233, 30, 99, 0.1);
color: #E91E63;
}
.tag-purple {
background: rgba(123, 97, 255, 0.1);
color: #7B61FF;
}
.featured-title {
font-size: 28rpx;
color: #ffffff;
font-weight: 500;
display: block;
margin-bottom: 8rpx;
}
.featured-part {
font-size: 22rpx;
color: rgba(255, 255, 255, 0.4);
}
.chapter-arrow {
.featured-arrow {
font-size: 32rpx;
color: rgba(255, 255, 255, 0.3);
margin-top: 8rpx;
}
/* ===== 内容概览列表 ===== */
.parts-list {
display: flex;
flex-direction: column;
gap: 24rpx;
}
.part-item {
display: flex;
align-items: center;
gap: 24rpx;
padding: 32rpx;
background: #1c1c1e;
border-radius: 24rpx;
border: 2rpx solid rgba(255, 255, 255, 0.05);
}
.part-item:active {
transform: scale(0.98);
background: #2c2c2e;
}
.part-icon {
width: 80rpx;
height: 80rpx;
border-radius: 16rpx;
background: linear-gradient(135deg, rgba(0, 206, 209, 0.2) 0%, rgba(32, 178, 170, 0.1) 100%);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.part-number {
font-size: 28rpx;
font-weight: 700;
color: #00CED1;
}
.part-info {
flex: 1;
min-width: 0;
}
.part-title {
font-size: 28rpx;
color: #ffffff;
font-weight: 500;
display: block;
margin-bottom: 4rpx;
}
.part-subtitle {
font-size: 22rpx;
color: rgba(255, 255, 255, 0.4);
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.part-arrow {
font-size: 32rpx;
color: rgba(255, 255, 255, 0.3);
flex-shrink: 0;
}
/* 购买区域 */
.purchase-section {
margin: 32rpx;
padding: 40rpx 32rpx;
text-align: center;
}
.purchase-title {
font-size: 36rpx;
font-weight: 700;
color: #ffffff;
margin-bottom: 16rpx;
}
.purchase-desc {
font-size: 26rpx;
color: rgba(255, 255, 255, 0.6);
margin-bottom: 24rpx;
}
.price-info {
margin-bottom: 32rpx;
}
.price-current {
font-size: 56rpx;
font-weight: 700;
color: #30D158;
}
.price-tip {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.4);
margin-left: 8rpx;
}
.purchase-btn {
width: 100%;
height: 88rpx;
line-height: 88rpx;
font-size: 32rpx;
}
/* 推广横幅 */
.referral-banner {
/* ===== 序言入口 ===== */
.preface-card {
display: flex;
align-items: center;
justify-content: space-between;
padding: 32rpx;
margin: 32rpx;
background: linear-gradient(135deg, rgba(48, 209, 88, 0.1) 0%, rgba(0, 229, 255, 0.1) 100%);
border: 1rpx solid rgba(48, 209, 88, 0.3);
border-radius: 24rpx;
background: linear-gradient(90deg, rgba(0, 206, 209, 0.1) 0%, transparent 100%);
border: 2rpx solid rgba(0, 206, 209, 0.2);
margin-bottom: 24rpx;
}
.referral-content {
.preface-card:active {
opacity: 0.8;
}
.preface-content {
flex: 1;
}
.referral-title {
font-size: 32rpx;
font-weight: 600;
.preface-title {
font-size: 28rpx;
color: #ffffff;
font-weight: 500;
display: block;
margin-bottom: 8rpx;
}
.referral-desc {
.preface-desc {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.6);
}
.referral-icon {
font-size: 64rpx;
}
/* 通用卡片样式 */
.card {
background: rgba(255, 255, 255, 0.03);
border: 1rpx solid rgba(255, 255, 255, 0.1);
border-radius: 24rpx;
backdrop-filter: blur(20rpx);
}
/* 底部留白 */
/* ===== 底部留白 ===== */
.bottom-space {
height: 40rpx;
}
/* 动画 */
.page-transition {
animation: fadeIn 0.3s ease-in-out;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20rpx);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* 按钮样式 */
.btn-primary {
background: linear-gradient(135deg, #30D158 0%, #00E5FF 100%);
color: #ffffff;
border: none;
border-radius: 48rpx;
font-weight: 600;
box-shadow: 0 8rpx 24rpx rgba(48, 209, 88, 0.3);
}
.btn-primary:active {
opacity: 0.8;
transform: scale(0.98);
}