forked from Gitlink/forgeplus-react
61 lines
2.0 KiB
JavaScript
61 lines
2.0 KiB
JavaScript
import React, { Component } from 'react';
|
||
|
||
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
|
||
|
||
import Loading from '../../Loading';
|
||
|
||
import Loadable from 'react-loadable';
|
||
|
||
import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
|
||
|
||
import { SnackbarHOC,getImageUrl } from 'educoder';
|
||
|
||
class http500 extends Component {
|
||
constructor(props) {
|
||
super(props);
|
||
this.state = {
|
||
isAdmins:true,
|
||
}
|
||
}
|
||
|
||
UNSAFE_componentWillMount() {
|
||
if (this.props.history.location.pathname.indexOf('/admins/') > -1) {
|
||
let nowTime = new Date().getTime();
|
||
if ((nowTime - (localStorage.reloadTime || 0)) > 2000) {
|
||
localStorage.setItem('reloadTime', nowTime);
|
||
window.location.reload();
|
||
return;
|
||
}
|
||
}
|
||
this.setState({isAdmins:false});
|
||
}
|
||
|
||
|
||
render() {
|
||
return (
|
||
<div className="newMain clearfix">
|
||
{
|
||
this.state.isAdmins? <Loading />:<div className=" edu-txt-center mt60 mb60">
|
||
{/*mt100 mb100*/}
|
||
<img src={getImageUrl("images/warn/pic_404.jpg")} />
|
||
<p className="font-18 mt40">
|
||
您可以稍后尝试 <a href="/"
|
||
className="color-blue">返回首页</a>
|
||
,或者
|
||
<a target="_blank"
|
||
href="//shang.qq.com/wpa/qunwpa?idkey=2f2043d88c1bd61d182b98bf1e061c6185e23055bec832c07d8148fe11c5a6cd"
|
||
className="color-blue">QQ反馈>></a>
|
||
</p>
|
||
</div>
|
||
}
|
||
|
||
{/*<div style="clear:both;"></div>*/}
|
||
{/*<div id="ajax-indicator" style="display:none;"><span>载入中...</span></div>*/}
|
||
{/*<div id="ajax-modal" style="display:none;"></div>*/}
|
||
</div>
|
||
);
|
||
}
|
||
}
|
||
|
||
export default SnackbarHOC() (TPMIndexHOC ( http500 ));
|