diff --git a/public/react/src/redux/actions/ojForm.js b/public/react/src/redux/actions/ojForm.js index d15bdce39..118295802 100644 --- a/public/react/src/redux/actions/ojForm.js +++ b/public/react/src/redux/actions/ojForm.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-20 16:35:46 * @LastEditors : tangjiang - * @LastEditTime : 2019-12-27 20:13:01 + * @LastEditTime : 2019-12-27 22:19:15 */ import types from './actionTypes'; import CONST from '../../constants'; @@ -298,9 +298,14 @@ export const validateOjForm = (props, type, cb) => { type: types.SAVE_OJ_FORM_ID, payload: identifier }); + + console.log(identifier , props.identifier); + if (identifier || props.identifier) { + dispatch(getOJFormById(identifier || props.identifier)); + } // 保存成功后,调用编辑接口并改变路 if (paramsObj['submitType'] === 'add' && identifier) { - dispatch(getOJFormById(identifier)); + props.history.push(`/problems/${identifier}/edit`); }; }