import React from 'react'; import { connect } from 'dva'; import { Form, Input, Button, Alert, Divider } from 'antd'; import { routerRedux } from 'dva/router'; import { digitUppercase } from '../../../utils/utils'; import styles from './style.less'; const formItemLayout = { labelCol: { span: 5, }, wrapperCol: { span: 19, }, }; @Form.create() class Step2 extends React.PureComponent { render() { const { form, data, dispatch, submitting } = this.props; const { getFieldDecorator, validateFields } = form; const onPrev = () => { dispatch(routerRedux.push('/Forms/StepForm')); }; const onValidateForm = e => { e.preventDefault(); validateFields((err, values) => { if (!err) { dispatch({ type: 'form/submitStepForm', payload: { ...data, ...values, }, }); } }); }; return (
{data.payAccount} {data.receiverAccount} {data.receiverName} {data.amount} ( {digitUppercase(data.amount)} ) {getFieldDecorator('password', { initialValue: '123456', rules: [ { required: true, message: '需要支付密码才能进行支付', }, ], })()} ); } } export default connect(({ form, loading }) => ({ submitting: loading.effects['form/submitStepForm'], data: form.step, }))(Step2);