mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-06 12:45:22 +08:00
fix: 修改未登录提示bug
This commit is contained in:
parent
5268854b30
commit
9b698bc93c
@ -2,7 +2,6 @@ import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import PropTypes from 'prop-types'
|
||||
import { changeMenuItem } from '../actions/menu'
|
||||
import { message } from 'antd'
|
||||
|
||||
|
||||
export function requireAuthentication(Component) {
|
||||
@ -27,7 +26,6 @@ export function requireAuthentication(Component) {
|
||||
if( !this.props.isAuthenticated ){
|
||||
this.props.history.push('/');
|
||||
this.props.changeMenuItem('/');
|
||||
message.info('请先登录',1);
|
||||
}
|
||||
}
|
||||
render() {
|
||||
|
@ -88,6 +88,9 @@ class HeaderCom extends Component {
|
||||
}
|
||||
linkTo = (e) =>{
|
||||
this.props.changeMenuItem(e.key);
|
||||
if(!this.props.login){
|
||||
message.info('请先登录',1);
|
||||
}
|
||||
}
|
||||
relieveLink = () => {
|
||||
this.props.changeMenuItem("");
|
||||
|
Loading…
Reference in New Issue
Block a user