From b18cf8c47ade2944266dd54e52bc8a6629376bcb Mon Sep 17 00:00:00 2001 From: zlong <953829746@qq.com> Date: Mon, 18 Nov 2024 22:18:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=BF=81=E7=A7=BB=E5=88=B0=E5=85=BB?= =?UTF-8?q?=E5=AE=A0=E6=89=8B=E5=86=8C=EF=BC=8Cutils=E5=B0=86class?= =?UTF-8?q?=E7=B1=BB=E8=BD=AC=E6=8D=A2=E6=88=90=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/feed-plan/index.vue | 183 +-------------------------------- src/pages/pet-manual/index.vue | 183 ++++++++++++++++++++++++++++++++- src/utils/index.ts | 16 +-- 3 files changed, 191 insertions(+), 191 deletions(-) diff --git a/src/pages/feed-plan/index.vue b/src/pages/feed-plan/index.vue index 1798e87..df3fdfc 100644 --- a/src/pages/feed-plan/index.vue +++ b/src/pages/feed-plan/index.vue @@ -1,189 +1,10 @@ diff --git a/src/pages/pet-manual/index.vue b/src/pages/pet-manual/index.vue index 46a737e..bfce416 100644 --- a/src/pages/pet-manual/index.vue +++ b/src/pages/pet-manual/index.vue @@ -1,10 +1,189 @@ diff --git a/src/utils/index.ts b/src/utils/index.ts index 9e46897..ffc6194 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,10 +1,10 @@ -class ToolFun { - static getSafeHeight(): number { - const systemInfo: UniApp.GetSystemInfoResult = uni.getSystemInfoSync() - const safeAreaInsetBottom: number = systemInfo.safeAreaInsets.bottom + systemInfo.safeAreaInsets.top - const menuButtonInfoHeight: number = uni.getMenuButtonBoundingClientRect().height + 60 - return safeAreaInsetBottom + menuButtonInfoHeight - } +function getSafeHeight(): number { + const systemInfo: UniApp.GetSystemInfoResult = uni.getSystemInfoSync() + const safeAreaInsetBottom: number = systemInfo.safeAreaInsets.bottom + systemInfo.safeAreaInsets.top + const menuButtonInfoHeight: number = uni.getMenuButtonBoundingClientRect().height + 60 + return safeAreaInsetBottom + menuButtonInfoHeight } -export default ToolFun +export { + getSafeHeight +}