|
|
|
@ -4,7 +4,7 @@
|
|
|
|
|
* @Github:
|
|
|
|
|
* @Date: 2019-11-23 10:53:19
|
|
|
|
|
* @LastEditors : tangjiang
|
|
|
|
|
* @LastEditTime : 2019-12-27 10:25:14
|
|
|
|
|
* @LastEditTime : 2019-12-27 16:22:47
|
|
|
|
|
*/
|
|
|
|
|
import './index.scss';
|
|
|
|
|
import React, { useEffect, useState } from 'react';
|
|
|
|
@ -30,6 +30,7 @@ function StudentStudy (props) {
|
|
|
|
|
// hack_identifier,
|
|
|
|
|
// user_program_identifier,
|
|
|
|
|
restoreInitialCode,
|
|
|
|
|
changeUserCodeTab,
|
|
|
|
|
changeShowOrHideControl
|
|
|
|
|
} = props;
|
|
|
|
|
|
|
|
|
@ -39,13 +40,17 @@ function StudentStudy (props) {
|
|
|
|
|
saveUserProgramIdentifier
|
|
|
|
|
} = props;
|
|
|
|
|
|
|
|
|
|
let { id } = params;
|
|
|
|
|
let { id, tab } = params;
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
// 保存当前的id
|
|
|
|
|
saveUserProgramIdentifier(id);
|
|
|
|
|
// startProgramQuestion(id);
|
|
|
|
|
getUserProgramDetail(id);
|
|
|
|
|
|
|
|
|
|
if (tab) {
|
|
|
|
|
changeUserCodeTab(tab);
|
|
|
|
|
}
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
@ -176,7 +181,8 @@ const mapDispatchToProps = (dispatch) => ({
|
|
|
|
|
// 恢复初始代码
|
|
|
|
|
restoreInitialCode: (identifier, msg) => dispatch(actions.restoreInitialCode(identifier, msg)),
|
|
|
|
|
changeShowOrHideControl: (flag) => dispatch(actions.changeShowOrHideControl(flag)),
|
|
|
|
|
clearOjForUserReducer: () => dispatch(actions.clearOjForUserReducer())
|
|
|
|
|
clearOjForUserReducer: () => dispatch(actions.clearOjForUserReducer()),
|
|
|
|
|
changeUserCodeTab: (tab) => dispatch(actions.changeUserCodeTab(tab))
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export default withRouter(connect(
|
|
|
|
|