diff --git a/src/routes/User/Register.js b/src/routes/User/Register.js index 77b365051e7f702fdd2b5ccfc08d8a350c691aba..3521ea777073e1ac4f82aa27adb15dca76050896 100644 --- a/src/routes/User/Register.js +++ b/src/routes/User/Register.js @@ -35,8 +35,14 @@ export default class Register extends Component { }; componentWillReceiveProps(nextProps) { + const account = this.props.form.getFieldValue('mail'); if (nextProps.register.status === 'ok') { - this.props.dispatch(routerRedux.push('/user/register-result')); + this.props.dispatch(routerRedux.push({ + pathname: '/user/register-result', + state: { + account, + }, + })); } } diff --git a/src/routes/User/RegisterResult.js b/src/routes/User/RegisterResult.js index e86cffbd9a89024ae5963b0db373fb0a634a68be..22c83080e3b81c5db477548c3bcc36bb06bd7fe6 100644 --- a/src/routes/User/RegisterResult.js +++ b/src/routes/User/RegisterResult.js @@ -4,8 +4,6 @@ import { Link } from 'dva/router'; import Result from '../../components/Result'; import styles from './RegisterResult.less'; -const title =
你的账户:AntDesign@example.com 注册成功
; - const actions = (
@@ -13,11 +11,11 @@ const actions = (
); -export default () => ( +export default ({ location }) => ( 你的账户:{location.state && location.state.account} 注册成功} description="激活邮件已发送到你的邮箱中,邮件有效期为24小时。请及时登录邮箱,点击邮件中的链接激活帐户。" actions={actions} style={{ marginTop: 56 }}