diff --git a/src/locales/en-US/login.js b/src/locales/en-US/login.js index 82c1c20f87281c58357e0242b8290d7016e7a4a1..195e59ce3239c64a33ed2d676bca7371bf376369 100644 --- a/src/locales/en-US/login.js +++ b/src/locales/en-US/login.js @@ -12,6 +12,8 @@ export default { 'app.login.login': 'Login', 'app.register.register': 'Register', 'app.register.get-verification-code': 'Get code', + 'app.login.verification-code-warning': + 'This project is a demo project and will not actually send you a verification code. Please switch to the account password login interface and log in as prompted.', 'app.register.sign-in': 'Already have an account?', 'app.register-result.msg': 'Account:registered at {email}', 'app.register-result.activation-email': diff --git a/src/locales/pt-BR/login.js b/src/locales/pt-BR/login.js index 453b3dac19c7a73d7776ed8163d27a59bca65de1..5e2d86954a2c0ee5d88046ebfbb6b008c866ccc9 100644 --- a/src/locales/pt-BR/login.js +++ b/src/locales/pt-BR/login.js @@ -13,6 +13,8 @@ export default { 'app.login.login': 'Login', 'app.register.register': 'Cadastro', 'app.register.get-verification-code': 'Recuperar código', + 'app.login.verification-code-warning': + 'This project is a demo project and will not actually send you a verification code. Please switch to the account password login interface and log in as prompted.', 'app.register.sign-in': 'Já tem uma conta?', 'app.register-result.msg': 'Conta:registrada em {email}', 'app.register-result.activation-email': diff --git a/src/locales/zh-CN/login.js b/src/locales/zh-CN/login.js index eb227207334ed3ea6e765313fad1f23b3d724dfc..e211e2cf282e5db88309693255208a4cfb439e05 100644 --- a/src/locales/zh-CN/login.js +++ b/src/locales/zh-CN/login.js @@ -12,6 +12,8 @@ export default { 'app.login.login': '登录', 'app.register.register': '注册', 'app.register.get-verification-code': '获取验证码', + 'app.login.verification-code-warning': + '此项目为演示项目,并不会真的给您发送验证码。请切换到账户密码登录界面按提示登录。', 'app.register.sign-in': '使用已有账户登录', 'app.register-result.msg': '你的账户:{email} 注册成功', 'app.register-result.activation-email': diff --git a/src/locales/zh-TW/login.js b/src/locales/zh-TW/login.js index ec5706a6c26e40c5029fb80ab2390b54e483cc69..fb916603913281e88e0dce927d84ff9335d1b0ea 100644 --- a/src/locales/zh-TW/login.js +++ b/src/locales/zh-TW/login.js @@ -12,6 +12,8 @@ export default { 'app.login.login': '登錄', 'app.register.register': '註冊', 'app.register.get-verification-code': '獲取驗證碼', + 'app.login.verification-code-warning': + '此項目為演示項目,並不會真的給您發送驗證碼。請切換到賬戶密碼登錄界面按提示登錄。', 'app.register.sign-in': '使用已有賬戶登錄', 'app.register-result.msg': '妳的賬戶:{email} 註冊成功', 'app.register-result.activation-email': diff --git a/src/pages/User/Login.js b/src/pages/User/Login.js index e3498bd3e4fc9ceafae9f5e3af63a1b066ef681a..29f59c89377d4c35065cf09592105b52aa64ba59 100644 --- a/src/pages/User/Login.js +++ b/src/pages/User/Login.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import { connect } from 'dva'; import { formatMessage, FormattedMessage } from 'umi-plugin-react/locale'; import Link from 'umi/link'; -import { Checkbox, Alert, Icon } from 'antd'; +import { Checkbox, Alert, message, Icon } from 'antd'; import Login from '@/components/Login'; import styles from './Login.less'; @@ -35,6 +35,7 @@ class LoginPage extends Component { }) .then(resolve) .catch(reject); + message.warning(formatMessage({ id: 'app.login.verification-code-warning' })); } }); }); diff --git a/src/pages/User/Register.js b/src/pages/User/Register.js index d685965f5f3da55b4a63fbce3ebc4c46a9bf0880..6aab8ffb6c70a4f286c5e3556d2828616c7bf28c 100644 --- a/src/pages/User/Register.js +++ b/src/pages/User/Register.js @@ -3,7 +3,7 @@ import { connect } from 'dva'; import { formatMessage, FormattedMessage } from 'umi-plugin-react/locale'; import Link from 'umi/link'; import router from 'umi/router'; -import { Form, Input, Button, Select, Row, Col, Popover, Progress } from 'antd'; +import { Form, Input, Button, message, Select, Row, Col, Popover, Progress } from 'antd'; import styles from './Register.less'; const FormItem = Form.Item; @@ -75,6 +75,7 @@ class Register extends Component { clearInterval(this.interval); } }, 1000); + message.warning(formatMessage({ id: 'app.login.verification-code-warning' })); }; getPasswordStatus = () => {