import { createRouter, createWebHistory } from "vue-router"; import Layout from '@/layouts/index.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: "insights", name: "Insights", meta: { title: "AI商情", }, component: () => import("@/views/insights/home.vue"), }, { path: "macroeconomics", name: "Macroeconomics", meta: { title: "AI商情-宏观政经", }, component: () => import("@/views/macroeconomics/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"), }, ] }, { path: "business", name: "business", meta: { title: "AI商情", group: 'business' }, component: () => import("@/views/business/index.vue"), }, { path: 'business/insight', name: 'insight', meta: { title: 'AI商情-行业洞察', group: 'business' }, component: () => import("@/views/business/insight/index.vue"), }, { path: 'business/insight/category/:cid', name: 'insightCategory', meta: { title: 'AI商情-行业洞察', group: 'business' }, component: () => import("@/views/business/insight/list.vue"), }, { path: 'business/insight/detail/:cid/:id', name: 'insightDetail', meta: { title: 'AI商情-行业洞察', group: 'business' }, component: () => import("@/views/business/insight/detail.vue"), }, { path: 'business/legal', name: 'legal', meta: { title: 'AI商情-法律法规', group: 'business' }, component: () => import("@/views/business/legal/index.vue"), }, { path: 'business/legal/policy', name: 'policy', meta: { title: 'AI商情-法律法规-政策解读', group: 'business' }, component: () => import("@/views/business/legal/policy.vue"), }, { path: 'business/legal/policy/detail/:id', name: 'policyDetail', meta: { title: 'AI商情-法律法规-政策解读', group: 'business' }, component: () => import("@/views/business/legal/policyDetail.vue"), }, { path: 'business/legal/country', name: 'country', meta: { title: 'AI商情-法律法规-国别地区指南', group: 'business' }, component: () => import("@/views/business/legal/country.vue"), }, { path: 'business/legal/country/detail/:id', name: 'countryDetail', meta: { title: 'AI商情-法律法规-国别地区指南', group: 'business' }, component: () => import("@/views/business/legal/countryInfo.vue"), }, { path: 'business/legal/search', name: 'search', meta: { title: 'AI商情-法律法规-境外法规检索', group: 'business' }, component: () => import("@/views/business/legal/search.vue"), }, { path: 'business/legal/searchResult', name: 'searchResult', meta: { title: 'AI商情-法律法规-境外法规检索', group: 'business' }, component: () => import("@/views/business/legal/searchResult.vue"), }, ] } ], }); export default router;