From 5e599bb6dad29c301ecc1013767ffd109245af52 Mon Sep 17 00:00:00 2001 From: jiangx Date: Mon, 17 Nov 2025 09:17:19 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E2=99=BB=EF=B8=8F=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=82=B9=E5=87=BB=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/composables/useHandleScreen.ts | 3 +-- src/composables/useInitConfigAndMallInfo.ts | 3 +-- src/composables/useInitMap.ts | 12 ++++++++++++ src/views/Index/Index.vue | 16 ++++++++-------- 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/composables/useHandleScreen.ts b/src/composables/useHandleScreen.ts index 37d126d..491c43d 100644 --- a/src/composables/useHandleScreen.ts +++ b/src/composables/useHandleScreen.ts @@ -1,6 +1,5 @@ import { ref, computed, watch, onUnmounted } from 'vue' import { storeToRefs } from 'pinia' -import * as Sentry from '@sentry/vue' import { useRootStore } from '@/stores/root' import { useRouter } from 'vue-router' import { getStatistics } from '@/http/api/statistics' @@ -98,7 +97,7 @@ export const useHandleScreen = (callback: () => void) => { nativeMethods.value?.goScreenSave() } catch (error) { clearTimers() - Sentry.captureException('checkHandleScreen:' + error) + console.log('checkHandleScreen:' + error) } }, DELAY_CHECK_TIME) } diff --git a/src/composables/useInitConfigAndMallInfo.ts b/src/composables/useInitConfigAndMallInfo.ts index 491cf5d..e9ecd52 100644 --- a/src/composables/useInitConfigAndMallInfo.ts +++ b/src/composables/useInitConfigAndMallInfo.ts @@ -1,4 +1,3 @@ -import * as Sentry from '@sentry/vue' import { useRootStore } from '@/stores/root' import { getConfig, @@ -90,7 +89,7 @@ export const useInitBaseData = async () => { store.SET_SPECIAL_INDUSTRY_CODE(industryCode) store.SET_MENU_LIST(_menuList.data) } catch (error) { - Sentry.captureException(error) + console.log(error) alert('数据异常,软件启动失败') } } diff --git a/src/composables/useInitMap.ts b/src/composables/useInitMap.ts index db5bb48..5762d6f 100644 --- a/src/composables/useInitMap.ts +++ b/src/composables/useInitMap.ts @@ -2,14 +2,19 @@ import { storeToRefs } from 'pinia' import { cloneDeep } from 'lodash-es' import { useRootStore } from '@/stores/root' import { getMapData, getMapShowHouseNumber } from '@/http/api/base' +import { useRoute } from 'vue-router' export const useInitMap = async function () { try { + const route = useRoute() + const store = useRootStore() const { device, shopList, customFacilityList } = storeToRefs(store) const { data } = await getMapData() const { data: houseNumberData } = await getMapShowHouseNumber() const isShowHouseNumber = houseNumberData.map(item => item.content)[0]?.show + + let renderTimer: number //初始化地图 window.MainMap_QM.init( () => { @@ -18,7 +23,14 @@ export const useInitMap = async function () { window.Map_QM.cancelRender() window.Map_QM.addEventListener('shop', onClickShop, false) window.Map_QM.renderer.domElement.addEventListener('contextlost', onContextLost) + if (!route.meta.showMap) { + renderTimer = setTimeout(() => { + window.Map_QM?.cancelRender() + clearTimeout(renderTimer) + }, 1000) + } }, + { build: device.value.buildingOrder, floor: device.value.floorOrder, diff --git a/src/views/Index/Index.vue b/src/views/Index/Index.vue index adb5412..ef822a1 100644 --- a/src/views/Index/Index.vue +++ b/src/views/Index/Index.vue @@ -3,7 +3,7 @@
-
+
@@ -14,7 +14,7 @@

{{ menuList[1].moduleName }} @@ -27,7 +27,7 @@

{{ menuList[2].moduleName }}
{{ menuList[2].moduleNameEn }}
@@ -35,7 +35,7 @@
{{ menuList[4].moduleName }}
{{ menuList[4].moduleNameEn }}
@@ -46,7 +46,7 @@
{{ menuList[3].moduleName }}
{{ menuList[3].moduleNameEn }}
@@ -54,7 +54,7 @@
{{ menuList[5].moduleName }}
{{ menuList[5].moduleNameEn }}
@@ -63,7 +63,7 @@
{{ menuList[6].moduleName }}
{{ menuList[6].moduleNameEn }}
@@ -71,7 +71,7 @@
{{ menuList[7].moduleName }}
{{ menuList[7].moduleNameEn }}
-- 2.30.2