refactor: 重构登陆模块

This commit is contained in:
2025-12-20 21:38:49 +07:00
parent 3d9785fdf2
commit 57bbebe961
28 changed files with 715 additions and 494 deletions

14
src/router/auth.ts Normal file
View File

@@ -0,0 +1,14 @@
import type { RouteRecordRaw } from "vue-router";
const routes: Array<RouteRecordRaw> = [
{
path: "/auth/login",
component: () => import("@/views/auth/login/index.vue"),
},
{
path: "/auth/signup",
component: () => import("@/auth/components/signup/index.vue"),
},
];
export default routes;

View File

@@ -1,5 +1,6 @@
import type { RouteRecordRaw } from "vue-router";
import { createRouter, createWebHistory } from "@ionic/vue-router";
import authRoutes from "./auth";
import { createRouterGuard } from "./guard";
const routes: Array<RouteRecordRaw> = [
@@ -11,6 +12,7 @@ const routes: Array<RouteRecordRaw> = [
path: "/:pathMatch(.*)*",
redirect: "/layout/riwa",
},
...authRoutes,
{
path: "/layout",
component: () => import("@/components/layout/default.vue"),