diff --git a/src/locales/en-US/form.js b/src/locales/en-US/form.js index 29f1f6a9ea7c69d900ba029b392c23b1c762dbb0..36e088d3e478f01e6130725e1fa7199f4831e425 100644 --- a/src/locales/en-US/form.js +++ b/src/locales/en-US/form.js @@ -1,5 +1,5 @@ export default { - 'form.captcha': 'Get Captcha', + 'form.get-captcha': 'Get Captcha', 'form.captcha.second': 'sec', 'form.optional': ' (optional) ', 'form.submit': 'Submit', diff --git a/src/locales/en-US/login.js b/src/locales/en-US/login.js index 963b7b59d3408d7732bca3c7926fdc45787ac704..82c1c20f87281c58357e0242b8290d7016e7a4a1 100644 --- a/src/locales/en-US/login.js +++ b/src/locales/en-US/login.js @@ -1,4 +1,6 @@ export default { + 'app.login.userName': 'userName', + 'app.login.password': 'password', 'app.login.message-invalid-credentials': 'Invalid username or password(admin/ant.design)', 'app.login.message-invalid-verification-code': 'Invalid verification code', 'app.login.tab-login-credentials': 'Credentials', @@ -18,6 +20,7 @@ export default { 'app.register-result.view-mailbox': 'View mailbox', 'validation.email.required': 'Please enter your email!', 'validation.email.wrong-format': 'The email address is in the wrong format!', + 'validation.userName.required': 'Please enter your userName!', 'validation.password.required': 'Please enter your password!', 'validation.password.twice': 'The passwords entered twice do not match!', 'validation.password.strength.msg': diff --git a/src/locales/pt-BR/form.js b/src/locales/pt-BR/form.js index 4b7b762c2d94407ca9f792f0217e71e3bc9959c7..ae8ec7dfeaff20da53d1021226a36cb97f489f8c 100644 --- a/src/locales/pt-BR/form.js +++ b/src/locales/pt-BR/form.js @@ -1,5 +1,5 @@ export default { - 'form.captcha': 'Get Captcha', + 'form.get-captcha': 'Get Captcha', 'form.captcha.second': 'sec', 'form.email.placeholder': 'Email', 'form.password.placeholder': 'Senha', diff --git a/src/locales/pt-BR/login.js b/src/locales/pt-BR/login.js index 447a0777f89f77b36221fbc422adf0857b11b9ea..453b3dac19c7a73d7776ed8163d27a59bca65de1 100644 --- a/src/locales/pt-BR/login.js +++ b/src/locales/pt-BR/login.js @@ -1,4 +1,6 @@ export default { + 'app.login.userName': 'Nome de usuário', + 'app.login.password': 'Sua senha', 'app.login.message-invalid-credentials': 'Nome de usuário ou senha inválidosd(admin/ant.design)', 'app.login.message-invalid-verification-code': 'Código de verificação inválido', @@ -19,6 +21,7 @@ export default { 'app.register-result.view-mailbox': 'Visualizar a caixa de email', 'validation.email.required': 'Por favor insira seu email!', 'validation.email.wrong-format': 'O email está errado!', + 'validation.userName.required': 'Por favor insira nome de usuário!', 'validation.password.required': 'Por favor insira sua senha!', 'validation.password.twice': 'As senhas não estão iguais!', 'validation.password.strength.msg': diff --git a/src/locales/zh-CN/form.js b/src/locales/zh-CN/form.js index 6de0406ab17b0dd5c3d2cf4d3f617b94f20a3d38..7f3bd9525001fc4bacb92890ca2ca5e46de22e6c 100644 --- a/src/locales/zh-CN/form.js +++ b/src/locales/zh-CN/form.js @@ -1,5 +1,5 @@ export default { - 'form.captcha': '获取验证码', + 'form.get-captcha': '获取验证码', 'form.captcha.second': '秒', 'form.optional': '(选填)', 'form.submit': '提交', @@ -7,7 +7,7 @@ export default { 'form.email.placeholder': '邮箱', 'form.password.placeholder': '至少6位密码,区分大小写', 'form.confirm-password.placeholder': '确认密码', - 'form.phone-number.placeholder': '位手机号', + 'form.phone-number.placeholder': '手机号', 'form.verification-code.placeholder': '验证码', 'form.title.label': '标题', 'form.title.placeholder': '给目标起个名字', diff --git a/src/locales/zh-CN/login.js b/src/locales/zh-CN/login.js index ddcde45017379edd949af9aae0ec9396f2fb2fa9..eb227207334ed3ea6e765313fad1f23b3d724dfc 100644 --- a/src/locales/zh-CN/login.js +++ b/src/locales/zh-CN/login.js @@ -1,4 +1,6 @@ export default { + 'app.login.userName': '用户名', + 'app.login.password': '密码', 'app.login.message-invalid-credentials': '账户或密码错误(admin/ant.design)', 'app.login.message-invalid-verification-code': '验证码错误', 'app.login.tab-login-credentials': '账户密码登录', @@ -18,6 +20,7 @@ export default { 'app.register-result.view-mailbox': '查看邮箱', 'validation.email.required': '请输入邮箱地址!', 'validation.email.wrong-format': '邮箱地址格式错误!', + 'validation.userName.required': '请输入用户名!', 'validation.password.required': '请输入密码!', 'validation.password.twice': '两次输入的密码不匹配!', 'validation.password.strength.msg': '请至少输入 6 个字符。请不要使用容易被猜到的密码。', diff --git a/src/locales/zh-TW/form.js b/src/locales/zh-TW/form.js index 82954dce253f3c59f58f75c4be12013fed249d6a..cf1adf548ed67450802adde1193382e7ea30e6fa 100644 --- a/src/locales/zh-TW/form.js +++ b/src/locales/zh-TW/form.js @@ -1,5 +1,5 @@ export default { - 'form.captcha': '獲取驗證碼', + 'form.get-captcha': '獲取驗證碼', 'form.captcha.second': '秒', 'form.optional': '(選填)', 'form.submit': '提交', @@ -7,7 +7,7 @@ export default { 'form.email.placeholder': '郵箱', 'form.password.placeholder': '至少6位密碼,區分大小寫', 'form.confirm-password.placeholder': '確認密碼', - 'form.phone-number.placeholder': '位手機號', + 'form.phone-number.placeholder': '手機號', 'form.verification-code.placeholder': '驗證碼', 'form.title.label': '標題', 'form.title.placeholder': '給目標起個名字', diff --git a/src/locales/zh-TW/login.js b/src/locales/zh-TW/login.js index 0442d8e524bbbb2fc7983fa66a75f573fc6659f8..ec5706a6c26e40c5029fb80ab2390b54e483cc69 100644 --- a/src/locales/zh-TW/login.js +++ b/src/locales/zh-TW/login.js @@ -1,4 +1,6 @@ export default { + 'app.login.userName': '賬戶', + 'app.login.password': '密碼', 'app.login.message-invalid-credentials': '賬戶或密碼錯誤(admin/ant.design)', 'app.login.message-invalid-verification-code': '驗證碼錯誤', 'app.login.tab-login-credentials': '賬戶密碼登錄', @@ -18,6 +20,7 @@ export default { 'app.register-result.view-mailbox': '查看郵箱', 'validation.email.required': '請輸入郵箱地址!', 'validation.email.wrong-format': '郵箱地址格式錯誤!', + 'validation.userName.required': '請輸入賬戶!', 'validation.password.required': '請輸入密碼!', 'validation.password.twice': '兩次輸入的密碼不匹配!', 'validation.password.strength.msg': '請至少輸入 6 個字符。請不要使用容易被猜到的密碼。', diff --git a/src/pages/User/Login.js b/src/pages/User/Login.js index 5036e607585c71b8a25af17bf3796635962698e5..54dd5c40d9282b50ff7003d709bbfbf3758a4d41 100644 --- a/src/pages/User/Login.js +++ b/src/pages/User/Login.js @@ -81,10 +81,25 @@ class LoginPage extends Component { login.type === 'account' && !submitting && this.renderMessage(formatMessage({ id: 'app.login.message-invalid-credentials' }))} - + this.loginForm.validateFields(this.handleSubmit)} /> @@ -95,13 +110,33 @@ class LoginPage extends Component { this.renderMessage( formatMessage({ id: 'app.login.message-invalid-verification-code' }) )} - +