From ce8cb31b5b6478c6575bcbbed088c29447259135 Mon Sep 17 00:00:00 2001 From: admin <> Date: Thu, 9 May 2024 10:45:07 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E4=BF=AE=E5=A4=8Dandroid=20pina?= =?UTF-8?q?=E5=BC=95=E7=94=A8=E9=97=AE=E9=A2=98=20h5=20app-plus=20?= =?UTF-8?q?=E4=B8=8D=E6=94=AF=E6=8C=81getMenuButtonBoundingClientRect?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/PagesStatistics/index.vue | 3 ++- src/components/Box/index.vue | 2 +- src/components/NavBar/NavBar.vue | 2 +- src/components/NavBar/NavBarLayout.vue | 2 +- src/components/PageView/index.vue | 2 +- src/pagesHome/index.vue | 6 ++++-- src/pagesLogin/login/index.vue | 4 +++- src/pagesLogin/profile/baseinfo.vue | 4 +++- src/pagesLogin/profile/index.vue | 6 ++++-- src/utils/http.ts | 3 ++- 10 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/PagesStatistics/index.vue b/src/PagesStatistics/index.vue index 5efd812..df5ab86 100644 --- a/src/PagesStatistics/index.vue +++ b/src/PagesStatistics/index.vue @@ -56,8 +56,9 @@ import Title from "@/components/Title/index.vue"; import TabBar from "@/components/TabBar/index.vue"; import { useMemberStore } from "@/store/index"; import { ProfileApi } from "@/services"; +import pinia from '@/store' -const store = useMemberStore(); +const store = useMemberStore(pinia); const list = reactive([ { title: "收货", diff --git a/src/components/Box/index.vue b/src/components/Box/index.vue index a06a814..0385e14 100644 --- a/src/components/Box/index.vue +++ b/src/components/Box/index.vue @@ -39,7 +39,7 @@ const getSafeHeight = () => { // #endif }; onMounted(() => { - // #ifdef APP-PLUS || MP-WEIXIN + // #ifdef MP-WEIXIN let menuButtonInfo = uni.getMenuButtonBoundingClientRect(); navbarRect.height = menuButtonInfo.height; navbarRect.top = menuButtonInfo.top; diff --git a/src/components/NavBar/NavBar.vue b/src/components/NavBar/NavBar.vue index 0ee865c..88f183a 100644 --- a/src/components/NavBar/NavBar.vue +++ b/src/components/NavBar/NavBar.vue @@ -44,7 +44,7 @@ const navbarRect = reactive({ msgCount: 10, }); onMounted(() => { - // #ifdef APP-PLUS || MP-WEIXIN + // #ifdef MP-WEIXIN let menuButtonInfo = uni.getMenuButtonBoundingClientRect(); navbarRect.height = menuButtonInfo.height; navbarRect.top = menuButtonInfo.top; diff --git a/src/components/NavBar/NavBarLayout.vue b/src/components/NavBar/NavBarLayout.vue index bf407ed..b23cdd9 100644 --- a/src/components/NavBar/NavBarLayout.vue +++ b/src/components/NavBar/NavBarLayout.vue @@ -21,7 +21,7 @@ const navbarRect = reactive({ }); onMounted(() => { - // #ifdef APP-PLUS || MP-WEIXIN + // #ifdef MP-WEIXIN let menuButtonInfo = uni.getMenuButtonBoundingClientRect(); navbarRect.height = menuButtonInfo.height; navbarRect.top = menuButtonInfo.top; diff --git a/src/components/PageView/index.vue b/src/components/PageView/index.vue index 312d2cd..5fa1806 100644 --- a/src/components/PageView/index.vue +++ b/src/components/PageView/index.vue @@ -86,7 +86,7 @@ watch( // ,{ deep: true, immediate:true} onLoad(() => { - // #ifdef APP-PLUS || MP-WEIXIN + // #ifdef APP-PLUS || MP-WEIXIN || H5 getClineHeight(); // #endif }); diff --git a/src/pagesHome/index.vue b/src/pagesHome/index.vue index 341243f..db90ed8 100644 --- a/src/pagesHome/index.vue +++ b/src/pagesHome/index.vue @@ -165,7 +165,9 @@ import { import TabBar from "@/components/TabBar/index.vue"; import { formatMoney } from "@/utils"; import { onBackPress, onShow } from "@dcloudio/uni-app"; -const store = useMemberStore(); +import pinia from '@/store' + +const store = useMemberStore(pinia); const navbarRect = reactive({ height: 32, top: 28, @@ -550,7 +552,7 @@ const init = () => { }); }; onMounted(() => { - // #ifdef APP-PLUS || MP-WEIXIN + // #ifdef MP-WEIXIN let menuButtonInfo = uni.getMenuButtonBoundingClientRect(); navbarRect.height = menuButtonInfo.height; navbarRect.top = menuButtonInfo.top; diff --git a/src/pagesLogin/login/index.vue b/src/pagesLogin/login/index.vue index d0488ca..8545191 100644 --- a/src/pagesLogin/login/index.vue +++ b/src/pagesLogin/login/index.vue @@ -116,13 +116,15 @@ import { ProfileApi } from "@/services/index"; import LoginLayout from "./components/loginLayout.vue"; import { useMemberStore } from "@/store/index"; import valid from "@/utils/validate"; +import pinia from '@/store' + const handleClear = (item: any) => { setTimeout(() => { (model1.userInfo as any)[item.key] = ""; }, 100); }; -const store = useMemberStore(); +const store = useMemberStore(pinia); const loginForm = ref(null); const model1 = reactive({ userInfo: { diff --git a/src/pagesLogin/profile/baseinfo.vue b/src/pagesLogin/profile/baseinfo.vue index fbc461e..a16d3bb 100644 --- a/src/pagesLogin/profile/baseinfo.vue +++ b/src/pagesLogin/profile/baseinfo.vue @@ -8,7 +8,9 @@