|
|
@ -35,6 +35,7 @@ import MapControl from '@/components/MapControl/MapControl.vue' |
|
|
import { RESET, DIRECTION } from '@/components/MapControl/list' |
|
|
import { RESET, DIRECTION } from '@/components/MapControl/list' |
|
|
import { useMediaQuery } from '@vueuse/core' |
|
|
import { useMediaQuery } from '@vueuse/core' |
|
|
import { isZhiluji, playShockmanByNav } from '@/composables/useShockman' |
|
|
import { isZhiluji, playShockmanByNav } from '@/composables/useShockman' |
|
|
|
|
|
import { useStatistics } from '@/composables/useStatistics' |
|
|
|
|
|
|
|
|
const store = useStore() |
|
|
const store = useStore() |
|
|
const storeRefs = storeToRefs(store) |
|
|
const storeRefs = storeToRefs(store) |
|
|
@ -70,18 +71,21 @@ onBeforeUnmount(() => { |
|
|
function handleShop(item) { |
|
|
function handleShop(item) { |
|
|
if (shop.value?.shopCode === item.shopCode || shopPicsMap.value[item.shopCode]) { |
|
|
if (shop.value?.shopCode === item.shopCode || shopPicsMap.value[item.shopCode]) { |
|
|
if (showMap.value) { |
|
|
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 }) => { |
|
|
window.Map_QM.pathNode({ floor: shop.value.floorOrder, node: shop.value.yaxis }, ({ angle, cost }) => { |
|
|
if (isZhiluji()) { |
|
|
if (isZhiluji()) { |
|
|
playShockmanByNav({ progText1: shop.value.shopName, progAngel: String(angle), progDist: cost + '米' }) |
|
|
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 }) => { |
|
|
window.Map_QM.pathNode({ floor: item.floorOrder, node: item.yaxis }, ({ angle, cost }) => { |
|
|
if (isZhiluji()) { |
|
|
if (isZhiluji()) { |
|
|
playShockmanByNav({ progText1: item.shopName, progAngel: String(angle), progDist: cost + '米' }) |
|
|
playShockmanByNav({ progText1: item.shopName, progAngel: String(angle), progDist: cost + '米' }) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
} |
|
|
} else store.SET_SHOW_MAP(true) |
|
|
} else store.SET_SHOW_MAP(true) |
|
|
} |
|
|
} |
|
|
mapIdx.value = -1 |
|
|
mapIdx.value = -1 |
|
|
@ -124,6 +128,7 @@ watch(showMap, v => { |
|
|
window?.Map_QM?.startRender() |
|
|
window?.Map_QM?.startRender() |
|
|
if (shop.value) { |
|
|
if (shop.value) { |
|
|
store.SET_SHOW_MAP(true) |
|
|
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 }) => { |
|
|
window.Map_QM.pathNode({ floor: shop.value.floorOrder, node: shop.value.yaxis }, ({ angle, cost }) => { |
|
|
if (isZhiluji()) { |
|
|
if (isZhiluji()) { |
|
|
playShockmanByNav({ progText1: shop.value.shopName, progAngel: String(angle), progDist: cost + '米' }) |
|
|
playShockmanByNav({ progText1: shop.value.shopName, progAngel: String(angle), progDist: cost + '米' }) |
|
|
@ -140,6 +145,7 @@ watch(shop, nxt => { |
|
|
setShopInactive() |
|
|
setShopInactive() |
|
|
} else if (nxt && showMap.value) { |
|
|
} else if (nxt && showMap.value) { |
|
|
setShopActive(nxt) |
|
|
setShopActive(nxt) |
|
|
|
|
|
if (nxt.houseNumber) useStatistics('navigation', { shopCode: nxt.shopCode }) |
|
|
window.Map_QM.pathNode({ floor: nxt.floorOrder, node: nxt.yaxis }, ({ angle, cost }) => { |
|
|
window.Map_QM.pathNode({ floor: nxt.floorOrder, node: nxt.yaxis }, ({ angle, cost }) => { |
|
|
if (isZhiluji()) { |
|
|
if (isZhiluji()) { |
|
|
playShockmanByNav({ progText1: nxt.shopName, progAngel: String(angle), progDist: cost + '米' }) |
|
|
playShockmanByNav({ progText1: nxt.shopName, progAngel: String(angle), progDist: cost + '米' }) |
|
|
|