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',