From b34e3863c286903c2670de57d9edaa6d88b850ca Mon Sep 17 00:00:00 2001 From: Default User Date: Mon, 12 Jan 2026 17:30:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A7=86=E9=A2=91=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E6=97=B6=E6=97=A0=E6=B3=95=E6=BB=91=E5=8A=A8=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/supply.html b/supply.html index 0ad5348..6ef5243 100644 --- a/supply.html +++ b/supply.html @@ -6480,6 +6480,12 @@ previewImage.addEventListener('touchmove', handleTouchMove, { passive: false }); previewImage.addEventListener('touchend', handleTouchEnd); + // 为视频元素也添加触摸事件支持 + const previewVideo = document.getElementById('previewVideo'); + previewVideo.addEventListener('touchstart', handleTouchStart, { passive: false }); + previewVideo.addEventListener('touchmove', handleTouchMove, { passive: false }); + previewVideo.addEventListener('touchend', handleTouchEnd); + // 点击背景关闭预览 previewModal.addEventListener('click', function(e) { if (e.target === previewModal) { @@ -6631,9 +6637,9 @@ const swipeDistanceY = swipeEndY - swipeStartY; // 判断是否为有效滑动(水平滑动,距离足够,时间不太长) - const isHorizontalSwipe = Math.abs(swipeDistanceX) > Math.abs(swipeDistanceY) * 2; - const isSignificantSwipe = Math.abs(swipeDistanceX) > 50; - const isQuickSwipe = duration < 500; + const isHorizontalSwipe = Math.abs(swipeDistanceX) > Math.abs(swipeDistanceY) * 1.5; + const isSignificantSwipe = Math.abs(swipeDistanceX) > 30; // 降低滑动距离阈值,从50px改为30px + const isQuickSwipe = duration < 1000; // 放宽滑动时间限制,从500ms改为1000ms if (isHorizontalSwipe && isSignificantSwipe && isQuickSwipe) { if (swipeDistanceX > 0) {