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,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);
}