diff --git a/public/react/src/redux/actions/ojForm.js b/public/react/src/redux/actions/ojForm.js index e6fe1309e..3a66c99e5 100644 --- a/public/react/src/redux/actions/ojForm.js +++ b/public/react/src/redux/actions/ojForm.js @@ -1,14 +1,14 @@ /* * @Description: 开发者社区编辑模块 * @Author: tangjiang - * @Github: + * @Github: * @Date: 2019-11-20 16:35:46 * @LastEditors : tangjiang * @LastEditTime : 2020-02-11 16:29:32 */ import types from './actionTypes'; import CONST from '../../constants'; -import { +import { fetchPostOjForm, fetchGetOjById, publishTask, @@ -18,7 +18,7 @@ import { } from '../../services/ojService'; import { Base64 } from 'js-base64'; import { notification } from 'antd'; -import { toStore } from 'educoder'; +import { toStore } from 'educoder'; // import { startProgramQuestion } from '' const { jcLabel } = CONST; // 表单字段映射 @@ -124,7 +124,7 @@ export const validateOjForm = (props, type, cb) => { hasSuccess = false; dispatch( { - type: maps[key].type, + type: maps[key].type, payload: payloadInfo(key, value, errMsg, validateResult[key]) } ) @@ -168,14 +168,14 @@ export const validateOjForm = (props, type, cb) => { tcValidResult.push(tempObj); }); - if (testCases.length === 0) { - hasSuccess = false; - notification['error']({ - message: '提示', - description: '测试用例必须输入!' - }); - } - + // if (testCases.length === 0) { + // hasSuccess = false; + // notification['error']({ + // message: '提示', + // description: '测试用例必须输入!' + // }); + // } + // if (!code) { // hasSuccess = false; // notification['error']({ @@ -300,7 +300,7 @@ export const validateOjForm = (props, type, cb) => { cb && cb(); } else { const {identifier} = res.data; - + // message.success(paramsObj['submitType'] === 'update' ? '更新成功' : '保存成功'); notification.success({ message: '提示', @@ -311,7 +311,7 @@ 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)); @@ -443,7 +443,7 @@ export const saveOjFormCode = (value) => { payload: value }; } -// 验证任务名称 +// 验证任务名称 export const validateOJName = (value) => { const validate = emptyValidate('name', value)['name']; const errMsg = validate.errMsg; @@ -735,9 +735,9 @@ export const saveKnowledge = (values) => { } /** - * 新增时跳转到OJ时带的默认参数: - * @param {}} params - * { + * 新增时跳转到OJ时带的默认参数: + * @param {}} params + * { * difficult: '', // 难易度 * sub_discipline_id: '' // 课程方向 * tag_discipline_id: [] 知识点 @@ -767,7 +767,7 @@ export const tagDisciplines = (params) => { } }); } -} +} // 保存地址栏参数 export const saveSearchParams = (params) => {