Merge remote-tracking branch 'origin/master'

# Conflicts:
#	public/react/src/modules/courses/coursesPublic/Startshixuntask.js
#	public/react/src/modules/tpm/TPMBanner.js
dev_forum
杨树明 6 years ago
commit ce57c052a0

@ -4,6 +4,7 @@ import axios from 'axios';
import { requestProxy } from "./indexEduplus2RequestProxy";
import { broadcastChannelOnmessage } from 'educoder'
import { notification } from 'antd';
import './index.css'
broadcastChannelOnmessage('refreshPage', () => {
window.location.reload()
})
@ -114,7 +115,9 @@ export function initAxiosInterceptors(props) {
notification.open({
message:"提示",
description: response.data.message || '服务器异常,请联系管理员。',
style: {
zIndex: 99999999
},
});
// notification['error']({
// message:"提示",

@ -34,3 +34,6 @@ body {
.anticon anticon-paper-clip{
color: #29bd8b !important;
}
.notificationmystyle{
z-index: 99999999;
}

@ -1,17 +1,17 @@
import React,{ Component } from "react";
import { WordsBtn } from 'educoder';
import {Tooltip,message,Modal} from 'antd';
import {Tooltip,message,Modal,Spin} from 'antd';
import {Link} from 'react-router-dom';
import axios from 'axios';
import Modals from '../../modals/Modals';
class Startshixuntask extends Component{
constructor(props){
super(props);
this.state = {
startbtn:false
startbtn:false,
isSpin:false,
}
}
@ -60,11 +60,15 @@ class Startshixuntask extends Component{
}
hidestartshixunsreplace=(url)=>{
this.setState({
isSpin:true
})
axios.get(url).then((response) => {
if(response.status===200){
this.setState({
shixunsreplace:false
shixunsreplace:false,
isSpin:false,
})
message.success('重置成功,正在进入实训!');
let path="/shixuns/"+response.data.shixun_identifier+"/challenges";
@ -74,7 +78,8 @@ class Startshixuntask extends Component{
).catch((error) => {
this.setState({
startbtn:false,
shixunsreplace:false
shixunsreplace:false,
isSpin:false,
})
});
@ -120,6 +125,7 @@ class Startshixuntask extends Component{
footer={null}
keyboard={false}
>
<Spin size="large" spinning={isSpin}>
<div className="task-popup-content">
<p className="task-popup-text-center font-16 pb20">实训已经更新了正在为您重置!</p>
</div>
@ -127,6 +133,7 @@ class Startshixuntask extends Component{
<a className="task-btn task-btn-orange fr mr51"
onClick={() => this.hidestartshixunsreplace(hidestartshixunsreplacevalue)}>知道了</a>
</div>
</Spin>
</Modal>
<Modal
title="提示"

@ -212,6 +212,7 @@ button.buttonHoverColor:hover a {
margin: 0 auto;
}
/* Dialog */
#alert-dialog-title>h2 {
text-align: center;

@ -331,21 +331,21 @@ class NewHeader extends Component {
}
educoderlogin=()=>{
//退出账号
// this.setState({
// isRender:true
// })
var url = `/accounts/logout.json`;
axios.get((url)).then((result) => {
if(result!==undefined){
// this.setState({
// isRender:true
// })
window.location.href = "/";
}
}).catch((error) => {
console.log(error);
this.setState({
isRender:true
})
// var url = `/accounts/logout.json`;
// axios.get((url)).then((result) => {
// if(result!==undefined){
// // this.setState({
// // isRender:true
// // })
// window.location.href = "/";
// }
// }).catch((error) => {
// console.log(error);
// })
}
onKeywordSearch = () => {

@ -59,6 +59,7 @@ class TPMBanner extends Component {
hidestartshixunsreplacevalue:"",
isIE:false,
Forkvisibletype: false,
isSpin:false,
}
}
@ -322,12 +323,16 @@ class TPMBanner extends Component {
// }
hidestartshixunsreplace=(url)=>{
this.setState({
isSpin:true,
})
axios.get(url).then((response) => {
if(response.status===200){
// let path="/shixuns/"+response.data.shixun_identifier+"/challenges";
// this.props.history.push(path);
this.setState({
shixunsreplace:false
shixunsreplace:false,
isSpin:false,
})
message.success('重置成功,正在进入实训!');
this.startshixunCombat();
@ -335,7 +340,34 @@ class TPMBanner extends Component {
).catch((error) => {
this.setState({
startbtn:false,
shixunsreplace:false
shixunsreplace:false,
isSpin:false
})
});
}
shixunexec=(url)=>{
this.setState({
isSpin:true,
})
axios.get(url).then((response) => {
if(response.status===200){
// let path="/shixuns/"+response.data.shixun_identifier+"/challenges";
// this.props.history.push(path);
this.setState({
shixunsreplace:false,
isSpin:false,
})
message.success('重置成功,正在进入实训!');
this.startshixunCombat();
}}
).catch((error) => {
this.setState({
startbtn:false,
shixunsreplace:false,
isSpin:false
})
});
@ -667,7 +699,7 @@ class TPMBanner extends Component {
</div>
<div className="task-popup-submit clearfix">
<a className="task-btn task-btn-orange fr mr51"
onClick={() => this.hidestartshixunsreplace(hidestartshixunsreplacevalue)}>知道了</a>
onClick={() => this.hidestartshixunsreplace(hidestartshixunsreplacevalue)}>知道了</a>
</div>
</Modal>

Loading…
Cancel
Save