238 lines
8.8 KiB
JavaScript
238 lines
8.8 KiB
JavaScript
import { createRouter, createWebHistory } from "vue-router";
|
|
import Layout from '@/layouts/index.vue';
|
|
import ChatLayout from '@/views/chat/layout.vue'
|
|
|
|
const router = createRouter({
|
|
history: createWebHistory(import.meta.env.BASE_URL),
|
|
routes: [
|
|
{
|
|
path: "/",
|
|
name: "Layout",
|
|
component: Layout,
|
|
children: [
|
|
{
|
|
path: "",
|
|
name: "Home",
|
|
meta: {
|
|
title: "首页", // 页面标题
|
|
group: 'home', // 导航归属
|
|
},
|
|
component: () => import("@/views/home/index.vue"),
|
|
},
|
|
{
|
|
path: "chat-layout",
|
|
name: "ChatLayout",
|
|
meta: {
|
|
title: "AI助理",
|
|
},
|
|
redirect :'/chat',
|
|
component:ChatLayout,
|
|
children: [{
|
|
path: '/chat/:uuid?',
|
|
name: 'Chat',
|
|
component: () => import("@/views/chat/index.vue"),
|
|
meta: {
|
|
title: 'AI助理',
|
|
footer: false,
|
|
}
|
|
}]
|
|
},
|
|
{
|
|
path: "communication",
|
|
name: "Communication",
|
|
meta: {
|
|
title: "AI传播",
|
|
group: 'communication'
|
|
},
|
|
component: () => import("@/views/communication/home.vue"),
|
|
},
|
|
{
|
|
path: "business",
|
|
name: "business",
|
|
meta: {
|
|
title: "AI商情",
|
|
group: 'business'
|
|
},
|
|
component: () => import("@/views/business/home.vue"),
|
|
},
|
|
{
|
|
path: "/business/macroeconomics",
|
|
name: "Macroeconomics",
|
|
meta: {
|
|
title: "宏观政经",
|
|
group: 'business'
|
|
},
|
|
component: () => import("@/views/business/macroeconomics/index.vue"),
|
|
},
|
|
{
|
|
path: "/business/macroeconomics/list/:pid",
|
|
name: "MacroeconomicsList",
|
|
meta: {
|
|
title: "宏观政经",
|
|
group: 'business'
|
|
},
|
|
component: () => import("@/views/business/macroeconomics/list.vue"),
|
|
},
|
|
{
|
|
path: "/business/macroeconomics/detail/:id",
|
|
name: "MacroeconomicsDetail",
|
|
meta: {
|
|
title: "宏观政经",
|
|
group: 'business'
|
|
},
|
|
component: () => import("@/views/business/macroeconomics/detail.vue"),
|
|
},
|
|
{
|
|
path: "/business/macroeconomics/trend/:id",
|
|
name: "Trend",
|
|
meta: {
|
|
title: "洞见趋势",
|
|
group: 'business'
|
|
},
|
|
component: () => import("@/views/business/macroeconomics/trend.vue"),
|
|
},
|
|
{
|
|
path: 'business/insight',
|
|
name: 'insight',
|
|
meta: {
|
|
title: '行业洞察',
|
|
group: 'business'
|
|
},
|
|
component: () => import("@/views/business/insight/index.vue"),
|
|
},
|
|
{
|
|
path: 'business/insight/category/:cid',
|
|
name: 'insightCategory',
|
|
meta: {
|
|
title: '行业洞察',
|
|
group: 'business'
|
|
},
|
|
component: () => import("@/views/business/insight/list.vue"),
|
|
},
|
|
{
|
|
path: 'business/insight/detail/:id',
|
|
name: 'insightDetail',
|
|
meta: {
|
|
title: '行业洞察',
|
|
group: 'business'
|
|
},
|
|
component: () => import("@/views/business/insight/detail.vue"),
|
|
},
|
|
{
|
|
path: 'business/legal',
|
|
name: 'legal',
|
|
meta: {
|
|
title: '法律法规',
|
|
group: 'business'
|
|
},
|
|
component: () => import("@/views/business/legal/index.vue"),
|
|
},
|
|
{
|
|
path: 'business/legal/policy',
|
|
name: 'policy',
|
|
meta: {
|
|
title: '政策解读',
|
|
group: 'business'
|
|
},
|
|
component: () => import("@/views/business/legal/policy.vue"),
|
|
},
|
|
{
|
|
path: 'business/legal/policy/detail/:id',
|
|
name: 'policyDetail',
|
|
meta: {
|
|
title: '政策解读',
|
|
group: 'business'
|
|
},
|
|
component: () => import("@/views/business/legal/policyDetail.vue"),
|
|
},
|
|
{
|
|
path: 'business/legal/country',
|
|
name: 'country',
|
|
meta: {
|
|
title: '国别地区指南',
|
|
group: 'business'
|
|
},
|
|
component: () => import("@/views/business/legal/country.vue"),
|
|
},
|
|
{
|
|
path: 'business/legal/country/detail/:id',
|
|
name: 'countryDetail',
|
|
meta: {
|
|
title: '国别地区指南',
|
|
group: 'business'
|
|
},
|
|
component: () => import("@/views/business/legal/countryInfo.vue"),
|
|
},
|
|
{
|
|
path: 'business/legal/search',
|
|
name: 'search',
|
|
meta: {
|
|
title: '境外法规检索',
|
|
group: 'business'
|
|
},
|
|
component: () => import("@/views/business/legal/search.vue"),
|
|
},
|
|
{
|
|
path: 'business/legal/searchResult',
|
|
name: 'searchResult',
|
|
meta: {
|
|
title: '境外法规检索结果',
|
|
group: 'business'
|
|
},
|
|
component: () => import("@/views/business/legal/searchResult.vue"),
|
|
},
|
|
{
|
|
path: "training",
|
|
name: "Training",
|
|
meta: {
|
|
title: "AI培训",
|
|
group: 'training'
|
|
},
|
|
component: () => import("@/views/training/home.vue"),
|
|
},
|
|
{
|
|
path: "vip",
|
|
name: "Vip",
|
|
meta: {
|
|
title: "会员专区",
|
|
group: 'vip'
|
|
},
|
|
component: () => import("@/views/vip/index.vue"),
|
|
},
|
|
{
|
|
path: "ucenter",
|
|
name: "ucenter",
|
|
meta: {
|
|
title: "个人中心",
|
|
group: 'ucenter'
|
|
},
|
|
component: () => import("@/views/ucenter/index.vue"),
|
|
children: [
|
|
{
|
|
path: 'userinfo',
|
|
name: 'userInfo',
|
|
meta: {
|
|
title: '个人信息',
|
|
group: 'ucenter'
|
|
},
|
|
component: () => import("@/views/ucenter/userInfo.vue"),
|
|
},
|
|
{
|
|
path: 'order',
|
|
name: 'order',
|
|
meta: {
|
|
title: '我的订单',
|
|
group: 'ucenter'
|
|
},
|
|
component: () => import("@/views/ucenter/order.vue"),
|
|
},
|
|
]
|
|
},
|
|
|
|
]
|
|
}
|
|
],
|
|
});
|
|
|
|
export default router;
|