From 9080f1c3f4b18adc310309f154ef308d0aab8132 Mon Sep 17 00:00:00 2001 From: jiannibang <271381693@qq.com> Date: Tue, 18 Feb 2025 15:58:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9C=A8=E5=AF=BC=E8=88=AA=E4=B8=AD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BB=9F=E8=AE=A1=E5=8A=9F=E8=83=BD=E4=BB=A5?= =?UTF-8?q?=E8=B7=9F=E8=B8=AA=E5=95=86=E5=BA=97=E8=AE=BF=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Brand/Brand.vue | 10 ++++++++-- src/views/Guide/Guide.vue | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/views/Brand/Brand.vue b/src/views/Brand/Brand.vue index f83b555..beabdb8 100644 --- a/src/views/Brand/Brand.vue +++ b/src/views/Brand/Brand.vue @@ -35,6 +35,7 @@ import MapControl from '@/components/MapControl/MapControl.vue' import { RESET, DIRECTION } from '@/components/MapControl/list' import { useMediaQuery } from '@vueuse/core' import { isZhiluji, playShockmanByNav } from '@/composables/useShockman' +import { useStatistics } from '@/composables/useStatistics' const store = useStore() const storeRefs = storeToRefs(store) @@ -70,18 +71,21 @@ onBeforeUnmount(() => { function handleShop(item) { if (shop.value?.shopCode === item.shopCode || shopPicsMap.value[item.shopCode]) { if (showMap.value) { - if (shop.value) + if (shop.value) { + if (shop.value.houseNumber) useStatistics('navigation', { shopCode: shop.value.shopCode }) window.Map_QM.pathNode({ floor: shop.value.floorOrder, node: shop.value.yaxis }, ({ angle, cost }) => { if (isZhiluji()) { playShockmanByNav({ progText1: shop.value.shopName, progAngel: String(angle), progDist: cost + '米' }) } }) - else + } else { + if (item.houseNumber) useStatistics('navigation', { shopCode: item.shopCode }) window.Map_QM.pathNode({ floor: item.floorOrder, node: item.yaxis }, ({ angle, cost }) => { if (isZhiluji()) { playShockmanByNav({ progText1: item.shopName, progAngel: String(angle), progDist: cost + '米' }) } }) + } } else store.SET_SHOW_MAP(true) } mapIdx.value = -1 @@ -124,6 +128,7 @@ watch(showMap, v => { window?.Map_QM?.startRender() if (shop.value) { store.SET_SHOW_MAP(true) + if (shop.value.houseNumber) useStatistics('navigation', { shopCode: shop.value.shopCode }) window.Map_QM.pathNode({ floor: shop.value.floorOrder, node: shop.value.yaxis }, ({ angle, cost }) => { if (isZhiluji()) { playShockmanByNav({ progText1: shop.value.shopName, progAngel: String(angle), progDist: cost + '米' }) @@ -140,6 +145,7 @@ watch(shop, nxt => { setShopInactive() } else if (nxt && showMap.value) { setShopActive(nxt) + if (nxt.houseNumber) useStatistics('navigation', { shopCode: nxt.shopCode }) window.Map_QM.pathNode({ floor: nxt.floorOrder, node: nxt.yaxis }, ({ angle, cost }) => { if (isZhiluji()) { playShockmanByNav({ progText1: nxt.shopName, progAngel: String(angle), progDist: cost + '米' }) diff --git a/src/views/Guide/Guide.vue b/src/views/Guide/Guide.vue index 7b5c804..46e354f 100644 --- a/src/views/Guide/Guide.vue +++ b/src/views/Guide/Guide.vue @@ -96,6 +96,7 @@ import { useMediaQuery } from '@vueuse/core' import MapControl from '@/components/MapControl/MapControl.vue' import { RESET, DIRECTION } from '@/components/MapControl/list' import { isZhiluji, playShockmanByNav } from '@/composables/useShockman' +import { useStatistics } from '@/composables/useStatistics' const isH = useMediaQuery('(min-aspect-ratio: 1/1)') @@ -165,6 +166,7 @@ function handleMapIcon(item, index) { function handleShop(item) { mapIdx.value = -1 if (shop.value === item && initiated.value) { + if (item.houseNumber) useStatistics('navigation', { shopCode: item.shopCode }) window.Map_QM.pathNode({ floor: item.floorOrder, node: item.yaxis }, ({ angle, cost }) => { if (isZhiluji()) { playShockmanByNav({ progText1: item.shopName, progAngel: String(angle), progDist: cost + '米' }) @@ -182,6 +184,7 @@ watch(shop, nxt => { if (floor.floorOrder !== nxt.floorOrder) { filterAboutCurrentInfo(false) } + if (nxt.houseNumber) useStatistics('navigation', { shopCode: nxt.shopCode }) window.Map_QM.pathNode({ floor: nxt.floorOrder, node: nxt.yaxis }, ({ angle, cost }) => { if (isZhiluji()) { playShockmanByNav({ progText1: nxt.shopName, progAngel: String(angle), progDist: cost + '米' }) @@ -239,6 +242,7 @@ function filterAboutCurrentInfo(needShowFloor = true) { window.Map_QM.showFloor(floorOrder, () => { if (shop.value) { setShopActive(shop.value) + if (shop.value.houseNumber) useStatistics('navigation', { shopCode: shop.value.shopCode }) window.Map_QM.pathNode({ floor: shop.value.floorOrder, node: shop.value.yaxis }, ({ angle, cost }) => { if (isZhiluji()) { playShockmanByNav({ progText1: shop.value.shopName, progAngel: String(angle), progDist: cost + '米' })