From 357e6d5468804ed71b4a6a078171cce1388d0df8 Mon Sep 17 00:00:00 2001 From: harry Date: Mon, 9 Mar 2020 17:09:13 +0800 Subject: [PATCH] =?UTF-8?q?fix=E5=88=87=E6=8D=A2=20=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=E6=9C=AA=E6=9B=B4=E6=96=B0=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/redux/reducers/ojForUserReducer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/redux/reducers/ojForUserReducer.js b/public/react/src/redux/reducers/ojForUserReducer.js index d20656513..60c3dc7af 100644 --- a/public/react/src/redux/reducers/ojForUserReducer.js +++ b/public/react/src/redux/reducers/ojForUserReducer.js @@ -17,7 +17,6 @@ const initialState = { commitTestRecordDetail: {}, // 调试代码执行结果 commitRecordDetail: {}, // 提交成功后记录提交的详情 commitRecord: [], // 提交记录 - userCode: '', // 保存当前用户输入的代码 isUpdateCode: false, // 是否更新了代码内容 userCodeTab: 'task', // 学员测评tab位置: task | record | comment userTestInput: '', // 用户自定义输入值 @@ -59,7 +58,7 @@ const ojForUserReducer = (state = initialState, action) => { hack: Object.assign({}, hack), test_case: Object.assign({}, test_case), comment_identifier: hack.identifier, - userCode: tempCode + editor_code: tempCode } case types.COMMIT_RECORD_DETAIL: let result = action.payload.data; @@ -127,7 +126,8 @@ const ojForUserReducer = (state = initialState, action) => { } return { ...state, - recordDetail: tempDetail + recordDetail: tempDetail, + editor_code: tempDetail['code'] } case types.RESTORE_INITIAL_CODE: const curHack = state.hack;