From ed8da100e4aba16274b8153993c6c27d0301a090 Mon Sep 17 00:00:00 2001 From: hflllll Date: Thu, 9 Oct 2025 18:49:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96H5=E9=80=82=E9=85=8D?= =?UTF-8?q?=E5=92=8C=E9=A1=B5=E9=9D=A2=E5=B8=83=E5=B1=80=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E8=A7=86=E9=A2=91=E5=8A=A0=E8=BD=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为H5平台添加条件编译,优化导航栏和页面布局 - 修复视频加载状态处理和错误提示 - 调整会员中心权益展示方式为动态渲染 - 优化书籍页面滚动体验和图片视频显示 - 统一页面标题和导航栏样式 --- pages.json | 71 ++++++++++-- pages/components/SplashScreen.vue | 21 ++-- pages/index/desk.vue | 2 - pages/index/member.vue | 38 +++++-- pages/index/user.vue | 7 ++ subPages/home/book.vue | 228 +++++++++++++++++++++++++------------- subPages/home/directory.vue | 20 ++-- subPages/member/recharge.vue | 33 +++--- utils/share.js | 3 +- 9 files changed, 287 insertions(+), 136 deletions(-) diff --git a/pages.json b/pages.json index d4d0571..215cbc5 100644 --- a/pages.json +++ b/pages.json @@ -3,12 +3,17 @@ { "path": "pages/index/home", "style": { - "navigationStyle": "custom" + "navigationStyle": "custom", + "navigationBarTitleText": "主页" } }, { "path": "pages/index/desk", "style": { + // #ifdef H5 + "navigationStyle": "custom", + // #endif + "navigationBarTitleText": "书桌", "enablePullDownRefresh": true } @@ -17,14 +22,17 @@ "path": "pages/index/member", "style": { "navigationStyle": "custom", - "enablePullDownRefresh": true + "enablePullDownRefresh": true, + "navigationBarTitleText": "会员中心" + } }, { "path": "pages/index/user", "style": { "navigationStyle": "custom", - "enablePullDownRefresh": true + "enablePullDownRefresh": true, + "navigationBarTitleText": "用户中心" } } ], @@ -35,18 +43,23 @@ { "path": "login/login", "style": { - "navigationStyle": "custom" + "navigationStyle": "custom", + "navigationBarTitleText": "登录" } }, { "path": "login/userInfo", "style": { - "navigationStyle": "custom" + "navigationStyle": "custom", + "navigationBarTitleText": "用户信息" } }, { "path": "home/plan", "style": { + // #ifdef H5 + "navigationStyle": "custom", + // #endif "navigationBarTitleText": "个人语境方案定制", "navigationBarTextStyle": "white", "navigationBarBackgroundColor": "#06DADC" @@ -55,44 +68,68 @@ { "path": "home/search", "style": { + // #ifdef H5 + "navigationStyle": "custom", + // #endif "navigationBarTitleText": "搜索" } }, { "path": "home/submit", "style": { + // #ifdef H5 + "navigationStyle": "custom", + // #endif "navigationBarTitleText": "报名个人语境定制" } }, { "path": "home/directory", "style": { - "navigationBarTitleText": "", + // #ifndef H5 + "navigationBarTitleText": "目录", "navigationBarBackgroundColor": "#264C8F", - "navigationBarTextStyle": "white" + "navigationBarTextStyle": "white", + // #endif + // #ifdef H5 + "navigationStyle": "custom", + "navigationBarTitleText": "目录" + // #endif } }, { "path": "user/introduce", "style": { + // #ifdef H5 + "navigationStyle": "custom", + // #endif "navigationBarTitleText": "产品介绍" } }, { "path": "user/policy", "style": { + // #ifdef H5 + "navigationStyle": "custom", + // #endif "navigationBarTitleText": "服务协议与隐私政策" } }, { "path": "user/profile", "style": { + // #ifdef H5 + "navigationStyle": "custom", + // #endif "navigationBarTitleText": "资料修改" } }, { "path": "user/discount", "style": { + // #ifdef H5 + "navigationStyle": "custom", + // #endif "navigationBarTitleText": "我的优惠券" } }, @@ -105,36 +142,50 @@ { "path": "user/team", "style": { + // #ifdef H5 + "navigationStyle": "custom", + // #endif "navigationBarTitleText": "我的团队" } }, { "path": "user/cash", "style": { + // #ifdef H5 + "navigationStyle": "custom", + // #endif "navigationBarTitleText": "提现" } }, { "path": "member/recharge", "style": { - "navigationStyle": "custom" + "navigationStyle": "custom", + "navigationBarTitleText": "充值" } }, { "path": "home/book", "style": { - "navigationStyle": "custom" + "navigationStyle": "custom", + "navigationBarTitleText": "书籍" } }, { "path": "home/music", "style": { + // #ifdef H5 + "navigationStyle": "custom", + // #endif "navigationBarTitleText": "音乐切换" } }, { "path": "user/share", "style": { + // #ifdef H5 + "navigationStyle": "custom", + // #endif "navigationBarTitleText": "分享" } } @@ -149,7 +200,7 @@ } }, "globalStyle": { - "navigationBarTitleText": "uni-app", + "navigationBarTitleText": "四零语境", "navigationBarBackgroundColor": "#fff", "navigationBarTextStyle": "black" }, diff --git a/pages/components/SplashScreen.vue b/pages/components/SplashScreen.vue index 8cae4f6..3e123d7 100644 --- a/pages/components/SplashScreen.vue +++ b/pages/components/SplashScreen.vue @@ -180,7 +180,7 @@ export default { .splash-content { flex: 1; width: 100%; - height: 100%; + height: 80%; overflow: hidden; // 富文本樣式 @@ -197,7 +197,7 @@ export default { .skip-button { position: absolute; - top: 100rpx; + top: 40rpx; left: 40rpx; background-color: #0000004D; @@ -217,13 +217,16 @@ export default { // 文字容器定位到左下角 .text-container { - position: absolute; - bottom: 80rpx; - left: 40rpx; - z-index: 10001; + // position: absolute; + // bottom: 80rpx; + // left: 40rpx; + // z-index: 10001; + height: 20%; + width: 100%; + padding: 20rpx; display: flex; flex-direction: column; - gap: 8rpx; + gap: 30rpx; } // 英文文字样式 @@ -233,7 +236,7 @@ export default { font-size: 32rpx; // 16px转换为rpx line-height: 48rpx; // 24px转换为rpx letter-spacing: 0; - color: #FFFFFF; + color: black; background: transparent; } @@ -244,7 +247,7 @@ export default { font-size: 32rpx; // 16px转换为rpx line-height: 48rpx; // 24px转换为rpx letter-spacing: 0; - color: #FFFFFF; + color: black; background: transparent; } diff --git a/pages/index/desk.vue b/pages/index/desk.vue index a1810a8..387b78b 100644 --- a/pages/index/desk.vue +++ b/pages/index/desk.vue @@ -1,7 +1,5 @@