403,404登录验证

This commit is contained in:
hucong 2021-11-24 18:31:46 +08:00
parent 33297226ea
commit 5a1fcb1443
2 changed files with 24 additions and 8 deletions

View File

@ -1,4 +1,4 @@
import React, { Component } from 'react';
import React, { Component, useReducer } from 'react';
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
@ -11,21 +11,29 @@ import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
import { SnackbarHOC,getImageUrl } from 'educoder';
class Shixunauthority extends Component {
constructor(props) {
super(props);
}
render() {
console.log(this.props);
const { current_user } = this.props;
return (
<div className="newMain newTable clearfix">
<div className="edu-txt-center mt60">
<div className="edu-txt-center mt60 mb60">
{/*mt100 mb100*/}
<img src={getImageUrl("images/warn/pic_403.jpg")} />
<p className="font-16 mt56 newImages">
<p>您尚未被授权访问此页面请先获取相关权限</p>
您可尝试<a href="//testforgeplus.trustie.net/login" className="color-blue">登录</a>或<a href="/"
className="color-blue">返回首页</a>
也可以通过
您可尝试
{(!current_user || !current_user.login) && (
<p style={{display:"inline"}}>您可尝试<a href="//testforgeplus.trustie.net/login" className="color-blue">登录</a></p>
)}
<a href="/"
className="color-blue">返回首页</a>
<a target="_blank"
href="https://qm.qq.com/cgi-bin/qm/qr?k=YVGUhY7uK8ovpyd7tG_lHe2qGZ63LOij&jump_from=webapi"
className="color-blue">QQ</a>
</p>
</p>
</div>
{/*<div style="clear:both;"></div>*/}
{/*<div id="ajax-indicator" style="display:none;"><span>载入中...</span></div>*/}
@ -34,5 +42,4 @@ class Shixunauthority extends Component {
);
}
}
export default SnackbarHOC() (TPMIndexHOC ( Shixunauthority ));

View File

@ -11,7 +11,12 @@ import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
import { SnackbarHOC,getImageUrl } from 'educoder';
class http500 extends Component {
constructor(props) {
super(props);
}
render() {
console.log(this.props);
const { current_user } = this.props;
return (
<div className="newMain newTable clearfix">
<div className=" edu-txt-center mt60">
@ -19,7 +24,11 @@ class http500 extends Component {
<img src={getImageUrl("/images/warn/pic_404.jpg")} />
<p className="font-16 mt56 newImages">
<p>你访问的页面不存在</p>
您可尝试<a href="//testforgeplus.trustie.net/login" className="color-blue">登录</a>或<a href="/"
您可尝试
{(!current_user || !current_user.login) && (
<p style={{display:"inline"}}>您可尝试<a href="//testforgeplus.trustie.net/login" className="color-blue">登录</a></p>
)}
<a href="/"
className="color-blue">返回首页</a>
也可通过
<a target="_blank"