Commit d00bec8c authored by 陈帅's avatar 陈帅

bigfix: fix step from page

parent f23ea6b8
......@@ -25,7 +25,7 @@ export default {
type: 'saveStepFormData',
payload,
});
yield put(routerRedux.push('/Forms/StepForm/Step3'));
yield put(routerRedux.push('/form/step-form/result'));
},
*submitAdvancedForm({ payload }, { call }) {
yield call(fakeSubmitForm, payload);
......
......@@ -27,7 +27,7 @@ class Step1 extends React.PureComponent {
type: 'form/saveStepFormData',
payload: values,
});
dispatch(routerRedux.push('/Forms/StepForm/Step2'));
dispatch(routerRedux.push('/form/step-form/confirm'));
}
});
};
......
......@@ -20,7 +20,7 @@ class Step2 extends React.PureComponent {
const { form, data, dispatch, submitting } = this.props;
const { getFieldDecorator, validateFields } = form;
const onPrev = () => {
dispatch(routerRedux.push('/Forms/StepForm'));
dispatch(routerRedux.push('/form/step-form/info'));
};
const onValidateForm = e => {
e.preventDefault();
......
......@@ -9,7 +9,7 @@ class Step3 extends React.PureComponent {
render() {
const { dispatch, data } = this.props;
const onFinish = () => {
dispatch(routerRedux.push('/Forms/StepForm'));
dispatch(routerRedux.push('/form/step-form/info'));
};
const information = (
<div className={styles.information}>
......
......@@ -14,11 +14,11 @@ export default class StepForm extends PureComponent {
const { pathname } = location;
const pathList = pathname.split('/');
switch (pathList[pathList.length - 1]) {
case 'Step1':
case 'info':
return 0;
case 'Step2':
case 'confirm':
return 1;
case 'Step3':
case 'result':
return 2;
default:
return 0;
......@@ -41,18 +41,6 @@ export default class StepForm extends PureComponent {
<Step title="完成" />
</Steps>
{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>
</Card>
</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