From 46f94a9c810dba272b5bde82a40b28f717d37eb4 Mon Sep 17 00:00:00 2001
From: Alex-larget <33240357+Alex-larget@users.noreply.github.com>
Date: Wed, 18 Mar 2026 12:56:34 +0800
Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E5=A4=9A=E4=B8=AA=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E4=B8=AD=E9=80=9A=E8=BF=87=E9=AA=A8=E6=9E=B6=E5=B1=8F=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E5=8A=A0=E8=BD=BD=E7=8A=B6=E6=80=81=E3=80=82=20?=
=?UTF-8?q?=E5=9C=A8=E7=AB=A0=E8=8A=82=E3=80=81=E7=A4=BC=E7=89=A9=E4=BB=A3?=
=?UTF-8?q?=E4=BB=98=E8=AF=A6=E6=83=85=E3=80=81=E9=98=85=E8=AF=BB=E5=92=8C?=
=?UTF-8?q?=E6=90=9C=E7=B4=A2=E7=BB=93=E6=9E=9C=E9=A1=B5=E9=9D=A2=EF=BC=8C?=
=?UTF-8?q?=E7=94=A8=E9=AA=A8=E6=9E=B6=E5=B1=8F=E6=9B=BF=E6=8D=A2=E4=BC=A0?=
=?UTF-8?q?=E7=BB=9F=E5=8A=A0=E8=BD=BD=E6=8C=87=E7=A4=BA=E5=99=A8=EF=BC=8C?=
=?UTF-8?q?=E4=BB=A5=E6=8F=90=E5=8D=87=E6=95=B0=E6=8D=AE=E8=8E=B7=E5=8F=96?=
=?UTF-8?q?=E8=BF=87=E7=A8=8B=E4=B8=AD=E7=9A=84=E7=94=A8=E6=88=B7=E4=BD=93?=
=?UTF-8?q?=E9=AA=8C=E3=80=82=20=E6=9B=B4=E6=96=B0=E9=AA=A8=E6=9E=B6?=
=?UTF-8?q?=E5=B1=8F=E6=A0=B7=E5=BC=8F=EF=BC=8C=E4=BD=BF=E5=8A=A0=E8=BD=BD?=
=?UTF-8?q?=E7=8A=B6=E6=80=81=E6=9B=B4=E5=8A=A0=E7=BE=8E=E8=A7=82=E3=80=82?=
=?UTF-8?q?=20=E5=AE=9E=E7=8E=B0=E7=AB=A0=E8=8A=82=E5=92=8C=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE=E4=BF=A1=E6=81=AF=E7=9A=84=E7=BC=93=E5=AD=98=E7=AD=96?=
=?UTF-8?q?=E7=95=A5=EF=BC=8C=E4=BB=A5=E4=BC=98=E5=8C=96=E6=80=A7=E8=83=BD?=
=?UTF-8?q?=E5=B9=B6=E5=87=8F=E5=B0=91=E5=86=B7=E5=90=AF=E5=8A=A8=E9=97=AE?=
=?UTF-8?q?=E9=A2=98=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
miniprogram/pages/chapters/chapters.wxml | 19 +-
miniprogram/pages/chapters/chapters.wxss | 81 ++++--
miniprogram/pages/gift-pay/detail.wxml | 17 +-
miniprogram/pages/gift-pay/detail.wxss | 103 ++++++--
miniprogram/pages/index/index.wxml | 13 -
miniprogram/pages/match/match.wxml | 4 +-
miniprogram/pages/match/match.wxss | 12 +-
miniprogram/pages/read/read.wxml | 31 ++-
miniprogram/pages/read/read.wxss | 47 +++-
miniprogram/pages/search/search.wxml | 13 +-
miniprogram/pages/search/search.wxss | 59 +++--
scripts/test/miniapp/README.md | 12 +
.../miniapp/test_article_preview_speed.py | 234 ++++++++++++++++++
soul-api/cmd/server/main.go | 4 +-
soul-api/go.mod | 38 +--
soul-api/go.sum | 42 ++++
soul-api/internal/cache/cache.go | 61 ++++-
soul-api/internal/handler/admin_chapters.go | 1 +
soul-api/internal/handler/book.go | 118 ++++++++-
soul-api/internal/handler/db.go | 28 ++-
soul-api/internal/handler/db_book.go | 8 +
soul-api/internal/router/router.go | 2 +
...试报告-文章阅读与界面预览响应速度-20260318.md | 32 +++
23 files changed, 841 insertions(+), 138 deletions(-)
create mode 100644 scripts/test/miniapp/test_article_preview_speed.py
create mode 100644 开发文档/测试报告-文章阅读与界面预览响应速度-20260318.md
diff --git a/miniprogram/pages/chapters/chapters.wxml b/miniprogram/pages/chapters/chapters.wxml
index 1f2c9eba..5d584051 100644
--- a/miniprogram/pages/chapters/chapters.wxml
+++ b/miniprogram/pages/chapters/chapters.wxml
@@ -17,10 +17,21 @@
-
-
-
- 加载目录中...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/miniprogram/pages/chapters/chapters.wxss b/miniprogram/pages/chapters/chapters.wxss
index 7fa6b02d..c7e3f11f 100644
--- a/miniprogram/pages/chapters/chapters.wxss
+++ b/miniprogram/pages/chapters/chapters.wxss
@@ -75,32 +75,75 @@
width: 100%;
}
-/* ===== 目录加载中 ===== */
-.parts-loading {
+/* ===== 目录骨架屏 ===== */
+.parts-skeleton {
+ padding: 32rpx;
+}
+
+.skeleton-book-card {
+ display: flex;
+ align-items: center;
+ gap: 24rpx;
+ padding: 32rpx;
+ background: linear-gradient(135deg, #1c1c1e 0%, #2c2c2e 100%);
+ border-radius: 32rpx;
+ margin-bottom: 32rpx;
+}
+
+.skeleton-book-icon {
+ width: 96rpx;
+ height: 96rpx;
+ border-radius: 24rpx;
+ background: linear-gradient(90deg, #1c1c1e 25%, #2c2c2e 50%, #1c1c1e 75%);
+ background-size: 200% 100%;
+ animation: skeleton-shimmer 1.5s ease-in-out infinite;
+ flex-shrink: 0;
+}
+
+.skeleton-book-info {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ gap: 16rpx;
+}
+
+.skeleton-line {
+ height: 32rpx;
+ background: linear-gradient(90deg, #1c1c1e 25%, #2c2c2e 50%, #1c1c1e 75%);
+ background-size: 200% 100%;
+ animation: skeleton-shimmer 1.5s ease-in-out infinite;
+ border-radius: 8rpx;
+}
+
+.skeleton-title { width: 70%; }
+.skeleton-subtitle { width: 50%; }
+
+.skeleton-count {
+ width: 80rpx;
+ height: 64rpx;
+ background: linear-gradient(90deg, #1c1c1e 25%, #2c2c2e 50%, #1c1c1e 75%);
+ background-size: 200% 100%;
+ animation: skeleton-shimmer 1.5s ease-in-out infinite;
+ border-radius: 16rpx;
+}
+
+.skeleton-part-list {
display: flex;
flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 120rpx 0;
gap: 24rpx;
}
-.parts-loading-spinner {
- width: 64rpx;
- height: 64rpx;
- border: 6rpx solid rgba(255, 255, 255, 0.1);
- border-top-color: #00CED1;
- border-radius: 50%;
- animation: parts-spin 0.8s linear infinite;
+.skeleton-part-item .skeleton-part-header {
+ height: 100rpx;
+ background: linear-gradient(90deg, #1c1c1e 25%, #2c2c2e 50%, #1c1c1e 75%);
+ background-size: 200% 100%;
+ animation: skeleton-shimmer 1.5s ease-in-out infinite;
+ border-radius: 16rpx;
}
-.parts-loading-text {
- font-size: 28rpx;
- color: rgba(255, 255, 255, 0.5);
-}
-
-@keyframes parts-spin {
- to { transform: rotate(360deg); }
+@keyframes skeleton-shimmer {
+ 0% { background-position: 200% 0; }
+ 100% { background-position: -200% 0; }
}
/* ===== 书籍信息卡 ===== */
diff --git a/miniprogram/pages/gift-pay/detail.wxml b/miniprogram/pages/gift-pay/detail.wxml
index 02dcce2a..244559b7 100644
--- a/miniprogram/pages/gift-pay/detail.wxml
+++ b/miniprogram/pages/gift-pay/detail.wxml
@@ -14,9 +14,20 @@
-
-
- 加载中...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/miniprogram/pages/gift-pay/detail.wxss b/miniprogram/pages/gift-pay/detail.wxss
index 7134086b..9ce4aa5c 100644
--- a/miniprogram/pages/gift-pay/detail.wxss
+++ b/miniprogram/pages/gift-pay/detail.wxss
@@ -56,32 +56,97 @@
padding: 24rpx 24rpx 200rpx;
}
-/* 加载 */
-.loading-box {
+/* 骨架屏 */
+.skeleton-wrap {
+ padding: 24rpx 0;
+}
+
+.skeleton-hero {
+ background: rgba(24, 24, 27, 0.8);
+ border-radius: 32rpx;
+ padding: 40rpx;
+ margin-bottom: 32rpx;
+}
+
+.skeleton-hero-badge {
+ width: 120rpx;
+ height: 40rpx;
+ background: linear-gradient(90deg, #1c1c1e 25%, #2c2c2e 50%, #1c1c1e 75%);
+ background-size: 200% 100%;
+ animation: skeleton-shimmer 1.5s ease-in-out infinite;
+ border-radius: 8rpx;
+ margin-bottom: 24rpx;
+}
+
+.skeleton-hero-title {
+ width: 80%;
+ height: 48rpx;
+ background: linear-gradient(90deg, #1c1c1e 25%, #2c2c2e 50%, #1c1c1e 75%);
+ background-size: 200% 100%;
+ animation: skeleton-shimmer 1.5s ease-in-out infinite;
+ border-radius: 8rpx;
+ margin-bottom: 16rpx;
+}
+
+.skeleton-hero-desc {
+ width: 60%;
+ height: 32rpx;
+ background: linear-gradient(90deg, #1c1c1e 25%, #2c2c2e 50%, #1c1c1e 75%);
+ background-size: 200% 100%;
+ animation: skeleton-shimmer 1.5s ease-in-out infinite;
+ border-radius: 8rpx;
+ margin-bottom: 32rpx;
+}
+
+.skeleton-hero-amount {
+ width: 200rpx;
+ height: 64rpx;
+ background: linear-gradient(90deg, #1c1c1e 25%, #2c2c2e 50%, #1c1c1e 75%);
+ background-size: 200% 100%;
+ animation: skeleton-shimmer 1.5s ease-in-out infinite;
+ border-radius: 12rpx;
+}
+
+.skeleton-card {
+ display: flex;
+ align-items: center;
+ gap: 24rpx;
+ padding: 32rpx;
+ background: rgba(24, 24, 27, 0.6);
+ border-radius: 24rpx;
+}
+
+.skeleton-avatar {
+ width: 96rpx;
+ height: 96rpx;
+ border-radius: 50%;
+ background: linear-gradient(90deg, #1c1c1e 25%, #2c2c2e 50%, #1c1c1e 75%);
+ background-size: 200% 100%;
+ animation: skeleton-shimmer 1.5s ease-in-out infinite;
+ flex-shrink: 0;
+}
+
+.skeleton-info {
+ flex: 1;
display: flex;
flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 120rpx 0;
+ gap: 16rpx;
}
-.loading-spinner {
- width: 48rpx;
- height: 48rpx;
- border: 4rpx solid rgba(20, 184, 166, 0.2);
- border-top-color: #14b8a6;
- border-radius: 50%;
- animation: spin 0.8s linear infinite;
+.skeleton-info .skeleton-line {
+ height: 32rpx;
+ background: linear-gradient(90deg, #1c1c1e 25%, #2c2c2e 50%, #1c1c1e 75%);
+ background-size: 200% 100%;
+ animation: skeleton-shimmer 1.5s ease-in-out infinite;
+ border-radius: 8rpx;
}
-@keyframes spin {
- to { transform: rotate(360deg); }
-}
+.skeleton-info .skeleton-line { width: 70%; }
+.skeleton-info .skeleton-line.short { width: 45%; }
-.loading-text {
- margin-top: 24rpx;
- font-size: 28rpx;
- color: rgba(255, 255, 255, 0.45);
+@keyframes skeleton-shimmer {
+ 0% { background-position: 200% 0; }
+ 100% { background-position: -200% 0; }
}
/* 产品 Hero 卡片 */
diff --git a/miniprogram/pages/index/index.wxml b/miniprogram/pages/index/index.wxml
index 39f037f5..13001d69 100644
--- a/miniprogram/pages/index/index.wxml
+++ b/miniprogram/pages/index/index.wxml
@@ -52,19 +52,6 @@
开始阅读→
-
-
-
-
-
-
-
-
-
-