From 6f0764eaee6b398e96119a4f52259c29e19c55fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com>
Date: Thu, 26 Feb 2026 17:53:56 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/plugins/video/index/index.vue | 39 ++++++++++++++++-------------
1 file changed, 21 insertions(+), 18 deletions(-)
diff --git a/pages/plugins/video/index/index.vue b/pages/plugins/video/index/index.vue
index 8095c213..268242bf 100644
--- a/pages/plugins/video/index/index.vue
+++ b/pages/plugins/video/index/index.vue
@@ -16,24 +16,24 @@
-
-
-
-
-
-
-
-
-
-
-
- {{ item.name }}
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
@@ -250,9 +250,12 @@ export default {
}
/* 导航栏 */
.nav-tabs {
- position: relative;
+ position: sticky;
+ top: 110rpx;
width: 100%;
padding: 0 16rpx 20rpx 16rpx;
+ background: #fff;
+ z-index: 9;
.tabs-scroll-content {
display: flex;
align-items: center;
From 8e7ff3844384d73d3ccfaa633c2f428d1ef66f43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com>
Date: Thu, 26 Feb 2026 17:57:34 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/plugins/video/detail/detail.vue | 14 --------------
pages/plugins/video/index/index.vue | 22 +++++++++++++++++++---
2 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/pages/plugins/video/detail/detail.vue b/pages/plugins/video/detail/detail.vue
index bf7d6d1d..73da7b4d 100644
--- a/pages/plugins/video/detail/detail.vue
+++ b/pages/plugins/video/detail/detail.vue
@@ -542,14 +542,6 @@
this.update_display_data();
setTimeout(() => {
- //#ifdef H5
- // 更新页面标题
- const current_video = this.video_data_list.find(item => item.id == id);
- if (current_video && current_video.title) {
- document.title = current_video.title;
- }
- //#endif
-
// // 更新分享信息
this.update_share_info(this.display_video_list[this.current_index]);
@@ -628,12 +620,6 @@
// 替换URL路径,保持查询参数不变
const pathname = location.href.split('?')[0];
history.replaceState(null, '', pathname + url.search);
-
- // 更新页面标题
- const current_video = this.video_data_list.find(item => item.id == id);
- if (current_video && current_video.title) {
- document.title = current_video.title;
- }
//#endif
const index = this.video_data_list.findIndex(item => item.id == id);
diff --git a/pages/plugins/video/index/index.vue b/pages/plugins/video/index/index.vue
index 268242bf..19f08d35 100644
--- a/pages/plugins/video/index/index.vue
+++ b/pages/plugins/video/index/index.vue
@@ -1,7 +1,7 @@
-
+
-
+
@@ -109,6 +109,8 @@ export default {
menu_button_info: '',
header_padding_left: '',
slider_list: [],
+ is_nav_sticky: false, // 控制nav-tabs是否处于粘性状态
+ nav_sticky_threshold: 50 // 粘性阈值,与CSS中的top值对应
};
},
onShow() {
@@ -237,6 +239,14 @@ export default {
handle_back() {
app.globalData.page_back_prev_event();
},
+ // 滚动事件处理
+ on_scroll_event(e) {
+ const scrollTop = e.detail.scrollTop;
+ // 当滚动距离大于等于阈值时,设置nav-tabs为粘性状态(背景变白)
+ this.setData({
+ is_nav_sticky: scrollTop >= this.nav_sticky_threshold
+ });
+ }
}
};
@@ -254,8 +264,14 @@ export default {
top: 110rpx;
width: 100%;
padding: 0 16rpx 20rpx 16rpx;
- background: #fff;
z-index: 9;
+ background: transparent; // 默认透明背景
+ transition: background-color 0.3s ease; // 添加背景色过渡动画
+
+ &.nav-tabs-sticky {
+ background: #fff; // 粘性状态时背景变白
+ }
+
.tabs-scroll-content {
display: flex;
align-items: center;
From 8d04560f599cc51a56a9c7f8476c8db69192bdc7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com>
Date: Thu, 26 Feb 2026 17:58:24 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0tabs=E4=BF=A1=E6=81=AF?=
=?UTF-8?q?=E6=9B=B4=E5=9D=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/plugins/video/detail/detail.vue | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/pages/plugins/video/detail/detail.vue b/pages/plugins/video/detail/detail.vue
index 73da7b4d..d78d0419 100644
--- a/pages/plugins/video/detail/detail.vue
+++ b/pages/plugins/video/detail/detail.vue
@@ -542,7 +542,15 @@
this.update_display_data();
setTimeout(() => {
- // // 更新分享信息
+ //#ifdef H5
+ // 更新页面标题
+ const current_video = this.video_data_list.find(item => item.id == id);
+ if (current_video && current_video.title) {
+ document.title = current_video.title;
+ }
+ //#endif
+
+ // 更新分享信息
this.update_share_info(this.display_video_list[this.current_index]);
this.display_video_list.forEach((item, index) => {