Files
Situation-Awareness-Platfor…/src/views/Search/index.vue
2025-03-12 18:41:20 +08:00

51 lines
1.1 KiB
Vue

<template>
<div id="homeweb-container"></div>
</template>
<script setup lang="ts">
import { ref, onMounted, onBeforeUnmount } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import emitter from '@/utils/eventBus';
import microApp from '@micro-zoe/micro-app';
const route = useRoute();
const router = useRouter();
const toolbarContain = ref<any>(null);
const origin = (import.meta as any).env.VITE_CHILD_HOMEWEB_HOST;
onMounted(() => {
toolbarContain.value = document.getElementById('toolbarBottom');
microApp.renderApp({
name: 'micoro-app-homeweb-app',
url: origin,
container: '#homeweb-container',
data: {
emitter,
toolbarContain,
$router: router
},
iframe: true,
baseroute: '/',
defaultPtah: route.path
});
});
onBeforeUnmount(() => {
microApp.unmountApp('micoro-app-homeweb-app');
});
</script>
<style lang="scss" scoped>
.intro-page {
width: 100%;
}
.intro-page-mobile {
:deep(.intro-banner) {
background: url(@/assets/imgs/home/mobile-banner.png);
background-repeat: no-repeat, no-repeat;
background-size: contain;
background-position: center center;
}
}
</style>