修复bug
This commit is contained in:
76
router.js
76
router.js
@ -2,15 +2,14 @@ import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
|
||||
// 引入页面组件
|
||||
import Home from '@/pages/Home/index.vue'
|
||||
import AboutIndex from '@/pages/About/index.vue'
|
||||
// import Login from '@/pages/Login/index.vue'
|
||||
import Privacy from '@/pages/About/Privacy.vue'
|
||||
import About from '@/pages/About/About.vue'
|
||||
import Service from '@/pages/About/Service.vue'
|
||||
import AIHub from '@/pages/AIHub/index.vue'
|
||||
import AITools from '@/pages/AIHub/AITools.vue'
|
||||
import Frameworks from '@/pages/AIHub/Frameworks.vue'
|
||||
import Home from '@/pages/Home/index.vue';
|
||||
import AboutIndex from '@/pages/About/index.vue';
|
||||
import Privacy from '@/pages/About/Privacy.vue';
|
||||
import About from '@/pages/About/About.vue';
|
||||
import Service from '@/pages/About/Service.vue';
|
||||
import AIHub from '@/pages/AIHub/index.vue';
|
||||
import AITools from '@/pages/AIHub/AITools.vue';
|
||||
import Frameworks from '@/pages/AIHub/Frameworks.vue';
|
||||
import ViewMore from "@/pages/Home/views/ViewMore.vue";
|
||||
import List from "@/pages/Home/views/List.vue";
|
||||
import Detail from "@/pages/ToolDetail/index.vue";
|
||||
@ -21,7 +20,6 @@ import Learn from "@/pages/Learn/index.vue";
|
||||
import Observer from "@/pages/Learn/Observer.vue";
|
||||
import Depth from "@/pages/Learn/Depth.vue";
|
||||
import Pioneer from "@/pages/Learn/Pioneer.vue";
|
||||
// import NewsDetail from "@/pages/DailyNews/NewsDetailIndex/index.vue";
|
||||
import LaunchesDetail from "@/pages/Launches/Detail/index.vue";
|
||||
import FinanceDetail from "@/pages/Launches/FinanceDetail/index.vue";
|
||||
|
||||
@ -31,7 +29,10 @@ export const routes = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'home-redirect',
|
||||
redirect: '/home'
|
||||
redirect: '/home',
|
||||
meta: {
|
||||
parent: 'Home',
|
||||
}
|
||||
},{
|
||||
path: '/home',
|
||||
name: 'home',
|
||||
@ -40,6 +41,7 @@ export const routes = [
|
||||
meta: {
|
||||
navigationName: "Home",
|
||||
hidden: false,
|
||||
parent: 'Home',
|
||||
}, //navigationName:显示在header组件里面导航按钮的名字 hidden:是否在导航栏里面显示
|
||||
children: [
|
||||
{
|
||||
@ -49,6 +51,7 @@ export const routes = [
|
||||
meta: {
|
||||
navigationName: 'List',
|
||||
hidden: true,
|
||||
parent: 'Home',
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -58,6 +61,7 @@ export const routes = [
|
||||
meta: {
|
||||
navigationName: 'View More',
|
||||
hidden: true,
|
||||
parent: 'Home',
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -69,6 +73,7 @@ export const routes = [
|
||||
meta: {
|
||||
navigationName: "Tool ToolDetail",
|
||||
hidden: true,
|
||||
parent: 'Home',
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -77,7 +82,8 @@ export const routes = [
|
||||
component: Launches,
|
||||
meta: {
|
||||
navigationName: "AI Launches",
|
||||
hidden: false
|
||||
hidden: false,
|
||||
parent: 'Launches',
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -87,6 +93,7 @@ export const routes = [
|
||||
meta: {
|
||||
navigationName: "AI Launches Detail",
|
||||
hidden: true,
|
||||
parent: 'Launches',
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -96,6 +103,7 @@ export const routes = [
|
||||
meta: {
|
||||
navigationName: "Finance",
|
||||
hidden: true,
|
||||
parent: 'Launches',
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -113,7 +121,8 @@ export const routes = [
|
||||
component: AITools,
|
||||
meta: {
|
||||
icon: 'tools',
|
||||
hidden: true // 隐藏于主导航,只在子菜单显示
|
||||
hidden: true, // 隐藏于主导航,只在子菜单显示
|
||||
parent: 'Hub'
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -122,7 +131,8 @@ export const routes = [
|
||||
component: Frameworks,
|
||||
meta: {
|
||||
icon: 'frameworks',
|
||||
hidden: true
|
||||
hidden: true,
|
||||
parent: 'Hub',
|
||||
}
|
||||
},
|
||||
]
|
||||
@ -134,6 +144,7 @@ export const routes = [
|
||||
meta: {
|
||||
icon: 'tools',
|
||||
hidden: true,
|
||||
parent: ['Hub', 'DailyNews', 'Learn'],
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -142,18 +153,10 @@ export const routes = [
|
||||
component: DailyNews,
|
||||
meta: {
|
||||
navigationName: "AI Daily News",
|
||||
hidden: false
|
||||
hidden: false,
|
||||
parent: 'DailyNews',
|
||||
},
|
||||
},
|
||||
// {
|
||||
// path: '/news-detail',
|
||||
// name: 'News Detail',
|
||||
// component: NewsDetail,
|
||||
// meta: {
|
||||
// navigationName: 'News ToolDetail',
|
||||
// hidden: true
|
||||
// }
|
||||
// },
|
||||
{
|
||||
path: '/learn',
|
||||
name: 'Learn',
|
||||
@ -169,7 +172,8 @@ export const routes = [
|
||||
component: Observer,
|
||||
meta: {
|
||||
icon: 'observer',
|
||||
hidden: true
|
||||
hidden: true,
|
||||
parent: 'Learn',
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -178,7 +182,8 @@ export const routes = [
|
||||
component: Depth,
|
||||
meta: {
|
||||
icon: 'analysis',
|
||||
hidden: true
|
||||
hidden: true,
|
||||
parent: 'Learn',
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -187,7 +192,8 @@ export const routes = [
|
||||
component: Pioneer,
|
||||
meta: {
|
||||
icon: 'pioneer',
|
||||
hidden: true
|
||||
hidden: true,
|
||||
parent: 'Learn',
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -204,21 +210,24 @@ export const routes = [
|
||||
path: '/privacy',
|
||||
component: Privacy,
|
||||
meta: {
|
||||
hidden: true
|
||||
hidden: true,
|
||||
parent: 'Privacy',
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
component: About,
|
||||
meta: {
|
||||
hidden: true
|
||||
hidden: true,
|
||||
parent: 'About',
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/service',
|
||||
component: Service,
|
||||
meta: {
|
||||
hidden: true
|
||||
hidden: true,
|
||||
parent: 'Service',
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -227,7 +236,12 @@ export const routes = [
|
||||
|
||||
{
|
||||
path: '*',
|
||||
redirect: '/'
|
||||
redirect: '/',
|
||||
meta: {
|
||||
navigationName: "404",
|
||||
hidden: true,
|
||||
parent: 'Home',
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user