feat: 更新 ESLint 和 Prettier 配置,增强代码质量管理

- 在 .gitignore 中添加 public/audio/* 以忽略音频文件。
- 更新 bun.lock,添加 eslint-config-prettier 和 eslint-plugin-prettier 依赖,确保 ESLint 与 Prettier 的兼容性。
- 修改 eslint.config.ts,整合 Prettier 规则,优化代码风格一致性。
- 在 package.json 中添加 lint:fix 和 format 脚本,简化代码格式化和修复流程。
- 更新 tailwind.config.ts 和其他组件文件,统一代码风格,提升可读性。
This commit is contained in:
zhongyidian committed 2026-03-05 13:50:47 +08:00
1 parent 5d00adc1a5
commit 76c67b492e
216 files changed
+12454 -13976

No files matched your search

+14 -14
View File
@@ -1,9 +1,9 @@
import { createHashRouter, Navigate, RouteObject } from "react-router-dom";
import { createHashRouter, Navigate, RouteObject } from 'react-router-dom'
import Home from "@/pages/Home";
import NotFound from "@/pages/NotFound";
import Menu from "@/pages/Menu";
import Entrance from "@/pages/entrance";
import Home from '@/pages/Home'
import NotFound from '@/pages/NotFound'
import Menu from '@/pages/Menu'
import Entrance from '@/pages/entrance'
//各个故居路由
import {
@@ -13,15 +13,15 @@ import {
HuangyanpeiRoutes,
LuxunRoutes,
ZhanglepingRoutes,
} from "./modules";
} from './modules'
const baseRoutes: RouteObject[] = [
{
path: "/",
path: '/',
element: <Navigate to="/home" replace />,
},
{
path: "/home",
path: '/home',
element: <Home />,
},
/**
@@ -34,14 +34,14 @@ const baseRoutes: RouteObject[] = [
* 经济巨擘:荣德生、陈云
*/
{
path: "/menu",
path: '/menu',
element: <Menu />,
},
{
path: "/entrance/:moduleName",
path: '/entrance/:moduleName',
element: <Entrance />,
},
];
]
/**
* 应用路由配置
@@ -58,9 +58,9 @@ const router = createHashRouter([
...LuxunRoutes,
...ZhanglepingRoutes,
{
path: "*",
path: '*',
element: <NotFound />,
},
]);
])
export default router;
export default router
+40 -42
View File
@@ -1,112 +1,110 @@
import { lazy } from "react";
import { RouteObject } from "react-router-dom";
import { ResidenceLayout } from "@/components/layout";
import { lazy } from 'react'
import { RouteObject } from 'react-router-dom'
import { ResidenceLayout } from '@/components/layout'
const HomePage = lazy(() => import("@/pages/chenyun/home"));
const ChenyunPlace1 = lazy(() => import("@/pages/chenyun/place/place1"));
const ChenyunPlace2 = lazy(() => import("@/pages/chenyun/place/place2"));
const ChenyunPlace3 = lazy(() => import("@/pages/chenyun/place/place3"));
const ChenyunPlace4 = lazy(() => import("@/pages/chenyun/place/place4"));
const ChenyunPlace5 = lazy(() => import("@/pages/chenyun/place/place5"));
const ChenyunPlace6 = lazy(() => import("@/pages/chenyun/place/place6"));
const ChenyunPlace7 = lazy(() => import("@/pages/chenyun/place/place7"));
const ChenyunPlace8 = lazy(() => import("@/pages/chenyun/place/place8"));
const ChenyunPlace9 = lazy(() => import("@/pages/chenyun/place/place9"));
const ChenyunReflection = lazy(() => import("@/pages/chenyun/reflection"));
const ChenyunInternalization = lazy(
() => import("@/pages/chenyun/internalization")
);
const HomePage = lazy(() => import('@/pages/chenyun/home'))
const ChenyunPlace1 = lazy(() => import('@/pages/chenyun/place/place1'))
const ChenyunPlace2 = lazy(() => import('@/pages/chenyun/place/place2'))
const ChenyunPlace3 = lazy(() => import('@/pages/chenyun/place/place3'))
const ChenyunPlace4 = lazy(() => import('@/pages/chenyun/place/place4'))
const ChenyunPlace5 = lazy(() => import('@/pages/chenyun/place/place5'))
const ChenyunPlace6 = lazy(() => import('@/pages/chenyun/place/place6'))
const ChenyunPlace7 = lazy(() => import('@/pages/chenyun/place/place7'))
const ChenyunPlace8 = lazy(() => import('@/pages/chenyun/place/place8'))
const ChenyunPlace9 = lazy(() => import('@/pages/chenyun/place/place9'))
const ChenyunReflection = lazy(() => import('@/pages/chenyun/reflection'))
const ChenyunInternalization = lazy(() => import('@/pages/chenyun/internalization'))
//陈云 router
// 路径格式:/:moduleName/chenyun/:page
export const ChenyunRoutes: RouteObject[] = [
{
path: "/:moduleName/chenyun",
path: '/:moduleName/chenyun',
element: <ResidenceLayout />,
children: [
{
index: true,
element: <HomePage />,
handle: {
videoSrc: "video/chenyun/chenyun_lukou.mp4",
videoSrc: 'video/chenyun/chenyun_lukou.mp4',
},
},
{
path: "home",
path: 'home',
element: <HomePage />,
handle: {
videoSrc: "video/chenyun/chenyun_lukou.mp4",
videoSrc: 'video/chenyun/chenyun_lukou.mp4',
},
},
{
path: "place1",
path: 'place1',
element: <ChenyunPlace1 />,
handle: {
videoSrc: "video/chenyun/chenyun_01.mp4",
videoSrc: 'video/chenyun/chenyun_01.mp4',
},
},
{
path: "place2",
path: 'place2',
element: <ChenyunPlace2 />,
handle: {
videoSrc: "video/chenyun/chenyun_02.mp4",
videoSrc: 'video/chenyun/chenyun_02.mp4',
},
},
{
path: "place3",
path: 'place3',
element: <ChenyunPlace3 />,
handle: {
videoSrc: "video/chenyun/chenyun_03.mp4",
videoSrc: 'video/chenyun/chenyun_03.mp4',
},
},
{
path: "place4",
path: 'place4',
element: <ChenyunPlace4 />,
handle: {
videoSrc: "video/chenyun/chenyun_05.mp4",
videoSrc: 'video/chenyun/chenyun_05.mp4',
},
},
{
path: "place5",
path: 'place5',
element: <ChenyunPlace5 />,
handle: {
videoSrc: "video/chenyun/chenyun_06.mp4",
videoSrc: 'video/chenyun/chenyun_06.mp4',
},
},
{
path: "place6",
path: 'place6',
element: <ChenyunPlace6 />,
handle: {
videoSrc: "video/chenyun/chenyun_08.mp4",
videoSrc: 'video/chenyun/chenyun_08.mp4',
},
},
{
path: "place7",
path: 'place7',
element: <ChenyunPlace7 />,
handle: {
videoSrc: "video/chenyun/chenyun_09.mp4",
videoSrc: 'video/chenyun/chenyun_09.mp4',
},
},
{
path: "place8",
path: 'place8',
element: <ChenyunPlace8 />,
handle: {
videoSrc: "video/chenyun/chenyun_12.mp4",
videoSrc: 'video/chenyun/chenyun_12.mp4',
},
},
{
path: "place9",
path: 'place9',
element: <ChenyunPlace9 />,
handle: {
videoSrc: "video/chenyun/chenyun_13.mp4",
videoSrc: 'video/chenyun/chenyun_13.mp4',
},
},
{
path: "reflection",
path: 'reflection',
element: <ChenyunReflection />,
},
{
path: "internalization",
path: 'internalization',
element: <ChenyunInternalization />,
// handle: {
// videoSrc: "video/chenyun/chenyun_neihua.mp4",
@@ -114,4 +112,4 @@ export const ChenyunRoutes: RouteObject[] = [
},
],
},
];
]
+38 -60
View File
@@ -1,128 +1,106 @@
import { lazy } from "react";
import { RouteObject } from "react-router-dom";
import { ResidenceLayout } from "@/components/layout";
import { lazy } from 'react'
import { RouteObject } from 'react-router-dom'
import { ResidenceLayout } from '@/components/layout'
const HomePage = lazy(() => import("@/pages/huangyanpei/home"));
const HuangyanpeiPlace1 = lazy(
() => import("@/pages/huangyanpei/place/place1")
);
const HuangyanpeiPlace2 = lazy(
() => import("@/pages/huangyanpei/place/place2")
);
const HuangyanpeiPlace3 = lazy(
() => import("@/pages/huangyanpei/place/place3")
);
const HuangyanpeiPlace4 = lazy(
() => import("@/pages/huangyanpei/place/place4")
);
const HuangyanpeiPlace5 = lazy(
() => import("@/pages/huangyanpei/place/place5")
);
const HuangyanpeiPlace6 = lazy(
() => import("@/pages/huangyanpei/place/place6")
);
const HuangyanpeiReflection = lazy(
() => import("@/pages/huangyanpei/reflection/scene1")
);
const HuangyanpeiReflection2 = lazy(
() => import("@/pages/huangyanpei/reflection/scene2")
);
const HuangyanpeiReflection3 = lazy(
() => import("@/pages/huangyanpei/reflection/scene3")
);
const HuangyanpeiReflection4 = lazy(
() => import("@/pages/huangyanpei/reflection/scene4")
);
const HuangyanpeiInternalization = lazy(
() => import("@/pages/huangyanpei/internalization")
);
const HomePage = lazy(() => import('@/pages/huangyanpei/home'))
const HuangyanpeiPlace1 = lazy(() => import('@/pages/huangyanpei/place/place1'))
const HuangyanpeiPlace2 = lazy(() => import('@/pages/huangyanpei/place/place2'))
const HuangyanpeiPlace3 = lazy(() => import('@/pages/huangyanpei/place/place3'))
const HuangyanpeiPlace4 = lazy(() => import('@/pages/huangyanpei/place/place4'))
const HuangyanpeiPlace5 = lazy(() => import('@/pages/huangyanpei/place/place5'))
const HuangyanpeiPlace6 = lazy(() => import('@/pages/huangyanpei/place/place6'))
const HuangyanpeiReflection = lazy(() => import('@/pages/huangyanpei/reflection/scene1'))
const HuangyanpeiReflection2 = lazy(() => import('@/pages/huangyanpei/reflection/scene2'))
const HuangyanpeiReflection3 = lazy(() => import('@/pages/huangyanpei/reflection/scene3'))
const HuangyanpeiReflection4 = lazy(() => import('@/pages/huangyanpei/reflection/scene4'))
const HuangyanpeiInternalization = lazy(() => import('@/pages/huangyanpei/internalization'))
//黄炎培 router
// 路径格式:/:moduleName/huangyanpei/:page
export const HuangyanpeiRoutes: RouteObject[] = [
{
path: "/:moduleName/huangyanpei",
path: '/:moduleName/huangyanpei',
element: <ResidenceLayout />,
children: [
{
index: true,
element: <HomePage />,
handle: {
videoSrc: "video/huangyanpei/huangyanpei_lukou.mp4",
videoSrc: 'video/huangyanpei/huangyanpei_lukou.mp4',
},
},
{
path: "home",
path: 'home',
element: <HomePage />,
handle: {
videoSrc: "video/huangyanpei/huangyanpei_lukou.mp4",
videoSrc: 'video/huangyanpei/huangyanpei_lukou.mp4',
},
},
{
path: "place1",
path: 'place1',
element: <HuangyanpeiPlace1 />,
handle: {
videoSrc: "video/huangyanpei/huangyanpei_01.mp4",
videoSrc: 'video/huangyanpei/huangyanpei_01.mp4',
},
},
{
path: "place2",
path: 'place2',
element: <HuangyanpeiPlace2 />,
handle: {
videoSrc: "video/huangyanpei/huangyanpei_02.mp4",
videoSrc: 'video/huangyanpei/huangyanpei_02.mp4',
},
},
{
path: "place3",
path: 'place3',
element: <HuangyanpeiPlace3 />,
handle: {
videoSrc: "video/huangyanpei/huangyanpei_03.mp4",
videoSrc: 'video/huangyanpei/huangyanpei_03.mp4',
},
},
{
path: "place4",
path: 'place4',
element: <HuangyanpeiPlace4 />,
handle: {
videoSrc: "video/huangyanpei/huangyanpei_04.mp4",
videoSrc: 'video/huangyanpei/huangyanpei_04.mp4',
},
},
{
path: "place5",
path: 'place5',
element: <HuangyanpeiPlace5 />,
handle: {
videoSrc: "video/huangyanpei/huangyanpei_06.mp4",
videoSrc: 'video/huangyanpei/huangyanpei_06.mp4',
},
},
{
path: "place6",
path: 'place6',
element: <HuangyanpeiPlace6 />,
handle: {
videoSrc: "video/huangyanpei/huangyanpei_08.mp4",
videoSrc: 'video/huangyanpei/huangyanpei_08.mp4',
},
},
{
path: "reflection",
path: 'reflection',
element: <HuangyanpeiReflection />,
},
{
path: "reflection2",
path: 'reflection2',
element: <HuangyanpeiReflection2 />,
},
{
path: "reflection3",
path: 'reflection3',
element: <HuangyanpeiReflection3 />,
},
{
path: "reflection4",
path: 'reflection4',
element: <HuangyanpeiReflection4 />,
},
{
path: "internalization",
path: 'internalization',
element: <HuangyanpeiInternalization />,
handle: {
videoSrc: "video/huangyanpei/internalization.mp4",
videoSrc: 'video/huangyanpei/internalization.mp4',
},
},
],
},
];
]
+6 -6
View File
@@ -1,6 +1,6 @@
export * from "./chenyun";
export * from "./maozedong";
export * from "./sunzhongshan";
export * from "./huangyanpei";
export * from "./luxun";
export * from "./zhangleping";
export * from './chenyun'
export * from './maozedong'
export * from './sunzhongshan'
export * from './huangyanpei'
export * from './luxun'
export * from './zhangleping'
+30 -32
View File
@@ -1,87 +1,85 @@
import { lazy } from "react";
import { RouteObject } from "react-router-dom";
import { ResidenceLayout } from "@/components/layout";
import { lazy } from 'react'
import { RouteObject } from 'react-router-dom'
import { ResidenceLayout } from '@/components/layout'
const HomePage = lazy(() => import("@/pages/luxun/home"));
const LuxunPlace1 = lazy(() => import("@/pages/luxun/place/place1"));
const LuxunPlace2 = lazy(() => import("@/pages/luxun/place/place2"));
const LuxunPlace3 = lazy(() => import("@/pages/luxun/place/place3"));
const LuxunPlace4 = lazy(() => import("@/pages/luxun/place/place4"));
const LuxunReflection = lazy(() => import("@/pages/luxun/reflection/scene1"));
const LuxunReflection2 = lazy(() => import("@/pages/luxun/reflection/scene2"));
const LuxunReflection3 = lazy(() => import("@/pages/luxun/reflection/scene3"));
const LuxunInternalization = lazy(
() => import("@/pages/luxun/internalization")
);
const HomePage = lazy(() => import('@/pages/luxun/home'))
const LuxunPlace1 = lazy(() => import('@/pages/luxun/place/place1'))
const LuxunPlace2 = lazy(() => import('@/pages/luxun/place/place2'))
const LuxunPlace3 = lazy(() => import('@/pages/luxun/place/place3'))
const LuxunPlace4 = lazy(() => import('@/pages/luxun/place/place4'))
const LuxunReflection = lazy(() => import('@/pages/luxun/reflection/scene1'))
const LuxunReflection2 = lazy(() => import('@/pages/luxun/reflection/scene2'))
const LuxunReflection3 = lazy(() => import('@/pages/luxun/reflection/scene3'))
const LuxunInternalization = lazy(() => import('@/pages/luxun/internalization'))
//鲁迅 router
// 路径格式:/:moduleName/luxun/:page
export const LuxunRoutes: RouteObject[] = [
{
path: "/:moduleName/luxun",
path: '/:moduleName/luxun',
element: <ResidenceLayout />,
children: [
{
index: true,
element: <HomePage />,
handle: {
videoSrc: "video/luxun/luxun_lukou.mp4",
videoSrc: 'video/luxun/luxun_lukou.mp4',
},
},
{
path: "home",
path: 'home',
element: <HomePage />,
handle: {
videoSrc: "video/luxun/luxun_lukou.mp4",
videoSrc: 'video/luxun/luxun_lukou.mp4',
},
},
{
path: "place1",
path: 'place1',
element: <LuxunPlace1 />,
handle: {
videoSrc: "video/luxun/luxun_01.mp4",
videoSrc: 'video/luxun/luxun_01.mp4',
},
},
{
path: "place2",
path: 'place2',
element: <LuxunPlace2 />,
handle: {
videoSrc: "video/luxun/luxun_02.mp4",
videoSrc: 'video/luxun/luxun_02.mp4',
},
},
{
path: "place3",
path: 'place3',
element: <LuxunPlace3 />,
handle: {
videoSrc: "video/luxun/luxun_03.mp4",
videoSrc: 'video/luxun/luxun_03.mp4',
},
},
{
path: "place4",
path: 'place4',
element: <LuxunPlace4 />,
handle: {
videoSrc: "video/luxun/luxun_05.mp4",
videoSrc: 'video/luxun/luxun_05.mp4',
},
},
{
path: "reflection",
path: 'reflection',
element: <LuxunReflection />,
},
{
path: "reflection2",
path: 'reflection2',
element: <LuxunReflection2 />,
},
{
path: "reflection3",
path: 'reflection3',
element: <LuxunReflection3 />,
},
{
path: "internalization",
path: 'internalization',
element: <LuxunInternalization />,
handle: {
videoSrc: "video/luxun/internalization.mp4",
videoSrc: 'video/luxun/internalization.mp4',
},
},
],
},
];
]
+20 -20
View File
@@ -1,59 +1,59 @@
import { lazy } from "react";
import { RouteObject } from "react-router-dom";
import { ResidenceLayout } from "@/components/layout";
import type { VideoRouteHandle } from "../types";
import { lazy } from 'react'
import { RouteObject } from 'react-router-dom'
import { ResidenceLayout } from '@/components/layout'
import type { VideoRouteHandle } from '../types'
const DemoPage = lazy(() => import("@/pages/maozedong/demo"));
const HomePage = lazy(() => import("@/pages/maozedong/home"));
const MaozedongPlace1 = lazy(() => import("@/pages/maozedong/place/place1"));
const MaozedongPlace2 = lazy(() => import("@/pages/maozedong/place/place2"));
const MaozedongPlace3 = lazy(() => import("@/pages/maozedong/place/place3"));
const MaozedongPlace4 = lazy(() => import("@/pages/maozedong/place/place4"));
const DemoPage = lazy(() => import('@/pages/maozedong/demo'))
const HomePage = lazy(() => import('@/pages/maozedong/home'))
const MaozedongPlace1 = lazy(() => import('@/pages/maozedong/place/place1'))
const MaozedongPlace2 = lazy(() => import('@/pages/maozedong/place/place2'))
const MaozedongPlace3 = lazy(() => import('@/pages/maozedong/place/place3'))
const MaozedongPlace4 = lazy(() => import('@/pages/maozedong/place/place4'))
//毛泽东 router
// 路径格式:/:moduleName/:starName/:page
export const MaozedongRoutes: RouteObject[] = [
{
path: "/:moduleName/maozedong",
path: '/:moduleName/maozedong',
element: <ResidenceLayout />,
children: [
{
index: true,
element: <HomePage />,
handle: {
videoSrc: "video/maozedong/mzd_guju_map.mp4",
videoSrc: 'video/maozedong/mzd_guju_map.mp4',
} as VideoRouteHandle,
},
{
path: "home",
path: 'home',
element: <HomePage />,
handle: {
videoSrc: "video/maozedong/mzd_guju_map.mp4",
videoSrc: 'video/maozedong/mzd_guju_map.mp4',
} as VideoRouteHandle,
},
//演示视频
{
path: "demo",
path: 'demo',
element: <DemoPage />,
// 没有 handle.videoSrc,直接渲染内容
},
// 对话模块
{
path: "place1",
path: 'place1',
element: <MaozedongPlace1 />,
},
{
path: "place2",
path: 'place2',
element: <MaozedongPlace2 />,
},
{
path: "place3",
path: 'place3',
element: <MaozedongPlace3 />,
},
{
path: "place4",
path: 'place4',
element: <MaozedongPlace4 />,
},
],
},
];
]
+32 -50
View File
@@ -1,108 +1,90 @@
import { lazy } from "react";
import { RouteObject } from "react-router-dom";
import { ResidenceLayout } from "@/components/layout";
import { lazy } from 'react'
import { RouteObject } from 'react-router-dom'
import { ResidenceLayout } from '@/components/layout'
const HomePage = lazy(() => import("@/pages/sunzhongshan/home"));
const SunzhongshanPlace1 = lazy(
() => import("@/pages/sunzhongshan/place/place1")
);
const SunzhongshanPlace2 = lazy(
() => import("@/pages/sunzhongshan/place/place2")
);
const SunzhongshanPlace3 = lazy(
() => import("@/pages/sunzhongshan/place/place3")
);
const SunzhongshanPlace4 = lazy(
() => import("@/pages/sunzhongshan/place/place4")
);
const SunzhongshanReflection = lazy(
() => import("@/pages/sunzhongshan/reflection/index")
);
const SunzhongshanReflectionScene1 = lazy(
() => import("@/pages/sunzhongshan/reflection/scene1")
);
const SunzhongshanReflectionScene2 = lazy(
() => import("@/pages/sunzhongshan/reflection/scene2")
);
const SunzhongshanReflectionScene3 = lazy(
() => import("@/pages/sunzhongshan/reflection/scene3")
);
const SunzhongshanInternalization = lazy(
() => import("@/pages/sunzhongshan/internalization")
);
const HomePage = lazy(() => import('@/pages/sunzhongshan/home'))
const SunzhongshanPlace1 = lazy(() => import('@/pages/sunzhongshan/place/place1'))
const SunzhongshanPlace2 = lazy(() => import('@/pages/sunzhongshan/place/place2'))
const SunzhongshanPlace3 = lazy(() => import('@/pages/sunzhongshan/place/place3'))
const SunzhongshanPlace4 = lazy(() => import('@/pages/sunzhongshan/place/place4'))
const SunzhongshanReflection = lazy(() => import('@/pages/sunzhongshan/reflection/index'))
const SunzhongshanReflectionScene1 = lazy(() => import('@/pages/sunzhongshan/reflection/scene1'))
const SunzhongshanReflectionScene2 = lazy(() => import('@/pages/sunzhongshan/reflection/scene2'))
const SunzhongshanReflectionScene3 = lazy(() => import('@/pages/sunzhongshan/reflection/scene3'))
const SunzhongshanInternalization = lazy(() => import('@/pages/sunzhongshan/internalization'))
//孙中山 router
// 路径格式:/:moduleName/sunzhongshan/:page
export const SunzhongshanRoutes: RouteObject[] = [
{
path: "/:moduleName/sunzhongshan",
path: '/:moduleName/sunzhongshan',
element: <ResidenceLayout />,
children: [
{
index: true,
element: <HomePage />,
handle: {
videoSrc: "video/sunzhongshan/sunzhongshan_lukou.mp4",
videoSrc: 'video/sunzhongshan/sunzhongshan_lukou.mp4',
},
},
{
path: "home",
path: 'home',
element: <HomePage />,
handle: {
videoSrc: "video/sunzhongshan/sunzhongshan_lukou.mp4",
videoSrc: 'video/sunzhongshan/sunzhongshan_lukou.mp4',
},
},
{
path: "place1",
path: 'place1',
element: <SunzhongshanPlace1 />,
handle: {
videoSrc: "video/sunzhongshan/sunzhongshan_01.mp4",
videoSrc: 'video/sunzhongshan/sunzhongshan_01.mp4',
},
},
{
path: "place2",
path: 'place2',
element: <SunzhongshanPlace2 />,
handle: {
videoSrc: "video/sunzhongshan/sunzhongshan_04.mp4",
videoSrc: 'video/sunzhongshan/sunzhongshan_04.mp4',
},
},
{
path: "place3",
path: 'place3',
element: <SunzhongshanPlace3 />,
handle: {
videoSrc: "video/sunzhongshan/sunzhongshan_07.mp4",
videoSrc: 'video/sunzhongshan/sunzhongshan_07.mp4',
},
},
{
path: "place4",
path: 'place4',
element: <SunzhongshanPlace4 />,
handle: {
videoSrc: "video/sunzhongshan/sunzhongshan_09.mp4",
videoSrc: 'video/sunzhongshan/sunzhongshan_09.mp4',
},
},
{
path: "reflection",
path: 'reflection',
element: <SunzhongshanReflection />,
},
{
path: "reflection1",
path: 'reflection1',
element: <SunzhongshanReflectionScene1 />,
},
{
path: "reflection2",
path: 'reflection2',
element: <SunzhongshanReflectionScene2 />,
},
{
path: "reflection3",
path: 'reflection3',
element: <SunzhongshanReflectionScene3 />,
},
{
path: "internalization",
path: 'internalization',
element: <SunzhongshanInternalization />,
handle: {
videoSrc: "video/sunzhongshan/internalization.mp4",
videoSrc: 'video/sunzhongshan/internalization.mp4',
},
},
],
},
];
]
+17 -29
View File
@@ -1,29 +1,19 @@
import { lazy } from "react";
import { RouteObject } from "react-router-dom";
import { ResidenceLayout } from "@/components/layout";
import { lazy } from 'react'
import { RouteObject } from 'react-router-dom'
import { ResidenceLayout } from '@/components/layout'
const HomePage = lazy(() => import("@/pages/zhangleping/home"));
const ZhanglepingPlace1 = lazy(
() => import("@/pages/zhangleping/place/place1")
);
const ZhanglepingPlace2 = lazy(
() => import("@/pages/zhangleping/place/place2")
);
const ZhanglepingPlace3 = lazy(
() => import("@/pages/zhangleping/place/place3")
);
const ZhanglepingPlace4 = lazy(
() => import("@/pages/zhangleping/place/place4")
);
const ZhanglepingPlace5 = lazy(
() => import("@/pages/zhangleping/place/place5")
);
const HomePage = lazy(() => import('@/pages/zhangleping/home'))
const ZhanglepingPlace1 = lazy(() => import('@/pages/zhangleping/place/place1'))
const ZhanglepingPlace2 = lazy(() => import('@/pages/zhangleping/place/place2'))
const ZhanglepingPlace3 = lazy(() => import('@/pages/zhangleping/place/place3'))
const ZhanglepingPlace4 = lazy(() => import('@/pages/zhangleping/place/place4'))
const ZhanglepingPlace5 = lazy(() => import('@/pages/zhangleping/place/place5'))
// 张乐平 router
// 路径格式:/:moduleName/zhangleping/:page
export const ZhanglepingRoutes: RouteObject[] = [
{
path: "/:moduleName/zhangleping",
path: '/:moduleName/zhangleping',
element: <ResidenceLayout />,
children: [
{
@@ -31,32 +21,30 @@ export const ZhanglepingRoutes: RouteObject[] = [
element: <HomePage />,
},
{
path: "home",
path: 'home',
element: <HomePage />,
},
// 对话模块
{
path: "place1",
path: 'place1',
element: <ZhanglepingPlace1 />,
},
{
path: "place2",
path: 'place2',
element: <ZhanglepingPlace2 />,
},
{
path: "place3",
path: 'place3',
element: <ZhanglepingPlace3 />,
},
{
path: "place4",
path: 'place4',
element: <ZhanglepingPlace4 />,
},
{
path: "place5",
path: 'place5',
element: <ZhanglepingPlace5 />,
},
],
},
];
]
+1 -2
View File
@@ -3,6 +3,5 @@
* 用于在路由配置中传递视频路径
*/
export interface VideoRouteHandle {
videoSrc?: string;
videoSrc?: string
}