mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-21 05:19:42 +08:00
fix: 加上未登录提示
This commit is contained in:
parent
cfaca47d82
commit
6fc86e8078
@ -2,6 +2,7 @@ import React from 'react';
|
|||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { changeMenuItem } from '../actions/menu'
|
import { changeMenuItem } from '../actions/menu'
|
||||||
|
import { message } from 'antd'
|
||||||
|
|
||||||
|
|
||||||
export function requireAuthentication(Component) {
|
export function requireAuthentication(Component) {
|
||||||
@ -26,6 +27,7 @@ export function requireAuthentication(Component) {
|
|||||||
if( !this.props.isAuthenticated ){
|
if( !this.props.isAuthenticated ){
|
||||||
this.props.history.push('/');
|
this.props.history.push('/');
|
||||||
this.props.changeMenuItem('/');
|
this.props.changeMenuItem('/');
|
||||||
|
message.info('请先登录',1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
|
@ -13,6 +13,7 @@ import QueueAnim from 'rc-queue-anim';
|
|||||||
|
|
||||||
|
|
||||||
const oneAnim = { y: '+=30', opacity: 0, type: 'from', ease: 'easeOutQuad' };
|
const oneAnim = { y: '+=30', opacity: 0, type: 'from', ease: 'easeOutQuad' };
|
||||||
|
const imgAnim = { y: '+=50', opacity: 0, type: 'from', ease: 'easeOutQuad', duration: '1500'};
|
||||||
const style = {
|
const style = {
|
||||||
'height':'100%',
|
'height':'100%',
|
||||||
'width':'100%',
|
'width':'100%',
|
||||||
@ -36,11 +37,19 @@ const HomeGuest = (props) => (
|
|||||||
<Col span={8} className="main-one-left">
|
<Col span={8} className="main-one-left">
|
||||||
<Login/>
|
<Login/>
|
||||||
</Col>
|
</Col>
|
||||||
|
<OverPack>
|
||||||
|
<TweenOne
|
||||||
|
key="feat-motion-one"
|
||||||
|
animation={imgAnim}
|
||||||
|
>
|
||||||
<Col span={16} className="main-one-right">
|
<Col span={16} className="main-one-right">
|
||||||
|
|
||||||
<div className="img-container">
|
<div className="img-container">
|
||||||
<img src="./image/demo-img.png"/>
|
<img src="./image/demo-img.png"/>
|
||||||
</div>
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
|
</TweenOne>
|
||||||
|
</OverPack>
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user