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