|
|
@ -4,6 +4,7 @@ import { uniqBy } from '@/utils/utils' |
|
|
import { getMap, getFacilityList } from '@/http/api' |
|
|
import { getMap, getFacilityList } from '@/http/api' |
|
|
import Message from '@/base/Message/Message' |
|
|
import Message from '@/base/Message/Message' |
|
|
import { isZhiluji, useShockman } from './useShockman' |
|
|
import { isZhiluji, useShockman } from './useShockman' |
|
|
|
|
|
import { useFacilityNav } from './useFacilityNav' |
|
|
|
|
|
|
|
|
export const useInitMap = function () { |
|
|
export const useInitMap = function () { |
|
|
const store = useStore() |
|
|
const store = useStore() |
|
|
@ -22,6 +23,7 @@ export const useInitMap = function () { |
|
|
return item |
|
|
return item |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
window.Map_QM.addEventListener('icon', onClickFac, false) |
|
|
window.Map_QM.addEventListener('shop', onClickShop, false) |
|
|
window.Map_QM.addEventListener('shop', onClickShop, false) |
|
|
store.SET_FACILITY_LIST(uniqBy(list, 'type')) |
|
|
store.SET_FACILITY_LIST(uniqBy(list, 'type')) |
|
|
window.Map_QM.renderer.domElement.addEventListener('webglcontextlost', onContextLost) |
|
|
window.Map_QM.renderer.domElement.addEventListener('webglcontextlost', onContextLost) |
|
|
@ -67,6 +69,11 @@ function onClickShop(event) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function onClickFac(event) { |
|
|
|
|
|
if (!event.data) return |
|
|
|
|
|
const store = useStore() |
|
|
|
|
|
store.SET_FACILITY({ ...event.data, floor: event.data.floorOrder }) |
|
|
|
|
|
} |
|
|
//地图弹框消失
|
|
|
//地图弹框消失
|
|
|
export function hideMapDialog() { |
|
|
export function hideMapDialog() { |
|
|
document.getElementById('shopInfo').style.visibility = 'hidden' |
|
|
document.getElementById('shopInfo').style.visibility = 'hidden' |
|
|
|