diff --git a/AccountSettings/src/components/base.tsx b/AccountSettings/src/components/base.tsx index da90984a64d1fc3025bc5318890f34d697d14cd4..deb72ce41786acf3a151787cc8c7f73d64d548b3 100644 --- a/AccountSettings/src/components/base.tsx +++ b/AccountSettings/src/components/base.tsx @@ -1,6 +1,6 @@ import React, { Component, Fragment } from 'react'; import { formatMessage, FormattedMessage } from 'umi-plugin-react/locale'; -import { Form, Input, Upload, Select, Button } from 'antd'; +import { Form, Input, Upload, Select, Button, message } from 'antd'; import { FormComponentProps } from 'antd/lib/form'; import { connect } from 'dva'; import styles from './BaseView.less'; @@ -102,6 +102,16 @@ class BaseView extends Component { this.view = ref; }; + handlerSubmit = (event: Event) => { + event.preventDefault(); + const { form } = this.props; + form.validateFields((err, values) => { + if (!err) { + message.success(formatMessage({ id: 'BLOCK_NAME.basic.updatesucc' })); + } + }); + }; + render() { const { form: { getFieldDecorator }, @@ -193,7 +203,7 @@ class BaseView extends Component { ], })()} - diff --git a/AccountSettings/src/locales/en-US.ts b/AccountSettings/src/locales/en-US.ts index aab0f68db624474e8f1e43686648c6391af1fd9d..e939ca478edd595bf3669ae8522f1e87497c8993 100644 --- a/AccountSettings/src/locales/en-US.ts +++ b/AccountSettings/src/locales/en-US.ts @@ -21,6 +21,7 @@ export default { 'BLOCK_NAME.basic.phone': 'Phone Number', 'BLOCK_NAME.basic.phone-message': 'Please input your phone!', 'BLOCK_NAME.basic.update': 'Update Information', + 'BLOCK_NAME.basic.updatesucc': 'Update basic information successfully', 'BLOCK_NAME.security.strong': 'Strong', 'BLOCK_NAME.security.medium': 'Medium', 'BLOCK_NAME.security.weak': 'Weak', diff --git a/AccountSettings/src/locales/zh-CN.ts b/AccountSettings/src/locales/zh-CN.ts index 29c5674b831184c5967a1c2982f9a8773c71678c..cc6d766656218b791dd360f9a1e63bbc89244a9e 100644 --- a/AccountSettings/src/locales/zh-CN.ts +++ b/AccountSettings/src/locales/zh-CN.ts @@ -21,6 +21,7 @@ export default { 'BLOCK_NAME.basic.phone': '联系电话', 'BLOCK_NAME.basic.phone-message': '请输入您的联系电话!', 'BLOCK_NAME.basic.update': '更新基本信息', + 'BLOCK_NAME.basic.updatesucc': '更新基本信息成功', 'BLOCK_NAME.security.strong': '强', 'BLOCK_NAME.security.medium': '中', 'BLOCK_NAME.security.weak': '弱', diff --git a/AccountSettings/src/locales/zh-TW.ts b/AccountSettings/src/locales/zh-TW.ts index a65cf7e96dad48d3cce631bd4e199eab9ec13d2e..d466c24a7ff13ff817e87b08744adffb003b48f4 100644 --- a/AccountSettings/src/locales/zh-TW.ts +++ b/AccountSettings/src/locales/zh-TW.ts @@ -21,6 +21,7 @@ export default { 'BLOCK_NAME.basic.phone': '聯系電話', 'BLOCK_NAME.basic.phone-message': '請輸入您的聯系電話!', 'BLOCK_NAME.basic.update': '更新基本信息', + 'BLOCK_NAME.basic.updatesucc': '更新基本信息成功', 'BLOCK_NAME.security.strong': '強', 'BLOCK_NAME.security.medium': '中', 'BLOCK_NAME.security.weak': '弱',