Commit d00bec8c authored by 陈帅's avatar 陈帅

bigfix: fix step from page

parent f23ea6b8
...@@ -25,7 +25,7 @@ export default { ...@@ -25,7 +25,7 @@ export default {
type: 'saveStepFormData', type: 'saveStepFormData',
payload, payload,
}); });
yield put(routerRedux.push('/Forms/StepForm/Step3')); yield put(routerRedux.push('/form/step-form/result'));
}, },
*submitAdvancedForm({ payload }, { call }) { *submitAdvancedForm({ payload }, { call }) {
yield call(fakeSubmitForm, payload); yield call(fakeSubmitForm, payload);
......
...@@ -27,7 +27,7 @@ class Step1 extends React.PureComponent { ...@@ -27,7 +27,7 @@ class Step1 extends React.PureComponent {
type: 'form/saveStepFormData', type: 'form/saveStepFormData',
payload: values, payload: values,
}); });
dispatch(routerRedux.push('/Forms/StepForm/Step2')); dispatch(routerRedux.push('/form/step-form/confirm'));
} }
}); });
}; };
......
...@@ -20,7 +20,7 @@ class Step2 extends React.PureComponent { ...@@ -20,7 +20,7 @@ class Step2 extends React.PureComponent {
const { form, data, dispatch, submitting } = this.props; const { form, data, dispatch, submitting } = this.props;
const { getFieldDecorator, validateFields } = form; const { getFieldDecorator, validateFields } = form;
const onPrev = () => { const onPrev = () => {
dispatch(routerRedux.push('/Forms/StepForm')); dispatch(routerRedux.push('/form/step-form/info'));
}; };
const onValidateForm = e => { const onValidateForm = e => {
e.preventDefault(); e.preventDefault();
......
...@@ -9,7 +9,7 @@ class Step3 extends React.PureComponent { ...@@ -9,7 +9,7 @@ class Step3 extends React.PureComponent {
render() { render() {
const { dispatch, data } = this.props; const { dispatch, data } = this.props;
const onFinish = () => { const onFinish = () => {
dispatch(routerRedux.push('/Forms/StepForm')); dispatch(routerRedux.push('/form/step-form/info'));
}; };
const information = ( const information = (
<div className={styles.information}> <div className={styles.information}>
......
...@@ -14,11 +14,11 @@ export default class StepForm extends PureComponent { ...@@ -14,11 +14,11 @@ export default class StepForm extends PureComponent {
const { pathname } = location; const { pathname } = location;
const pathList = pathname.split('/'); const pathList = pathname.split('/');
switch (pathList[pathList.length - 1]) { switch (pathList[pathList.length - 1]) {
case 'Step1': case 'info':
return 0; return 0;
case 'Step2': case 'confirm':
return 1; return 1;
case 'Step3': case 'result':
return 2; return 2;
default: default:
return 0; return 0;
...@@ -41,18 +41,6 @@ export default class StepForm extends PureComponent { ...@@ -41,18 +41,6 @@ export default class StepForm extends PureComponent {
<Step title="完成" /> <Step title="完成" />
</Steps> </Steps>
{children} {children}
{/* <Switch>
{getRoutes(match.path, routerData).map(item => (
<Route
key={item.key}
path={item.path}
component={item.component}
exact={item.exact}
/>
))}
<Redirect exact from="/form/step-form" to="/form/step-form/info" />
<Redirect to="/exception/404" />
</Switch> */}
</Fragment> </Fragment>
</Card> </Card>
</PageHeaderLayout> </PageHeaderLayout>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment