成都SKP导视横版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

25 lines
767 B

import { useStore } from '@/store/root'
import Brand from '@/utils/Class/Brand'
import { useRouter } from 'vue-router'
export const useFacilityNav = () => {
const store = useStore()
const router = useRouter()
function handleFacility({ abbreviation, customFacilityName, filePath, code }: Facility) {
const { floor, node } = window.Map_QM.pathIcon({ type: abbreviation })
const floorName = store.currentBuildingFloorsList.find(_floor => _floor.floorOrder === floor)?.floor
const shop = new Brand({
shopName: customFacilityName,
floorOrder: floor,
floor: floorName as string,
logoUrl: filePath,
yaxis: node,
shopCode: code
})
store.SET_SHOP(shop)
router.push('/nav')
}
return { handleFacility }
}