diff --git a/projects/translate-h5/src/route/routes.tsx b/projects/translate-h5/src/route/routes.tsx index 5249734..91abe1c 100644 --- a/projects/translate-h5/src/route/routes.tsx +++ b/projects/translate-h5/src/route/routes.tsx @@ -14,6 +14,7 @@ const Home = lazy(() => import("@/view/home")); const Page404 = lazy(() => import("@/view/error/page404")); const TranslateDetail = lazy(() => import("@/view/home/detail")); const TranslateMood = lazy(() => import("@/view/home/mood")); +const TranslateArchives = lazy(() => import("@/view/home/archives")); export const routes: AppRoute[] = [ { path: "/", @@ -40,5 +41,13 @@ export const routes: AppRoute[] = [ title: "情绪监控", }, }, + { + path: "/translate/archives", + element: , + auth: false, + meta: { + title: "宠物档案", + }, + }, { path: "*", element: , auth: false }, ]; diff --git a/projects/translate-h5/src/view/archives/index.less b/projects/translate-h5/src/view/archives/index.less deleted file mode 100644 index e69de29..0000000 diff --git a/projects/translate-h5/src/view/archives/index.tsx b/projects/translate-h5/src/view/archives/index.tsx deleted file mode 100644 index efe1ada..0000000 --- a/projects/translate-h5/src/view/archives/index.tsx +++ /dev/null @@ -1,13 +0,0 @@ -// 档案 -import MainLayout from "@/layout/main/mainLayout"; -import "./index.less"; - -function Index() { - return ( - -
-
- ); -} - -export default Index; diff --git a/projects/translate-h5/src/view/home/archives/index.less b/projects/translate-h5/src/view/home/archives/index.less deleted file mode 100644 index e69de29..0000000 diff --git a/projects/translate-h5/src/view/home/archives/index.module.less b/projects/translate-h5/src/view/home/archives/index.module.less new file mode 100644 index 0000000..2ec7bad --- /dev/null +++ b/projects/translate-h5/src/view/home/archives/index.module.less @@ -0,0 +1,3 @@ +.archives { + padding: 12px; +} diff --git a/projects/translate-h5/src/view/home/archives/index.tsx b/projects/translate-h5/src/view/home/archives/index.tsx index efe1ada..ff72727 100644 --- a/projects/translate-h5/src/view/home/archives/index.tsx +++ b/projects/translate-h5/src/view/home/archives/index.tsx @@ -1,11 +1,11 @@ // 档案 import MainLayout from "@/layout/main/mainLayout"; -import "./index.less"; +import styles from "./index.module.less"; function Index() { return ( - -
+ +
档案
); } diff --git a/projects/translate-h5/src/view/home/index.tsx b/projects/translate-h5/src/view/home/index.tsx index 197810f..1988f22 100644 --- a/projects/translate-h5/src/view/home/index.tsx +++ b/projects/translate-h5/src/view/home/index.tsx @@ -10,8 +10,8 @@ function Index() { const [visible, setVisible] = useState(false); const navigate = useNavigate(); - const onLink = () => { - navigate("/translate/mood"); + const onLink = (link: string) => { + navigate(link); }; return ( @@ -26,9 +26,15 @@ function Index() { fill="#333" strokeWidth={3} strokeLinecap="butt" - onClick={onLink} + onClick={() => onLink("/translate/mood")} + /> + onLink("/translate/archives")} /> -