From 36c3126b97d518f6910c6cc09298a90948c116c4 Mon Sep 17 00:00:00 2001 From: libai <libai@yazhai.co> Date: Wed, 16 Nov 2022 19:08:23 +0800 Subject: [PATCH] 测试 --- mTest/room/css/liveRoom.css | 7 +++++++ mTest/room/css/liveRoom.less | 7 +++++++ mTest/room/liveRoom.html | 10 ++++++---- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/mTest/room/css/liveRoom.css b/mTest/room/css/liveRoom.css index b87e758..c946aee 100644 --- a/mTest/room/css/liveRoom.css +++ b/mTest/room/css/liveRoom.css @@ -742,6 +742,13 @@ .video-box video { min-width: 100%; } +.touch-box { + position: fixed; + z-index: 1000; + width: 10rem; + left: 0; + top: 50%; +} .room-bg { width: 100vw; position: fixed; diff --git a/mTest/room/css/liveRoom.less b/mTest/room/css/liveRoom.less index 05fe86d..97f5af3 100644 --- a/mTest/room/css/liveRoom.less +++ b/mTest/room/css/liveRoom.less @@ -765,6 +765,13 @@ min-width: 100%; } } +.touch-box{ + position: fixed; + z-index: 1000; + width: 10rem; + left: 0; + top: 50%; +} .room-bg{ width: 100vw; position: fixed; diff --git a/mTest/room/liveRoom.html b/mTest/room/liveRoom.html index ec47583..d2ada0c 100644 --- a/mTest/room/liveRoom.html +++ b/mTest/room/liveRoom.html @@ -116,7 +116,7 @@ </div> </div> </div> - + <div class="touch-box"></div> <div class="room-bg"> <div style="display: none;" class="mc-out-box"> <img class="room-close" src="images/close.png" alt=""> @@ -563,6 +563,8 @@ <script> $(function(){ var dHeight=$(document).height() + $(".touch-box").css("height",dHeight/2+"px") + $(".touch-box").css("margin-top",-dHeight/4+"px") var topRoomId var BottomRoomId localStorage.canvasCode="phone" @@ -2110,14 +2112,14 @@ $(function(){ var topMoveNumBottom=0 var touchOk=true; //登录相关 - $("body").on("touchstart",function(e){ + $(".touch-box").on("touchstart",function(e){ if(touchOk==false)return; startX=e.changedTouches[0].clientX startY=e.changedTouches[0].clientY zwidth=0 }) - $("body").on("touchmove",function(e){ + $(".touch-box").on("touchmove",function(e){ if(touchOk==false)return; if(touchX==null){ touchX=e.changedTouches[0].clientX @@ -2177,7 +2179,7 @@ $(function(){ } }) - $("body").on("touchend",function(e){ + $(".touch-box").on("touchend",function(e){ if(touchOk==false)return; // goX=e.changedTouches[0].clientX-startX // goY=e.changedTouches[0].clientY-startY -- libgit2 0.25.0