dev_forum
ysl 6 years ago
parent 1f9c6b833b
commit f5150efa7a

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

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

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

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

@ -331,21 +331,21 @@ class NewHeader extends Component {
} }
educoderlogin=()=>{ educoderlogin=()=>{
//退出账号 //退出账号
// this.setState({ this.setState({
// isRender:true 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);
}) })
// 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 = () => { onKeywordSearch = () => {

Loading…
Cancel
Save