Compare commits
1 Commits
168748eb18
...
1
| Author | SHA1 | Date | |
|---|---|---|---|
| c1195a34c6 |
@ -5,5 +5,6 @@
|
|||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"trailingComma": "es5",
|
"trailingComma": "es5",
|
||||||
"bracketSpacing": false,
|
"bracketSpacing": false,
|
||||||
"htmlWhitespaceSensitivity": "ignore"
|
"htmlWhitespaceSensitivity": "ignore",
|
||||||
|
"printWidth": 120
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,2 @@
|
|||||||
window.GD_KEYS = [
|
window.GD_url =
|
||||||
'348d477ba83826e46b32d3ff10fffe82',
|
'https://www.amap.com/search?query=%E7%87%83%E8%B0%B7%E7%A7%91%E6%8A%80(%E5%8D%97%E4%BA%AC)%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8'
|
||||||
'ed2ea36f8564541569c370254845d93d',
|
|
||||||
'c1da03827f956a215311c0f5229bddc3',
|
|
||||||
]
|
|
||||||
|
|||||||
28
src/home.vue
28
src/home.vue
@ -7,17 +7,35 @@ import Footer from './views/layout/pc/footer/index.vue'
|
|||||||
<div id="app">
|
<div id="app">
|
||||||
<Header id="header" />
|
<Header id="header" />
|
||||||
|
|
||||||
<!-- include 对应组件的 name -->
|
<router-view id="main" v-slot="{Component, route}">
|
||||||
<router-view id="main" v-slot="{Component}">
|
<transition name="fade" mode="out-in">
|
||||||
<keep-alive include="New">
|
<Suspense>
|
||||||
<component :is="Component" />
|
<keep-alive include="New">
|
||||||
</keep-alive>
|
<component :is="Component" :key="route.fullPath" />
|
||||||
|
</keep-alive>
|
||||||
|
<template #fallback>
|
||||||
|
<div class="loading-placeholder">页面加载中...</div>
|
||||||
|
</template>
|
||||||
|
</Suspense>
|
||||||
|
</transition>
|
||||||
</router-view>
|
</router-view>
|
||||||
|
|
||||||
<Footer id="footer" />
|
<Footer id="footer" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
/* 淡入淡出效果 */
|
||||||
|
.fade-enter-active,
|
||||||
|
.fade-leave-active {
|
||||||
|
transition: opacity 0.5s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fade-enter-from,
|
||||||
|
.fade-leave-to {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
@ -41,8 +41,8 @@ const onClick = (url) => emits('navClick', url)
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
&:hover {
|
&:hover {
|
||||||
-webkit-transform: translateY(-8px);
|
-webkit-transform: translateY(-2px);
|
||||||
transform: translateY(-8px);
|
transform: translateY(-2px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,26 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
|
import {useRouter} from 'vue-router'
|
||||||
import Nav from './nav.vue'
|
import Nav from './nav.vue'
|
||||||
import {ref, onMounted} from 'vue'
|
import {ref, onMounted} from 'vue'
|
||||||
|
import {useNavStore} from '@/store/nav'
|
||||||
|
import {storeToRefs} from 'pinia'
|
||||||
|
|
||||||
|
// Store 相关
|
||||||
|
const navStore = useNavStore()
|
||||||
|
const {navIndex} = storeToRefs(navStore)
|
||||||
|
|
||||||
onMounted(() => {})
|
onMounted(() => {})
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
|
const toIndex = () => {
|
||||||
|
navIndex.value = '/'
|
||||||
|
router.push('/')
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="page flex a-c">
|
<div class="page flex a-c">
|
||||||
<div class="logo"></div>
|
<div class="logo" @click="toIndex"></div>
|
||||||
<Nav class="nav"></Nav>
|
<Nav class="nav"></Nav>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -22,6 +36,7 @@ onMounted(() => {})
|
|||||||
height: 56px;
|
height: 56px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 160px;
|
left: 160px;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
|
|||||||
@ -7,9 +7,7 @@ import Banner from '@/components/Banner/index.vue'
|
|||||||
const currentPage = ref(1)
|
const currentPage = ref(1)
|
||||||
|
|
||||||
const toCompany = () => {
|
const toCompany = () => {
|
||||||
window.open(
|
window.open(window.GD_url)
|
||||||
'https://www.amap.com/search?query=%E7%87%83%E8%B0%B7%E7%A7%91%E6%8A%80(%E5%8D%97%E4%BA%AC)%E6%9C%89%E9%99%90%E5%85%AC%E5%8F%B8'
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {})
|
onMounted(() => {})
|
||||||
|
|||||||
Reference in New Issue
Block a user