1
This commit is contained in:
@ -3,20 +3,22 @@ import {createWebHashHistory, createRouter} from 'vue-router'
|
||||
import HomeView from '@/views/homepage/index.vue'
|
||||
|
||||
const routes = [
|
||||
// ============================================ 首页 ============================================
|
||||
{path: '/', component: HomeView},
|
||||
|
||||
// ============================================ 产品中心 ============================================
|
||||
{
|
||||
path: '/product/monitorSystem',
|
||||
name: 'MonitorSystem',
|
||||
component: () => import('@/views/product/monitorSystem.vue'),
|
||||
path: '/product/hardwareSystem',
|
||||
name: 'HardwareSystem',
|
||||
component: () => import('@/views/product/hardwareSystem.vue'),
|
||||
meta: {
|
||||
title: '低空监管体系',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/product/remoteDevice',
|
||||
name: 'RemoteDevice',
|
||||
component: () => import('@/views/product/remoteDevice.vue'),
|
||||
path: '/product/softwareSystem',
|
||||
name: 'SoftwareSystem',
|
||||
component: () => import('@/views/product/softwareSystem.vue'),
|
||||
meta: {
|
||||
title: '低空远程识别设备',
|
||||
},
|
||||
@ -29,6 +31,7 @@ const routes = [
|
||||
title: '产品详情',
|
||||
},
|
||||
},
|
||||
|
||||
// ============================================ 服务与支撑 ============================================
|
||||
{
|
||||
path: '/services',
|
||||
@ -38,6 +41,7 @@ const routes = [
|
||||
title: '服务与支撑',
|
||||
},
|
||||
},
|
||||
|
||||
// ============================================ 新闻中心 ============================================
|
||||
{
|
||||
path: '/news',
|
||||
@ -55,6 +59,7 @@ const routes = [
|
||||
title: '新闻详情',
|
||||
},
|
||||
},
|
||||
|
||||
// ============================================ 关于我们 ============================================
|
||||
{
|
||||
path: '/about',
|
||||
@ -64,6 +69,7 @@ const routes = [
|
||||
title: '关于我们',
|
||||
},
|
||||
},
|
||||
|
||||
// ============================================ 联系我们 ============================================
|
||||
{
|
||||
path: '/link',
|
||||
@ -73,6 +79,7 @@ const routes = [
|
||||
title: '联系我们',
|
||||
},
|
||||
},
|
||||
|
||||
// ============================================ 下载中心 ============================================
|
||||
{
|
||||
path: '/download',
|
||||
@ -89,6 +96,13 @@ const router = createRouter({
|
||||
routes,
|
||||
})
|
||||
|
||||
// router.beforeEach(async (to, from, next) => {
|
||||
// const {useNavStore} = await import('@/store/nav.js')
|
||||
// const navStore = useNavStore()
|
||||
// navStore.setLoad(true)
|
||||
// next()
|
||||
// })
|
||||
|
||||
router.afterEach((to, from) => {
|
||||
// 只有路径变化时才滚动到顶部
|
||||
if (to.path !== from.path) {
|
||||
|
||||
Reference in New Issue
Block a user