diff --git a/src/layouts/UserLayout/UserLayout.vue b/src/layouts/UserLayout/UserLayout.vue new file mode 100644 index 0000000..be213e6 --- /dev/null +++ b/src/layouts/UserLayout/UserLayout.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/src/router/index.ts b/src/router/index.ts index 527dd02..724f449 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -2,6 +2,7 @@ import { createRouter, createWebHistory } from "vue-router"; import MainPage from "../layouts/MainPage/MainPage.vue"; import Login from "../views/Login/Login.vue"; import Page404 from "../views/404/index.vue"; +import UserLayout from "@/layouts/UserLayout/UserLayout.vue"; const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), @@ -18,9 +19,25 @@ const router = createRouter({ ], }, { - path: "/login", - name: "login", - component: Login, + path: "", + component: UserLayout, + children: [ + { + path: "/login", + name: "login", + component: Login, + }, + { + path: "/register", + name: "register", + component: () => import("@/views/Register/Register.vue"), + }, + { + path: "/changePassword", + name: "changePassword", + component: () => import("@/views/ChangePassword/ChangePassword.vue"), + }, + ], }, ], }); diff --git a/src/type/commands/ChangePasswordCommand.ts b/src/type/commands/ChangePasswordCommand.ts new file mode 100644 index 0000000..f41e6cf --- /dev/null +++ b/src/type/commands/ChangePasswordCommand.ts @@ -0,0 +1,6 @@ +export interface ChangePasswordByOTPCommand { + principal: string; + otp: string; + password: string; + reenteredPassword: string; +} diff --git a/src/type/commands/RegisterCommand.ts b/src/type/commands/RegisterCommand.ts new file mode 100644 index 0000000..867e08f --- /dev/null +++ b/src/type/commands/RegisterCommand.ts @@ -0,0 +1,7 @@ +export interface RegisterCommand { + principal: string; + username: string; + code: string; + password: string; + reenteredPassword: string; +} diff --git a/src/views/ChangePassword/ChangePassword.vue b/src/views/ChangePassword/ChangePassword.vue index f1cfff2..4d34c37 100644 --- a/src/views/ChangePassword/ChangePassword.vue +++ b/src/views/ChangePassword/ChangePassword.vue @@ -1,28 +1,149 @@ diff --git a/src/views/ChangePassword/components/ChangePasswordByOTP.vue b/src/views/ChangePassword/components/ChangePasswordByOTP.vue deleted file mode 100644 index dcc6d43..0000000 --- a/src/views/ChangePassword/components/ChangePasswordByOTP.vue +++ /dev/null @@ -1,179 +0,0 @@ - - - - - diff --git a/src/views/ChangePassword/components/ChangePasswordByPassword.vue b/src/views/ChangePassword/components/ChangePasswordByPassword.vue deleted file mode 100644 index 489b691..0000000 --- a/src/views/ChangePassword/components/ChangePasswordByPassword.vue +++ /dev/null @@ -1,159 +0,0 @@ - - - - - diff --git a/src/views/Login/Login.vue b/src/views/Login/Login.vue index 1a2dc37..a00d51e 100644 --- a/src/views/Login/Login.vue +++ b/src/views/Login/Login.vue @@ -1,8 +1,6 @@ - - diff --git a/src/views/Login/components/LoginByOTP.vue b/src/views/Login/components/LoginByOTP.vue index 667c014..3ac7a35 100644 --- a/src/views/Login/components/LoginByOTP.vue +++ b/src/views/Login/components/LoginByOTP.vue @@ -21,9 +21,9 @@ /> - + - +
- 忘记密码 - 免费注册 + + 免费注册 +
diff --git a/src/views/Login/components/LoginByPassword.vue b/src/views/Login/components/LoginByPassword.vue index e215762..fb81cad 100644 --- a/src/views/Login/components/LoginByPassword.vue +++ b/src/views/Login/components/LoginByPassword.vue @@ -18,7 +18,6 @@ placeholder="密码" v-model:value="model.password" type="password" - @input="handlePasswordInput" @keydown.enter.prevent />
@@ -48,8 +47,17 @@
- 忘记密码 - 免费注册 + + 忘记密码 + + + 免费注册 +
@@ -57,13 +65,12 @@ + +