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,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>
<!-- 底部留白 -->