补齐登录之外的账号流程: - SkinSiteRegisterModal:邮箱验证码(60 秒倒计时)、密码与确认、 可选 QQ、按服务端配置显示邀请码,提交前走图片验证码。 - SkinSitePasswordResetModal:邮箱验证码、新密码与确认,同样走验证码。 - 登录弹窗底部增加「注册」「忘记密码」入口,取消或完成后回到登录。 - API 层补充注册、注册条件、邮箱验证码、密码重置接口。
This commit is contained in:
1 parent
d83a65a052
commit
3198eac35a
4 files changed
+625
No files matched your search
@@ -333,3 +333,52 @@ export function skinSiteRenamePlayer(
|
||||
{ method: 'POST', type: 'skin' },
|
||||
)
|
||||
}
|
||||
// ---------------------------------------------------------------------------
|
||||
// Registration & password reset
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/** Send the email verification code used during registration. */
|
||||
export function skinSiteRegisterEmailVerify(email: string): Promise<SkinSiteResponse<string>> {
|
||||
return skinSiteRequest<string>('register/emailVerify', {
|
||||
method: 'POST',
|
||||
body: { email },
|
||||
auth: false,
|
||||
})
|
||||
}
|
||||
|
||||
export function skinSiteRegister(payload: {
|
||||
qq?: number
|
||||
email: string
|
||||
emailVerifyCode: string
|
||||
password: string
|
||||
inviteCode?: string
|
||||
clientId: string
|
||||
}): Promise<SkinSiteResponse<SkinSiteLoginResult>> {
|
||||
return skinSiteRequest<SkinSiteLoginResult>('register', {
|
||||
method: 'POST',
|
||||
body: payload,
|
||||
auth: false,
|
||||
})
|
||||
}
|
||||
|
||||
/** Ask the server to email a reset code. Always answers success to avoid probing. */
|
||||
export function skinSitePasswordResetEmailVerify(email: string): Promise<SkinSiteResponse<string>> {
|
||||
return skinSiteRequest<string>('password/emailVerify', {
|
||||
method: 'POST',
|
||||
body: { email },
|
||||
auth: false,
|
||||
})
|
||||
}
|
||||
|
||||
export function skinSitePasswordReset(payload: {
|
||||
clientId: string
|
||||
email: string
|
||||
emailVerifyCode: string
|
||||
newPassword: string
|
||||
}): Promise<SkinSiteResponse<string>> {
|
||||
return skinSiteRequest<string>('password/reset', {
|
||||
method: 'POST',
|
||||
body: payload,
|
||||
auth: false,
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user