mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-21 22:53:56 +08:00
fix:修复web端手机号码注册时遇到的问题
This commit is contained in:
+1
-1
@@ -70,7 +70,7 @@ public class LoginController {
|
||||
@Operation(summary = "短信验证码")
|
||||
public Result<Void> smsVerification(@RequestBody SmsVerificationDTO dto) {
|
||||
// 验证图形验证码
|
||||
boolean validate = captchaService.validate(dto.getCaptchaId(), dto.getCaptcha(), true);
|
||||
boolean validate = captchaService.validate(dto.getCaptchaId(), dto.getCaptcha(), false);
|
||||
if (!validate) {
|
||||
throw new RenException(ErrorCode.SMS_CAPTCHA_ERROR);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ class loginControllerTest {
|
||||
LoginDTO loginDTO = new LoginDTO();
|
||||
loginDTO.setUsername("手机号码");
|
||||
loginDTO.setPassword("密码");
|
||||
loginDTO.setCaptcha("123456");
|
||||
loginController.register(loginDTO);
|
||||
}
|
||||
|
||||
|
||||
@@ -384,6 +384,7 @@ export default {
|
||||
'register.registerSuccess': 'Registration successful!',
|
||||
'register.registerFailed': 'Registration failed',
|
||||
'register.passwordsNotMatch': 'The two passwords do not match',
|
||||
'register.secondsLater': 'seconds later',
|
||||
|
||||
// Retrieve password page text
|
||||
'retrievePassword.title': 'Reset Password',
|
||||
|
||||
@@ -384,6 +384,7 @@ export default {
|
||||
'register.registerSuccess': '注册成功!',
|
||||
'register.registerFailed': '注册失败',
|
||||
'register.passwordsNotMatch': '两次输入的密码不一致',
|
||||
'register.secondsLater': '秒后',
|
||||
|
||||
// 忘记密码页面文本
|
||||
'retrievePassword.title': '重置密码',
|
||||
|
||||
@@ -253,6 +253,7 @@ export default {
|
||||
'register.captchaSendSuccess': '驗證碼發送成功',
|
||||
'register.captchaSendFailed': '驗證碼發送失敗',
|
||||
'register.passwordsNotMatch': '兩次輸入的密碼不一致',
|
||||
'register.secondsLater': '秒後',
|
||||
'register.registerSuccess': '註冊成功!',
|
||||
'register.registerFailed': '註冊失敗',
|
||||
'register.requiredUsername': '用戶名不能為空',
|
||||
|
||||
@@ -353,7 +353,8 @@ export default {
|
||||
const registerData = {
|
||||
username: plainUsername,
|
||||
password: encryptedPassword,
|
||||
captchaId: this.form.captchaId
|
||||
captchaId: this.form.captchaId,
|
||||
mobileCaptcha: this.form.mobileCaptcha
|
||||
};
|
||||
|
||||
Api.user.register(registerData, ({ data }) => {
|
||||
|
||||
Reference in New Issue
Block a user