From c490676d8f246e32b20eb5efd1a6d409d9914652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Wed, 20 May 2026 15:04:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=86=85=E5=AE=B9=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=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/detail/scrollMixins.js | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/pages/plugins/video/detail/detail.vue b/pages/plugins/video/detail/detail.vue index 623ca24b..a0d87234 100644 --- a/pages/plugins/video/detail/detail.vue +++ b/pages/plugins/video/detail/detail.vue @@ -859,6 +859,20 @@ handle_swiper_touch_end(e) { try { const move_distance = this.swiper_current_y - this.swiper_start_y; + + // 如果滑动距离小于10px,不触发切换提示 + if (Math.abs(move_distance) < 10) { + // 清理节流定时器 + if (this.swiper_move_throttle_timer) { + clearTimeout(this.swiper_move_throttle_timer); + this.swiper_move_throttle_timer = null; + } + // 重置拖拽状态 + this.swiper_start_y = 0; + this.swiper_current_y = 0; + return; + } + // 只有滑动距离超过屏幕高度的 15% 才触发切换 if (move_distance > 0) { // 向下滑动,切换到上一个 diff --git a/pages/plugins/video/detail/scrollMixins.js b/pages/plugins/video/detail/scrollMixins.js index 0035a579..27ad804d 100644 --- a/pages/plugins/video/detail/scrollMixins.js +++ b/pages/plugins/video/detail/scrollMixins.js @@ -112,8 +112,14 @@ export default { if(e.state === 'end') { this.touchType = null - //上下 + //上下滑动判断 - 添加最小滑动距离判断(小于10px不计入) if(move==0&& this.distanceX==0&& Math.abs(e.deltaY)>this.startDistance){ + // 如果滑动距离小于10px,不触发切换 + if(Math.abs(e.deltaY) < 10) { + this.play_current_video_safely(this.index); + return; + } + let newTime = new Date() let quickMove = newTime.getTime() - this.oldTime.getTime() <= this.minTime ? true:false @@ -132,7 +138,14 @@ export default { this.bindTiming(distance,e.deltaY,quickMove) } + //左右滑动判断 - 添加最小滑动距离判断(小于10px不计入) if(move!=0&& move*this.distanceX<=0&& e.deltaX*this.distanceX<=0&& Math.abs(e.deltaX)>this.startDistance){ + // 如果滑动距离小于10px,不触发切换 + if(Math.abs(e.deltaX) < 10) { + this.play_current_video_safely(this.index); + return; + } + const distance = this.distanceX + e.deltaX this.bindTimingX(distance,e.deltaX)