From d45aadfeb2b5a7b8f9f2ef94be42461cc1622fbe Mon Sep 17 00:00:00 2001 From: WangXiaoDong <1627315083@qq.com> Date: Wed, 22 May 2024 23:13:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=A4=E6=96=ADipad?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tool/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tool/util.js b/src/tool/util.js index 3eacdc46..876aa2c9 100644 --- a/src/tool/util.js +++ b/src/tool/util.js @@ -149,7 +149,7 @@ const formatTime = (timestamp, fmt) => {//吧时间戳转为YYYY-MM-DD hh:mm:ss const isMoible = () => {//判断是否是移动端 let is_mobile = navigator.userAgent.toLowerCase().match(/(ipad|ipod|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null; // alert(navigator.userAgent.toLowerCase()) - var isiPad = (navigator.maxTouchPoints && navigator.maxTouchPoints > 0); + var isiPad = (navigator.maxTouchPoints && navigator.maxTouchPoints > 1); // if (is_mobile) { // return true//判断是否在正则内 // } else if(window.matchMedia("(pointer:fine)").matches){ @@ -160,7 +160,7 @@ const isMoible = () => {//判断是否是移动端 if (is_mobile) { return true//判断是否在正则内 } else{ - isiPad//判断触摸点 + return isiPad//判断触摸点 } }