dev_forum
ysl 6 years ago
parent 1f9c6b833b
commit f5150efa7a

@ -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";
@ -124,6 +128,8 @@ class Startshixuntask extends Component{
<p className="task-popup-text-center font-16 pb20">实训已经更新了正在为您重置!</p>
</div>
<div className="task-popup-submit clearfix">
<Spin size="large" spinning={isSpin}>
</Spin>
<a className="task-btn task-btn-orange fr mr51"
onClick={() => this.hidestartshixunsreplace(hidestartshixunsreplacevalue)}>知道了</a>
</div>

@ -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 = () => {

Loading…
Cancel
Save