From d06d1c177c7397d57ef08952ca96aa398c8ca5dc Mon Sep 17 00:00:00 2001 From: kuaifan Date: Thu, 14 Dec 2023 15:18:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=83=A8=E5=88=86pad=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E6=A8=AA=E7=89=88=E5=92=8C=E7=AB=96=E5=B1=8F=E5=8F=8D=E8=BF=87?= =?UTF-8?q?=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/functions/common.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/assets/js/functions/common.js b/resources/assets/js/functions/common.js index 37f88a573..a169e68d7 100755 --- a/resources/assets/js/functions/common.js +++ b/resources/assets/js/functions/common.js @@ -552,14 +552,14 @@ const localforage = require("localforage"); * @returns {string} */ screenOrientation() { - try { + /*try { if (typeof window.screen.orientation === "object") { return $A.strExists(window.screen.orientation.type, 'portrait') ? 'portrait' : 'landscape' } } catch (e) { // - } - return $A(window).width() > $A(window).height() ? "landscape" : "portrait" + }*/ // 注释原因:有些设备宽和高对调了 + return $A(window).width() - $A(window).height() > 50 ? "landscape" : "portrait" }, /**