From e08ff212e308e9e1415776ba0388dc160553797f Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Fri, 27 Dec 2019 22:21:47 +0800 Subject: [PATCH] update test case --- public/react/src/redux/actions/ojForm.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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`); }; }