|
@@ -1,7 +1,10 @@
|
|
<template>
|
|
<template>
|
|
- <div>
|
|
|
|
|
|
+ <template v-if="isMo">
|
|
|
|
+ <NoMobile />
|
|
|
|
+ </template>
|
|
|
|
+ <div v-else>
|
|
<Logo />
|
|
<Logo />
|
|
- <RightMenu @toggle-menu="handleNavi" @change-scene="handleChangeScene"/>
|
|
|
|
|
|
+ <RightMenu @toggle-menu="handleNavi" @change-scene="handleChangeScene" />
|
|
<Container :url="currentScene"></Container>
|
|
<Container :url="currentScene"></Container>
|
|
<NavigationBar :show="navi" @change-scene="handleChangeScene" />
|
|
<NavigationBar :show="navi" @change-scene="handleChangeScene" />
|
|
</div>
|
|
</div>
|
|
@@ -12,9 +15,13 @@ import Logo from './components/Logo.vue';
|
|
import RightMenu from './components/RightMenu.vue';
|
|
import RightMenu from './components/RightMenu.vue';
|
|
import Container from './components/Container.vue';
|
|
import Container from './components/Container.vue';
|
|
import NavigationBar from './components/NavigationBar.vue';
|
|
import NavigationBar from './components/NavigationBar.vue';
|
|
|
|
+import NoMobile from './components/Nomobile.vue';
|
|
|
|
+import MobileDetect from 'mobile-detect';
|
|
|
|
+
|
|
import config from './config.json'
|
|
import config from './config.json'
|
|
const data = ref([])
|
|
const data = ref([])
|
|
-
|
|
|
|
|
|
+const isMo = ref(false)
|
|
|
|
+const md = new MobileDetect(window.navigator.userAgent);
|
|
data.value = config
|
|
data.value = config
|
|
provide('data', data)
|
|
provide('data', data)
|
|
|
|
|
|
@@ -27,6 +34,14 @@ const handleNavi = () => {
|
|
}
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
|
+ if (md.mobile()) {
|
|
|
|
+ console.log('isMo')
|
|
|
|
+ isMo.value = true
|
|
|
|
+ document.body.classList.add('isMo')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
const scenes = Array.from(data.value).find(item => item.id === 'home');
|
|
const scenes = Array.from(data.value).find(item => item.id === 'home');
|
|
currentScene.value = scenes.url
|
|
currentScene.value = scenes.url
|
|
|
|
|