From 8924f3c3a8f234c86faa5e99337fc7df1afa912e Mon Sep 17 00:00:00 2001 From: elevensky <346800989@qq.com> Date: Thu, 18 Jan 2018 00:47:26 +0800 Subject: [PATCH] fix user account in register-result (#695) * fix user account in register-result * fix up * fix account name undefined * location field state --- src/routes/User/Register.js | 8 +++++++- src/routes/User/RegisterResult.js | 6 ++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/routes/User/Register.js b/src/routes/User/Register.js index 77b36505..3521ea77 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 e86cffbd..22c83080 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 =