diff --git a/AccountSettings/src/components/base.tsx b/AccountSettings/src/components/base.tsx index da90984a64d1fc3025bc5318890f34d697d14cd4..4eb85b67cd4279dbe840abd18fa23b164c6a536c 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.update.success' })); + } + }); + }; + 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..ecb9c190aa65e92eebf154276d3310ee9e027309 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.update.success': '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..5eda63fdf08f4b699bc62b8161f845228ef55fa2 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.update.success': '更新基本信息成功', '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..c1d8b0565dd0ec29ebaf494b4ebf0596eb5dd842 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.update.success': '更新基本信息成功', 'BLOCK_NAME.security.strong': '強', 'BLOCK_NAME.security.medium': '中', 'BLOCK_NAME.security.weak': '弱',