diff --git a/public/react/src/modules/developer/components/myMonacoEditor/index.js b/public/react/src/modules/developer/components/myMonacoEditor/index.js index 383c4dd63..23483bd1c 100644 --- a/public/react/src/modules/developer/components/myMonacoEditor/index.js +++ b/public/react/src/modules/developer/components/myMonacoEditor/index.js @@ -48,7 +48,6 @@ function MyMonacoEditor(props, ref) { }); const [height, setHeight] = useState('calc(100% - 56px)'); const editorRef = useRef(null); - console.log(language, code, '-------========----------') useEffect(() => { setHeight(showOrHideControl ? 'calc(100% - 378px)' : 'calc(100% - 56px)'); diff --git a/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js b/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js index 5150de25f..bbee6f858 100644 --- a/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js +++ b/public/react/src/modules/developer/newOrEditTask/leftpane/editorTab/index.js @@ -359,15 +359,11 @@ class EditTab extends React.Component { values.forEach(v => { _result.push(v.id); }); - // console.log('下拉选择的值:===>>>', _result); - // 保存选择的知识点 this.props.saveTagDisciplineId(_result); } // 新增知识点 const handleAddKnowledge = (values) => { - // console.log('调用了新增知识点并返回了结果: ', values); - // 获取课程id const { sub_discipline_id } = this.props.ojForm; const obj = Object.assign({}, values, { sub_discipline_id }) tagDisciplines(obj); @@ -395,14 +391,6 @@ class EditTab extends React.Component { help={ojFormValidate.sub_discipline_id.errMsg} colon={false} > - {/* */} - {/* */} {renderCourseQuestion(courseQuestions)} diff --git a/public/react/src/modules/developer/studentStudy/index.js b/public/react/src/modules/developer/studentStudy/index.js index eb4bd4ae3..185c292a4 100644 --- a/public/react/src/modules/developer/studentStudy/index.js +++ b/public/react/src/modules/developer/studentStudy/index.js @@ -15,7 +15,11 @@ import RightPane from './rightpane'; import { Icon } from 'antd'; import UserInfo from '../components/userInfo'; import actions from '../../../redux/actions'; +<<<<<<< HEAD import { CNotificationHOC } from 'educoder'; +======= +import { fromStore, CNotificationHOC } from 'educoder'; +>>>>>>> 73d555c... fix import { withRouter } from 'react-router'; function StudentStudy(props) { @@ -45,18 +49,18 @@ function StudentStudy(props) { // 保存当前的id saveUserProgramIdentifier(id); // startProgramQuestion(id); - // console.log("getUserProgramDetail(id)"); - // console.log(id); - // console.log(id.charAt(id.length-1)); - try { - if(id.charAt(id.length-1)==="?"){ - id = id.substring(0, id.length - 1); - } - }catch (e) { + // console.log("getUserProgramDetail(id)"); + // console.log(id); + // console.log(id.charAt(id.length-1)); + try { + if (id.charAt(id.length - 1) === "?") { + id = id.substring(0, id.length - 1); + } + } catch (e) { - } + } - getUserProgramDetail(id); + getUserProgramDetail(id); const $searchs = window.location.search && window.location.search.substring(1); if ($searchs) { const $params = $searchs.split('&') || []; @@ -65,7 +69,7 @@ function StudentStudy(props) { const keys = item.split('='); obj[keys[0]] = keys[1]; }); - saveSearchParams({searchParams: $searchs, curPage: obj['pages']}); + saveSearchParams({ searchParams: $searchs, curPage: obj['pages'] }); } if (tab) { changeUserCodeTab(tab); @@ -73,12 +77,11 @@ function StudentStudy(props) { }, []); useEffect(() => { - const { hack = {} } = props; - if (hack.modify_code && hasUpdate) { // 代码更改,提示是否需要更新代码 + if (hack && hack.modify_code && hasUpdate) { // 代码更改,提示是否需要更新代码 setHasUpdate(false); handleUpdateNotice(); } - }, [props, hasUpdate, setHasUpdate]); + }, [hack, hasUpdate]); const handleUpdateNotice = () => { console.log(props); @@ -182,7 +185,7 @@ function StudentStudy(props) { const mapStateToProps = (state) => { const { userInfo } = state.userReducer; - const { hack_identifier, user_program_identifier, hack } = state.ojForUserReducer; + const { hack_identifier, user_program_identifier, hack } = state.ojForUserReducer; const { searchParams } = state.ojFormReducer; return { hack,