From 5a1fcb14433deb2042a4681b40ef1829f2fb3c86 Mon Sep 17 00:00:00 2001 From: hucong <1422588487@qq.com> Date: Wed, 24 Nov 2021 18:31:46 +0800 Subject: [PATCH] =?UTF-8?q?403,404=E7=99=BB=E5=BD=95=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/403/Shixunauthority.js | 21 ++++++++++++++------- src/modules/404/Shixunnopage.js | 11 ++++++++++- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/modules/403/Shixunauthority.js b/src/modules/403/Shixunauthority.js index e2c5260d..435d818b 100644 --- a/src/modules/403/Shixunauthority.js +++ b/src/modules/403/Shixunauthority.js @@ -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 (
-
+
{/*mt100 mb100*/}

您尚未被授权访问此页面,请先获取相关权限

- 您可尝试登录返回首页 - ,也可以通过 + 您可尝试 + {(!current_user || !current_user.login) && ( +

您可尝试登录

+ )} + 返回首页,也可以通过 QQ向我们反馈 -

+

{/*
*/} {/**/} @@ -34,5 +42,4 @@ class Shixunauthority extends Component { ); } } - export default SnackbarHOC() (TPMIndexHOC ( Shixunauthority )); diff --git a/src/modules/404/Shixunnopage.js b/src/modules/404/Shixunnopage.js index 791807b8..508255dd 100644 --- a/src/modules/404/Shixunnopage.js +++ b/src/modules/404/Shixunnopage.js @@ -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 (
@@ -19,7 +24,11 @@ class http500 extends Component {

你访问的页面不存在

- 您可尝试登录您可尝试登录

+ )} + 返回首页 ,也可通过