From 7448e29bcc2e7c1efb3496f8c6c70ae5edfb401d Mon Sep 17 00:00:00 2001 From: tangjiang <465264938@qq.com> Date: Fri, 29 Nov 2019 20:09:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/developer/studentStudy/index.js | 2 +- public/react/src/redux/actions/ojForUser.js | 12 ++++++------ public/react/src/redux/reducers/ojForUserReducer.js | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/developer/studentStudy/index.js b/public/react/src/modules/developer/studentStudy/index.js index f7fb90cbd..d3c11df91 100644 --- a/public/react/src/modules/developer/studentStudy/index.js +++ b/public/react/src/modules/developer/studentStudy/index.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-23 10:53:19 * @LastEditors: tangjiang - * @LastEditTime: 2019-11-29 19:15:25 + * @LastEditTime: 2019-11-29 20:00:34 */ import './index.scss'; import React, { useEffect } from 'react'; diff --git a/public/react/src/redux/actions/ojForUser.js b/public/react/src/redux/actions/ojForUser.js index 96132d935..66c0503e3 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: 2019-11-29 19:37:24 + * @LastEditTime: 2019-11-29 20:07:09 */ import types from "./actionTypes"; import { Base64 } from 'js-base64'; @@ -30,7 +30,7 @@ export const startProgramQuestion = (id, props) => { payload: identifier }); // 跳转至开启编程 - props.history.push(`/myproblems/${identifier}.json`); + props.history.push(`/myproblems/${identifier}`); // Redirect.to } }) @@ -40,8 +40,8 @@ export const startProgramQuestion = (id, props) => { // 获取用户编程题详情 export const getUserProgramDetail = (identifier) => { // 调用用户编程详情接口 - fetchUserProgramDetail(identifier).then(res => { - return (dispatch) => { + return (dispatch) => { + fetchUserProgramDetail(identifier).then(res => { const { status, data = {} } = res; if (status === 200) { dispatch({ @@ -49,8 +49,8 @@ export const getUserProgramDetail = (identifier) => { payload: data }); } - } - }); + }); + } } /** diff --git a/public/react/src/redux/reducers/ojForUserReducer.js b/public/react/src/redux/reducers/ojForUserReducer.js index 63ed6ed34..a15d7d4a7 100644 --- a/public/react/src/redux/reducers/ojForUserReducer.js +++ b/public/react/src/redux/reducers/ojForUserReducer.js @@ -4,7 +4,7 @@ * @Github: * @Date: 2019-11-27 13:41:48 * @LastEditors: tangjiang - * @LastEditTime: 2019-11-28 17:34:13 + * @LastEditTime: 2019-11-29 20:07:57 */ import types from "../actions/actionTypes"; import { Base64 } from 'js-base64';