|
|
|
@ -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
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|