update code not show

dev_tpm_ui
tangjiang 5 years ago
parent db90d19ddc
commit 30a5d8bec5

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-11-20 16:35:46 * @Date: 2019-11-20 16:35:46
* @LastEditors : tangjiang * @LastEditors : tangjiang
* @LastEditTime : 2019-12-27 20:03:12 * @LastEditTime : 2019-12-27 20:13:01
*/ */
import types from './actionTypes'; import types from './actionTypes';
import CONST from '../../constants'; import CONST from '../../constants';
@ -287,11 +287,7 @@ export const validateOjForm = (props, type, cb) => {
cb && cb(); cb && cb();
} else { } else {
const {identifier} = res.data; const {identifier} = res.data;
// if (paramsObj['submitType'] === 'add' && identifier) {
// dispatch(validateOjForm(props, 'update'));
// props.history.push(`/problems/${identifier}/edit`);
// return;
// };
// message.success(paramsObj['submitType'] === 'update' ? '更新成功' : '保存成功'); // message.success(paramsObj['submitType'] === 'update' ? '更新成功' : '保存成功');
notification.success({ notification.success({
message: '提示', message: '提示',
@ -302,6 +298,11 @@ export const validateOjForm = (props, type, cb) => {
type: types.SAVE_OJ_FORM_ID, type: types.SAVE_OJ_FORM_ID,
payload: identifier payload: identifier
}); });
// 保存成功后,调用编辑接口并改变路
if (paramsObj['submitType'] === 'add' && identifier) {
dispatch(getOJFormById(identifier));
props.history.push(`/problems/${identifier}/edit`);
};
} }
// 保存或更新后调用start接口 // 保存或更新后调用start接口
// linkToDev(dispatch, props); // linkToDev(dispatch, props);

Loading…
Cancel
Save