import './Home.scss'
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { Link } from 'react-router-dom'
import { Row, Col, Button, Icon } from 'antd'
import PropTypes from "prop-types"
import Login from '../Login/LoginWrap'
import Intro from '../../components/Intro/Intro'
import { changeMenuItem } from '../../actions/menu'
import { OverPack } from 'rc-scroll-anim'
import TweenOne from 'rc-tween-one'
import QueueAnim from 'rc-queue-anim';
const oneAnim = { y: '+=30', opacity: 0, type: 'from', ease: 'easeOutQuad' };
const imgAnim = { y: '+=50', opacity: 0, type: 'from', ease: 'easeOutQuad', duration: '1500'};
const style = {
'height':'100%',
'width':'100%',
'background': 'url(./image/bg-img.jpg) no-repeat center',
'backgroundSize':'cover'
}
const HomeGuest = (props) => (
{ props.introList.map(function(intro,i){
return (
)
})}
);
HomeGuest.propTypes ={
introList: PropTypes.array
}
@connect(
state => ({
login: state.login.isLogin
}),
{
changeMenuItem
}
)
class Home extends Component {
constructor(props) {
super(props)
}
static propTypes = {
introList: PropTypes.array,
login : PropTypes.bool,
changeMenuItem : PropTypes.func
}
toStart = () =>{
this.props.changeMenuItem('/group');
}
render () {
const { login } = this.props;
return (
{login?
(
YAPI
一个高效,易用,可部署的Api管理系统
)
:
}
)
}
}
Home.defaultProps={
introList:[{
title:"接口管理",
des:"yapi将满足你的所有接口管理需求。不再需要 为每个项目搭建独立的接口管理平台和编写离线的接口文档",
detail:[
{title:"接口管理",des:"强大的接口文档",iconType:"smile-o"},
{title:"接口管理",des:"强大的接口文档",iconType:"smile-o"},
{title:"接口管理",des:"强大的接口文档",iconType:"smile-o"}
],
img:"./image/demo-img.png"
},{
title:"接口管理",
des:"yapi将满足你的所有接口管理需求。不再需要 为每个项目搭建独立的接口管理平台和编写离线的接口文档",
detail:[
{title:"接口管理",des:"强大的接口文档",iconType:"smile-o"},
{title:"接口管理",des:"强大的接口文档",iconType:"smile-o"}
],
img:"./image/demo-img.png"
}
]
};
export default Home