From 2cbdb77af8fd750b5648b3f31c2c1eb7c4f330af Mon Sep 17 00:00:00 2001
From: wuyu <33444499+wuyu8512@users.noreply.github.com>
Date: Sun, 21 Jan 2024 22:37:43 +0800
Subject: [PATCH] up
---
src/services/user/index.ts | 12 +++---------
src/views/Login/Register.vue | 6 +++---
src/views/User/Profile.vue | 6 ++++++
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/services/user/index.ts b/src/services/user/index.ts
index 28d804e..4ab8942 100644
--- a/src/services/user/index.ts
+++ b/src/services/user/index.ts
@@ -74,18 +74,12 @@ export async function resetPassword(email: string, newPassword: string, code: st
})
}
-export async function register(
- userName: string,
- email: string,
- password: string,
- code: string,
- registerPassword: string
-) {
+export async function register(userName: string, email: string, password: string, code: string, inviteCode: string) {
const res = await requestWithFetch<
Types.Login.Res,
- { userName: string; email: string; code: string; password: string; registerPassword: string }
+ { userName: string; email: string; code: string; password: string; inviteCode: string }
>(PATH.USER_REGISTER, {
- payload: { userName, email, password, code, registerPassword }
+ payload: { userName, email, password, code, inviteCode }
})
sessionToken.set(res.Token)
diff --git a/src/views/Login/Register.vue b/src/views/Login/Register.vue
index efc9d2d..5e83f9d 100644
--- a/src/views/Login/Register.vue
+++ b/src/views/Login/Register.vue
@@ -58,7 +58,7 @@
发送验证码
-
+
@@ -98,7 +98,7 @@ const email = ref('')
const password = ref('')
const rePassword = ref('')
const code = ref('')
-const registerPassword = ref(null)
+const inviteCode = ref(null)
const isPwd = ref(true)
const loading = ref(false)
const sending = ref(false)
@@ -151,7 +151,7 @@ const _register = async () => {
email.value,
await sha256(password.value),
code.value,
- registerPassword.value
+ inviteCode.value
)
appStore.user = user
$q.notify({
diff --git a/src/views/User/Profile.vue b/src/views/User/Profile.vue
index 33ded9f..ba2f37c 100644
--- a/src/views/User/Profile.vue
+++ b/src/views/User/Profile.vue
@@ -132,6 +132,12 @@ const profileListOptions: Array> = [
icon: icon.mdiEmail,
copiable: true
},
+ {
+ label: '邀请码',
+ key: 'InviteCode',
+ icon: icon.mdiLockPlus,
+ copiable: true
+ },
{
label: '用户组',
key: 'UserGroup',