From eabbd557891dcdb653ec46f210861b58b2f8a3c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com> Date: Mon, 14 Oct 2024 00:29:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9F=BA=E7=A1=80=E8=AE=BE=E6=96=BD?= =?UTF-8?q?=E6=90=AD=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yi.Watermelon.Vue3/src/layout/Index.vue | 21 ++ .../src/layout/Page/PageLayout.vue | 12 + Yi.Watermelon.Vue3/src/router/index.js | 33 +++ Yi.Watermelon.Vue3/src/views/error/401.vue | 85 +++++++ Yi.Watermelon.Vue3/src/views/error/404.vue | 228 ++++++++++++++++++ Yi.Watermelon.Vue3/src/views/home/Index.vue | 3 + Yi.Watermelon.Vue3/src/views/market/Index.vue | 11 + 7 files changed, 393 insertions(+) create mode 100644 Yi.Watermelon.Vue3/src/layout/Index.vue create mode 100644 Yi.Watermelon.Vue3/src/layout/Page/PageLayout.vue create mode 100644 Yi.Watermelon.Vue3/src/router/index.js create mode 100644 Yi.Watermelon.Vue3/src/views/error/401.vue create mode 100644 Yi.Watermelon.Vue3/src/views/error/404.vue create mode 100644 Yi.Watermelon.Vue3/src/views/home/Index.vue create mode 100644 Yi.Watermelon.Vue3/src/views/market/Index.vue diff --git a/Yi.Watermelon.Vue3/src/layout/Index.vue b/Yi.Watermelon.Vue3/src/layout/Index.vue new file mode 100644 index 00000000..e5561454 --- /dev/null +++ b/Yi.Watermelon.Vue3/src/layout/Index.vue @@ -0,0 +1,21 @@ + + + + + \ No newline at end of file diff --git a/Yi.Watermelon.Vue3/src/layout/Page/PageLayout.vue b/Yi.Watermelon.Vue3/src/layout/Page/PageLayout.vue new file mode 100644 index 00000000..250204e9 --- /dev/null +++ b/Yi.Watermelon.Vue3/src/layout/Page/PageLayout.vue @@ -0,0 +1,12 @@ + + \ No newline at end of file diff --git a/Yi.Watermelon.Vue3/src/router/index.js b/Yi.Watermelon.Vue3/src/router/index.js new file mode 100644 index 00000000..5df85897 --- /dev/null +++ b/Yi.Watermelon.Vue3/src/router/index.js @@ -0,0 +1,33 @@ +import { createRouter, createWebHistory } from "vue-router"; +import Layout from "../layout/Index.vue"; +// import NotFound from "../views/error/404.vue"; +const router = createRouter({ + history: createWebHistory(import.meta.env.BASE_URL), + scrollBehavior(to, from, savedPosition) { + // 始终滚动到顶部 + return { top: 0 }; + }, + routes: [ + { + path: "/", + name: "layout", + component: Layout, + redirect: "/index", + children: [ + { + name: "index", + path: "/index", + components:{ + default: ()=>import("../views/home/Index.vue"), + market: ()=>import("../views/market/Index.vue"), + } + }, + + ] + } + + // { path: "/:pathMatch(.*)*", name: "NotFound", component: NotFound }, + ], +}); + +export default router; \ No newline at end of file diff --git a/Yi.Watermelon.Vue3/src/views/error/401.vue b/Yi.Watermelon.Vue3/src/views/error/401.vue new file mode 100644 index 00000000..f4f6911b --- /dev/null +++ b/Yi.Watermelon.Vue3/src/views/error/401.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/Yi.Watermelon.Vue3/src/views/error/404.vue b/Yi.Watermelon.Vue3/src/views/error/404.vue new file mode 100644 index 00000000..acd383b7 --- /dev/null +++ b/Yi.Watermelon.Vue3/src/views/error/404.vue @@ -0,0 +1,228 @@ + + + + + diff --git a/Yi.Watermelon.Vue3/src/views/home/Index.vue b/Yi.Watermelon.Vue3/src/views/home/Index.vue new file mode 100644 index 00000000..faf6383b --- /dev/null +++ b/Yi.Watermelon.Vue3/src/views/home/Index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/Yi.Watermelon.Vue3/src/views/market/Index.vue b/Yi.Watermelon.Vue3/src/views/market/Index.vue new file mode 100644 index 00000000..bc44cf26 --- /dev/null +++ b/Yi.Watermelon.Vue3/src/views/market/Index.vue @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file