调整一下

chromesetting
杨树林 5 years ago
commit 62a50ab744

@ -41,7 +41,9 @@ json.top do
json.old_url @old_domain json.old_url @old_domain
# 云上实验室管理权限 # 云上实验室管理权限
json.laboratory_user current_laboratory.laboratory_users.exists?(user_id: @user&.id) || @user&.admin_or_business? laboratory_user = current_laboratory.laboratory_users.exists?(user_id: @user&.id) || @user&.admin_or_business?
json.laboratory_user laboratory_user
json.laboratory_admin_url laboratory_user ? "/cooperative" : nil
end end
json.down do json.down do

@ -45,11 +45,13 @@ class College extends Component {
align: 'center', align: 'center',
className: "edu-txt-center font-14 maxnamewidth340", className: "edu-txt-center font-14 maxnamewidth340",
render: (text, record) => ( render: (text, record) => (
<span className="maxnamewidth340"> <a className="maxnamewidth340" title={record.teachers} style={{
color:'#05101A'
}}>
{ {
record.teachers record.teachers
} }
</span> </a >
) )
}, },
{ {

@ -235,7 +235,7 @@ class EditTab extends React.Component {
['image', 'formula'], // 数学公式、图片、视频 ['image', 'formula'], // 数学公式、图片、视频
['clean'], // 清除格式 ['clean'], // 清除格式
]; ];
return ( return (
<div className={'editor_area'} id="textCase"> <div className={'editor_area'} id="textCase">
<Form className={'editor_form'}> <Form className={'editor_form'}>
@ -309,15 +309,15 @@ class EditTab extends React.Component {
colon={ false } colon={ false }
> >
<div style={{ marginTop: '15px'}}> <div style={{ marginTop: '15px'}}>
<QuillForEditor <QuillForEditor
style={{ height: '200px', 'overflowY': 'auto' }} style={{ height: '200px', 'overflowY': 'auto' }}
placeholder="请输入描述信息" placeholder="请输入描述信息"
onContentChange={handleContentChange} onContentChange={handleContentChange}
options={quillConfig} options={quillConfig}
value={ojForm.description} value={ojForm.description}
/> />
</div> </div>
</FormItem> </FormItem>
{/* <FormItem {/* <FormItem
@ -331,7 +331,7 @@ class EditTab extends React.Component {
{getOptions('openOrNot')} {getOptions('openOrNot')}
</Select> </Select>
</FormItem> */} </FormItem> */}
</Form> </Form>
{/* 添加测试用例 */} {/* 添加测试用例 */}

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-12-04 08:36:21 * @Date: 2019-12-04 08:36:21
* @LastEditors: tangjiang * @LastEditors: tangjiang
* @LastEditTime: 2019-12-10 18:55:02 * @LastEditTime: 2019-12-20 10:38:00
*/ */
import './index.scss'; import './index.scss';
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
@ -79,7 +79,7 @@ function RecordDetail (props) {
</div> </div>
<div className="detail_ctx_status"> <div className="detail_ctx_status">
<span className="status_label"> <span className="status_label">
状态: <span className="status_label_error">{reviewResult[detail.status]}</span> 状态: <span className={detail.status === 0 ? 'status_label_success' : 'status_label_error'}>{reviewResult[detail.status]}</span>
</span> </span>
<span className="status_label"> <span className="status_label">
提交时间: <span className="status_label_sub"> 提交时间: <span className="status_label_sub">
@ -89,6 +89,7 @@ function RecordDetail (props) {
<span className="status_label"> <span className="status_label">
语言: <span className="status_label_sub">C</span> 语言: <span className="status_label_sub">C</span>
</span> </span>
{/* <span className> */}
</div> </div>
<div className="result_error_area"> <div className="result_error_area">
<ErrorResult detail={detail}/> <ErrorResult detail={detail}/>

@ -1218,7 +1218,7 @@ submittojoinclass=(value)=>{
} }
{ {
this.props.Headertop && this.props.Headertop.laboratory_user && this.props.Headertop && this.props.Headertop.laboratory_user &&
<li><a href="/cooperative">后台管理</a></li> <li><a href={this.props.Headertop.laboratory_admin_url}>后台管理</a></li>
} }
<li><a href={`/account/profile`}>账号管理</a></li> <li><a href={`/account/profile`}>账号管理</a></li>

@ -148,7 +148,9 @@ class TPMBanner extends Component {
}) })
} }
} }
} }
@ -866,6 +868,8 @@ class TPMBanner extends Component {
</li> </li>
</ul> </ul>
{
this.props.is_jupyter===true?"":
<Popover placement="right" content={ <Popover placement="right" content={
<div style={{"width": "530px"}} > <div style={{"width": "530px"}} >
@ -930,7 +934,7 @@ class TPMBanner extends Component {
</div> </div>
</Popover> </Popover>
}
{ {
@ -1014,8 +1018,8 @@ class TPMBanner extends Component {
<Popover <Popover
content={ content={
<pre className={"bannerpd201"}> <pre className={"bannerpd201"}>
<div>您编辑完成后可以马上使用到自</div> <div>点击发布后可以马上应用到自</div>
<div className={"wechatcenter mt10"}>己的课堂和实训课程</div> <div className={"wechatcenter mt10"}>己的课堂和课程</div>
<div className={"wechatcenter mt15"}><Button type="primary" onClick={this.openknow} >我知道了</Button></div> <div className={"wechatcenter mt15"}><Button type="primary" onClick={this.openknow} >我知道了</Button></div>
</pre> </pre>
} }

@ -461,7 +461,7 @@ class TPMDataset extends Component {
const uploadProps = { const uploadProps = {
width: 600, width: 600,
fileList, fileList,
multiple: false, multiple: true,
//multiple 是否支持多选 查重的时候不能多选 不然弹许多框出来 //multiple 是否支持多选 查重的时候不能多选 不然弹许多框出来
// https://github.com/ant-design/ant-design/issues/15505 // https://github.com/ant-design/ant-design/issues/15505
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。

@ -10,8 +10,6 @@ import { Modal, Spin, Tooltip ,message,Icon,Button,Divider} from 'antd';
import axios from 'axios'; import axios from 'axios';
import 'antd/lib/pagination/style/index.css';
import '../shixunchildCss/Challenges.css'; import '../shixunchildCss/Challenges.css';
import AccountProfile from"../../../user/AccountProfile"; import AccountProfile from"../../../user/AccountProfile";
@ -74,33 +72,48 @@ class Challenges extends Component {
if(box){ if(box){
boxoffsetHeigh=box.offsetHeight boxoffsetHeigh=box.offsetHeight
if(boxoffsetHeigh<ChallengesDataList === undefined || ChallengesDataList&&ChallengesDataList.description=== ""||ChallengesDataList&&ChallengesDataList.description===null||ChallengesDataList&&ChallengesDataList.description===undefined?160:300){ if(ChallengesDataList === undefined || ChallengesDataList&&ChallengesDataList.description=== ""||ChallengesDataList&&ChallengesDataList.description===null||ChallengesDataList&&ChallengesDataList.description===undefined){
debugger
this.setState({
isopentitletype:"Less",
boxoffsetHeigh:boxoffsetHeigh
})
}else{ }else{
debugger if(this.state.isopentitletype==="greater"){
this.setState({
opentitletype:true, }else{
isopentitletype:"greater", if(boxoffsetHeigh>=300){
boxoffsetHeigh:boxoffsetHeigh this.setState({
}) opentitletype:true,
isopentitletype:"greater",
boxoffsetHeigh:boxoffsetHeigh
})
}else{
this.setState({
isopentitletype:"Less",
boxoffsetHeigh:boxoffsetHeigh
})
}
}
} }
console.log(boxoffsetHeigh)
} }
} }
componentDidMount() { componentDidMount() {
this.ChallengesList() if(this.state.isopentitletype==="greater"){
}else {
this.ChallengesList()
}
} }
componentDidUpdate = (prevProps,prevState) => { componentDidUpdate = (prevProps,prevState) => {
//防止陷入无限循环 //防止陷入无限循环
if(prevState.ChallengesDataList!=this.state.ChallengesDataList){ if(prevState.ChallengesDataList!=this.state.ChallengesDataList){
this.getjianjiesize() if(this.state.isopentitletype==="greater"){
}else{
this.getjianjiesize()
}
} }
} }
@ -341,7 +354,6 @@ class Challenges extends Component {
opentitle=()=>{ opentitle=()=>{
this.setState({ this.setState({
opentitletype:!this.state.opentitletype, opentitletype:!this.state.opentitletype,
isopentitletype:!this.state.opentitletype===false?"Less":"greater"
}) })
} }
@ -423,25 +435,7 @@ class Challenges extends Component {
this.props.identity < 5?<a className="fr font-14 color-blue mr20" href="/forums/2943" this.props.identity < 5?<a className="fr font-14 color-blue mr20" href="/forums/2943"
target="_blank">实训制作指南</a> : "":""} target="_blank">实训制作指南</a> : "":""}
</div> </div>
{ChallengesDataList === undefined || ChallengesDataList&&ChallengesDataList.description=== ""||ChallengesDataList&&ChallengesDataList.description===null||ChallengesDataList&&ChallengesDataList.description===undefined?this.state.opentitletype===true?<style>
{
`
#shixunchallengesid{
max-height: 300px;
overflow: hidden;
}
`
}
</style>:"":<style>
{
`
#shixunchallengesid{
max-height: 160px;
overflow: hidden;
}
`
}
</style>}
<div> <div>
<div className={"pd20"} id={"shixunchallengesid"}> <div className={"pd20"} id={"shixunchallengesid"}>
<style> <style>
@ -453,6 +447,40 @@ class Challenges extends Component {
` `
} }
</style> </style>
<style>
{
`
.markdown-body img{
min-height: 200px;
}
`
}
</style>
{ChallengesDataList === undefined || ChallengesDataList&&ChallengesDataList.description=== ""||ChallengesDataList&&ChallengesDataList.description===null||ChallengesDataList&&ChallengesDataList.description===undefined?<style>
{
`
#shixunchallengesid{
max-height: 300px;
overflow: hidden;
}
`
}
</style>:""}
{ChallengesDataList === undefined || ChallengesDataList&&ChallengesDataList.description=== ""||ChallengesDataList&&ChallengesDataList.description===null||ChallengesDataList&&ChallengesDataList.description===undefined?"":this.state.isopentitletype==="greater"&&this.state.opentitletype===true?
<style>
{
`
#shixunchallengesid{
max-height:260px;
overflow: hidden;
}
`
}
</style>:""}
<div className="justify break_full_word new_li " <div className="justify break_full_word new_li "
id="challenge_editorMd_description"> id="challenge_editorMd_description">
@ -471,7 +499,7 @@ class Challenges extends Component {
</div> </div>
</div> </div>
{this.state.isopentitletype==="Less"&&this.state.opentitletype===false?<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}> {this.state.isopentitletype==="Less"?"":this.state.opentitletype===true?<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}>
<a className={"font-14 color-grey-9"}>阅读全文 <i className={"iconfont icon-jiantou9 font-14"}></i></a> <a className={"font-14 color-grey-9"}>阅读全文 <i className={"iconfont icon-jiantou9 font-14"}></i></a>
</Divider>:<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}> </Divider>:<Divider dashed={true} onClick={()=>this.opentitle()} className={"pointer Breadcrumbfont color-grey-9 "}>
<a className={"font-14 color-grey-9"}>收起全文 <i className={"iconfont icon-changyongtubiao-xianxingdaochu-zhuanqu- font-14"}></i></a> <a className={"font-14 color-grey-9"}>收起全文 <i className={"iconfont icon-changyongtubiao-xianxingdaochu-zhuanqu- font-14"}></i></a>

@ -48,33 +48,54 @@ class Challengesjupyter extends Component {
isopentitletype:"Less", isopentitletype:"Less",
}) })
} }
this.getjianjiesize()
} }
} }
}).catch((error) => { }).catch((error) => {
//console.log(error) //console.log(error)
}); });
} }
getjianjiesize=()=>{
let {ChallengesDataList}=this.state;
let boxoffsetHeigh;
let box=document.getElementById("shixunchallengesid");
if(box){
boxoffsetHeigh=box.offsetHeight
if(ChallengesDataList === undefined || ChallengesDataList&&ChallengesDataList.description=== ""||ChallengesDataList&&ChallengesDataList.description===null||ChallengesDataList&&ChallengesDataList.description===undefined){
}else{
if(this.state.isopentitletype==="greater"){
}else{
if(boxoffsetHeigh>=300){
this.setState({
opentitletype:true,
isopentitletype:"greater",
boxoffsetHeigh:boxoffsetHeigh
})
}else{
this.setState({
isopentitletype:"Less",
boxoffsetHeigh:boxoffsetHeigh
})
}
}
}
}
}
componentDidUpdate = (prevProps,prevState) => { componentDidUpdate = (prevProps,prevState) => {
//防止陷入无限循环 //防止陷入无限循环
if(prevState.ChallengesDataList!=this.state.ChallengesDataList){ if(prevState.ChallengesDataList!=this.state.ChallengesDataList){
let boxoffsetHeigh; if(this.state.isopentitletype==="greater"){
let box=document.getElementById("shixunchallengesid");
if(box){
boxoffsetHeigh=box.offsetHeight
if(boxoffsetHeigh<300){
this.setState({
isopentitletype:"Less",
boxoffsetHeigh:boxoffsetHeigh
})
}else{
this.setState({
isopentitletype:"greater",
opentitletype:true,
boxoffsetHeigh:boxoffsetHeigh
})
}
}else{
this.getjianjiesize()
} }
} }
@ -124,14 +145,18 @@ class Challengesjupyter extends Component {
}, 600) }, 600)
}); });
setTimeout(this.getjianjiesize(), 1000);
let self = this; //为了避免作用域及缓存
window.receiveMessageFromIndex = function ( event ) {
window.addEventListener('message', (e) => {
console.log("触发了jupytermessage"); console.log("触发了jupytermessage");
console.log("触发了jupytermessage"); console.log("触发了jupytermessage");
} that.modifyjupyter();
//监听message事件 });
window.addEventListener("message", receiveMessageFromIndex, false); setTimeout(this.getjianjiesize(), 1000);
} }
updatamakedowns = () => { updatamakedowns = () => {
@ -220,6 +245,7 @@ class Challengesjupyter extends Component {
} }
render() { render() {
let{ChallengesDataList,booljupyterurls,enlarge}=this.state; let{ChallengesDataList,booljupyterurls,enlarge}=this.state;
let id = this.props.match.params.shixunId; let id = this.props.match.params.shixunId;
@ -252,17 +278,39 @@ class Challengesjupyter extends Component {
</a> </a>
</Tooltip> </Tooltip>
</div> </div>
{this.state.opentitletype===true?<style>
{ <div>
` <style>
{
`
.markdown-body img{
min-height: 200px;
}
`
}
</style>
{ChallengesDataList === undefined || ChallengesDataList&&ChallengesDataList.description=== ""||ChallengesDataList&&ChallengesDataList.description===null||ChallengesDataList&&ChallengesDataList.description===undefined?<style>
{
`
#shixunchallengesid{ #shixunchallengesid{
max-height: 300px; max-height: 300px;
overflow: hidden; overflow: hidden;
} }
` `
} }
</style>:""} </style>:""}
<div> {ChallengesDataList === undefined || ChallengesDataList&&ChallengesDataList.description=== ""||ChallengesDataList&&ChallengesDataList.description===null||ChallengesDataList&&ChallengesDataList.description===undefined?"":this.state.isopentitletype==="greater"&&this.state.opentitletype===true?
<style>
{
`
#shixunchallengesid{
max-height:260px;
overflow: hidden;
}
`
}
</style>:""}
<div className={"pd20"} id={"shixunchallengesid"}> <div className={"pd20"} id={"shixunchallengesid"}>
<p id="ReactMarkdown" style={{overflow:'hidden'}}> <p id="ReactMarkdown" style={{overflow:'hidden'}}>
@ -341,11 +389,7 @@ class Challengesjupyter extends Component {
: :
( (
admin===true||business===true||mysidentity===true? admin===true||business===true||mysidentity===true?
<div style={{ <div className={"shixunjianjiecballenges edu-back-white sortinxdirection mt20"}>
height: '63px',
}} className={enlarge?"shixunjianjiecballenges edu-back-white intermediatecenter fangdaone":"shixunjianjiecballenges edu-back-white mt20"}>
<div className={enlarge?"sortinxdirection jupyterswidth":"sortinxdirection"} >
<div className="renwuxiangssi sortinxdirection"> <div className="renwuxiangssi sortinxdirection">
<div><p className="renwuxiangqdiv">任务详情</p></div> <div><p className="renwuxiangqdiv">任务详情</p></div>
<div><p className="renwuxiangqdivtest ml1 shixunbingbaocun">请将实训题目写在下方并保存</p></div> <div><p className="renwuxiangqdivtest ml1 shixunbingbaocun">请将实训题目写在下方并保存</p></div>
@ -402,7 +446,7 @@ class Challengesjupyter extends Component {
{ {
admin===true||business===true||mysidentity===true? admin===true||business===true||mysidentity===true?
<div> <div>
<div className={"pb47"}> <div className="pb47">
{ {
this.state.jupyter_url===null || this.state.jupyter_url===undefined? this.state.jupyter_url===null || this.state.jupyter_url===undefined?
( (

@ -4,7 +4,7 @@
* @Github: * @Github:
* @Date: 2019-11-27 13:42:11 * @Date: 2019-11-27 13:42:11
* @LastEditors: tangjiang * @LastEditors: tangjiang
* @LastEditTime: 2019-12-19 15:11:56 * @LastEditTime: 2019-12-20 10:25:42
*/ */
import types from "./actionTypes"; import types from "./actionTypes";
import { Base64 } from 'js-base64'; import { Base64 } from 'js-base64';
@ -171,6 +171,94 @@ export const updateCode = (identifier, inputValue, type) => {
} }
} }
// 代码评测
export const codeEvaluate = (dispatch, identifier, type, time_limit) => {
// 调试代码成功后,调用轮循接口, 注意: 代码执行的时间要小于设置的时间限制
const intervalTime = 500;
let count = 1;
/**
* @param {*} excuteTime 执行时间
* @param {*} finalTime 总时间
* @param {*} count 执行次数
* @param {*} timer 定时器
*/
function getCodeSubmit (intervalTime, finalTime, count, timer){
const excuteTime = (count++) * intervalTime; // 当前执行时间
fetchCodeSubmit(identifier, { mode: type }).then(res => {
const { status } = res.data; // 评测返回结果
// 清除定时器条件: 评测通过或者评测时间大于指定时间
if (+status === 0 || (excuteTime / 1000) > (finalTime + 1)) {
clearInterval(timer); // 清除定时器
timer = null;
let returnData = null;
if (status === 1) { // 结果没有返回
returnData = {
error_line: -1,
error_msg: '',
execute_memory: '',
execute_time: finalTime,
input: '',
output: '',
status: 2,
expected_output: ''
};
} else { // 成功返回结果
returnData = res.data.data;
}
// 返回评测结果
dispatch({
type: types.COMMIT_RECORD_DETAIL,
payload: returnData
});
if (!type || type === 'debug') {
dispatch({ // 改变 loading 值
type: types.LOADING_STATUS,
payload: false
});
// 保存执行状态
dispatch({
type: types.TEST_CODE_STATUS,
payload: 'finish'
});
} else {
// 回滚提交按钮状态
dispatch({
type: types.SUBMIT_LOADING_STATUS,
payload: false
});
// 改变tab值至提交记录(只在提交时才跳转,测评时,切换到代码执行结果就可以了)
dispatch({
type: types.CHANGE_USER_CODE_TAB,
payload: 'record'
});
// 重新调用一下提交记录接口
dispatch(getUserCommitRecord(identifier));
}
}
}).catch(err => { // 评测异常时
// 清除定时器
clearInterval(timer);
timer = null;
// 回滚按钮状态
if (!type || type === 'debug') {
dispatch({ // 改变 loading 值
type: types.LOADING_STATUS,
payload: false
});
} else { // 回滚提交按钮状态
dispatch({
type: types.SUBMIT_LOADING_STATUS,
payload: false
});
}
});
}
// 开启定时器,调用监听接口
let timer = setInterval(() => {
getCodeSubmit(intervalTime, time_limit, count++, timer);
}, intervalTime);
}
/** /**
* @description 调试代码 * @description 调试代码
* @param {*} identifier * @param {*} identifier
@ -194,15 +282,6 @@ export const debuggerCode = (identifier,value, type) => {
// console.log('调用调试代码成功并返回结果: ', res); // console.log('调用调试代码成功并返回结果: ', res);
const { status } = res; const { status } = res;
if (status === 200) { if (status === 200) {
// 调试代码成功后,调用轮循接口, 注意: 代码执行的时间要小于设置的时间限制
const intervalTime = 500;
let count = 1;
/**
* @param {*} excuteTime 执行时间
* @param {*} finalTime 总时间
* @param {*} count 执行次数
* @param {*} timer 定时器
*/
if (res.data.status === 401) { if (res.data.status === 401) {
dispatch({ // 改变 loading 值 dispatch({ // 改变 loading 值
type: types.LOADING_STATUS, type: types.LOADING_STATUS,
@ -210,81 +289,8 @@ export const debuggerCode = (identifier,value, type) => {
}); });
return; return;
}; };
function getCodeSubmit (intervalTime, finalTime, count, timer){ // 测评
const excuteTime = (count++) * intervalTime; // 当前执行时间 codeEvaluate(dispatch, identifier, type, time_limit);
fetchCodeSubmit(identifier, { mode: type }).then(res => {
const { status } = res.data; // 评测返回结果
// 清除定时器条件: 评测通过或者评测时间大于指定时间
if (+status === 0 || (excuteTime / 1000) > (finalTime + 1)) {
clearInterval(timer); // 清除定时器
timer = null;
let returnData = null;
if (status === 1) { // 结果没有返回
returnData = {
error_line: -1,
error_msg: '',
execute_memory: '',
execute_time: finalTime,
input: '',
output: '',
status: 2,
expected_output: ''
};
} else { // 成功返回结果
returnData = res.data.data;
}
// 返回评测结果
dispatch({
type: types.COMMIT_RECORD_DETAIL,
payload: returnData
});
if (!type || type === 'debug') {
dispatch({ // 改变 loading 值
type: types.LOADING_STATUS,
payload: false
});
// 保存执行状态
dispatch({
type: types.TEST_CODE_STATUS,
payload: 'finish'
});
} else {
// 回滚提交按钮状态
dispatch({
type: types.SUBMIT_LOADING_STATUS,
payload: false
});
// 改变tab值至提交记录(只在提交时才跳转,测评时,切换到代码执行结果就可以了)
dispatch({
type: types.CHANGE_USER_CODE_TAB,
payload: 'record'
});
// 重新调用一下提交记录接口
dispatch(getUserCommitRecord(identifier));
}
}
}).catch(err => { // 评测异常时
// 清除定时器
clearInterval(timer);
timer = null;
// 回滚按钮状态
if (!type || type === 'debug') {
dispatch({ // 改变 loading 值
type: types.LOADING_STATUS,
payload: false
});
} else { // 回滚提交按钮状态
dispatch({
type: types.SUBMIT_LOADING_STATUS,
payload: false
});
}
});
}
// 开启定时器,调用监听接口
let timer = setInterval(() => {
getCodeSubmit(intervalTime, time_limit, count++, timer);
}, intervalTime);
} }
}).catch(() => { }).catch(() => {
dispatch({ dispatch({
@ -362,7 +368,8 @@ export const changeUserCodeTab = (key) => {
*/ */
export const submitUserCode = (identifier, inputValue, type) => { export const submitUserCode = (identifier, inputValue, type) => {
return (dispatch, getState) => { return (dispatch, getState) => {
const { userCode, isUpdateCode } = getState().ojForUserReducer; const { userCode, isUpdateCode, hack: {time_limit = 0} } = getState().ojForUserReducer;
function userCodeSubmit () { function userCodeSubmit () {
fetchUserCodeSubmit(identifier).then(res => { fetchUserCodeSubmit(identifier).then(res => {
// console.log('用户提交代码成功======》》》》》', res); // console.log('用户提交代码成功======》》》》》', res);
@ -374,12 +381,8 @@ export const submitUserCode = (identifier, inputValue, type) => {
}); });
return; return;
}; };
// 将编辑代码清空 // 测评
dispatch({ codeEvaluate(dispatch, identifier, type, time_limit);
type: types.SAVE_EDITOR_CODE,
payload: ''
});
dispatch(debuggerCode(identifier, inputValue, type || 'submit'));
} }
}).catch(() => { }).catch(() => {
dispatch({ dispatch({

@ -4,11 +4,10 @@
* @Github: * @Github:
* @Date: 2019-11-20 10:55:38 * @Date: 2019-11-20 10:55:38
* @LastEditors: tangjiang * @LastEditors: tangjiang
* @LastEditTime: 2019-12-17 14:10:37 * @LastEditTime: 2019-12-20 10:10:53
*/ */
import axios from 'axios'; import axios from 'axios';
import { func } from 'prop-types';
export async function fetchOJList (params) { export async function fetchOJList (params) {
console.log('传递的参数: ', params); console.log('传递的参数: ', params);

Loading…
Cancel
Save