From 30390ddfba100ddb6823436dc22adf9e2e3f8d70 Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Tue, 7 Jan 2020 16:41:09 +0800 Subject: [PATCH] encode submit code --- public/react/src/redux/actions/ojForUser.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/react/src/redux/actions/ojForUser.js b/public/react/src/redux/actions/ojForUser.js index 718aad09f..6a8f49bd6 100644 --- a/public/react/src/redux/actions/ojForUser.js +++ b/public/react/src/redux/actions/ojForUser.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 13:42:11 * @LastEditors : tangjiang - * @LastEditTime : 2020-01-07 14:45:52 + * @LastEditTime : 2020-01-07 16:21:53 */ import types from "./actionTypes"; import { Base64 } from 'js-base64'; @@ -148,11 +148,12 @@ export const saveUserCodeForInterval = (identifier, code) => { * @param {*} type 测评类型 debug | submit */ export const updateCode = (identifier, inputValue, type) => { + console.log(1111); return (dispatch, getState) => { const { userCode, isUpdateCode } = getState().ojForUserReducer; if (isUpdateCode) { fetchUpdateCode(identifier, { - code: userCode + code: Base64.encode(userCode) }).then(res => { // 是否更新了代码, 目的是当代码没有更新时不调用更新代码接口,目录没有实现 // TODO 需要优化