Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_cxt
cxt 5 years ago
commit 72cd577d0f

@ -153,7 +153,7 @@ class HackUserLastestCodesController < ApplicationController
when 'Java'
content.scan(/.java.\d+/).map{|s| s.match(/\d+/)[0].to_i}.min
when 'C', 'C++'
content.scan(/\d:\d+:/).map{|s| s.match(/\d+/)[0]}.min
content.scan(/\d:\d+:/).map{|s| s.match(/\d+/)[0].to_i}.min
when 'Python'
content.scan(/line \d+/).map{|s| s.match(/\d+/)[0].to_i}.min
end

@ -3,6 +3,7 @@ class MyshixunsController < ApplicationController
before_action :find_myshixun, :except => [:training_task_status, :code_runinng_message]
before_action :find_repo_name, :except => [:training_task_status, :code_runinng_message]
skip_before_action :verify_authenticity_token, :only => [:html_content]
skip_before_action :check_sign, only: [:training_task_status, :code_runinng_message]
## TPI关卡列表
def challenges

@ -1,10 +1,14 @@
import React from "react";
import axios from 'axios';
import md5 from 'md5';
import { requestProxy } from "./indexEduplus2RequestProxy";
import { broadcastChannelOnmessage ,SetAppModel, isDev, queryString } from 'educoder';
import { notification } from 'antd';
import './index.css'
import './index.css';
const opens ="79e33abd4b6588941ab7622aed1e67e8";
let timestamp = Date.parse(new Date());
const newopens=md5(opens+timestamp)
broadcastChannelOnmessage('refreshPage', () => {
window.location.reload()
})
@ -91,20 +95,20 @@ export function initAxiosInterceptors(props) {
}
if(`${config[0]}`!=`true`){
if (window.location.port === "3007") {
// if (url.indexOf('.json') == -1) {
//
// alert('开发提示:请给接口加.json:' + url)
//
// }
config.url = `${proxy}${url}`;
if (config.url.indexOf('?') == -1) {
config.url = `${config.url}?debug=${debugType}`;
config.url = `${config.url}?debug=${debugType}&openkey=${newopens}`;
} else {
config.url = `${config.url}&debug=${debugType}`;
config.url = `${config.url}&debug=${debugType}&openkey=${newopens}`;
}
} else {
// 加api前缀
config.url = url;
if (config.url.indexOf('?') == -1) {
config.url = `${config.url}?openkey=${newopens}`;
} else {
config.url = `${config.url}&openkey=${newopens}`;
}
}
}
//
@ -191,6 +195,11 @@ export function initAxiosInterceptors(props) {
locationurl('/500');
}
if (response.data.status === 501) {
notification.warning({
description:response.data.message || '访问异常,请求不合理',
})
}
// if (response.data.status === 402) {

@ -285,10 +285,10 @@ class Bullsubdirectory extends Component{
const {getFieldDecorator} = this.props.form;
// console.log("Bullsubdirectory");
// console.log(this.props.isAdmin());
console.log(this.props);
console.log(whethertoeditysl);
console.log(this.state.eduintits);
console.log(this.state.description);
// console.log(this.props);
// console.log(whethertoeditysl);
// console.log(this.state.eduintits);
// console.log(this.state.description);
return(
<React.Fragment key={this.props.index} id={this.props.id}>

Loading…
Cancel
Save