Skip to content

Commit 92b59ab

Browse files
author
chenghao
committed
❄️❄️fix auth redirect
1 parent 32cdef0 commit 92b59ab

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/components/auth/RouterEnter.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import BreadcrumbCustom from '@/components/BreadcrumbCustom';
1010
import AuthWidget from '@/components/widget/AuthWidget';
1111

1212
class RouterEnter extends Component {
13+
componentDidMount() {
14+
console.log('RouterEnter');
15+
}
1316
render() {
1417
return (
1518
<div>

src/routes/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default class CRouter extends Component {
3838
const { auth } = this.props;
3939
const { permissions } = auth.data;
4040
// const { auth } = store.getState().httpData;
41-
if (!permissions || !permissions.includes(permission)) return <Redirect to={'404'} push />;
41+
if (!permissions || !permissions.includes(permission)) return <Redirect to={'404'} />;
4242
return component;
4343
};
4444
render() {

0 commit comments

Comments
 (0)