import './Home.scss' import React, { Component } from 'react' import { connect } from 'react-redux' import { Link } from 'react-router-dom' import { Row, Col, Button } from 'antd' import PropTypes from "prop-types" import Login from '../Login/LoginWrap' import Intro from '../../components/Intro/Intro' import Footer from "../../components/Footer/Footer"; import { changeMenuItem } from '../../actions/menu' const HomeGuest = (props) => (

YAPI

一个高效,易用,功能强大的api管理系统
{ 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('/ProjectGroups'); } render () { const { login } = this.props; return (
{login? (

YAPI

一个高效,易用,功能强大的api管理系统

) : }
) } } Home.defaultProps={ introList:[{ title:"接口管理", des:"yapi将满足你的所有接口管理需求。不再需要 为每个项目搭建独立的接口管理平台和编写离线的接口文档", detail:[ {title:"接口管理",des:"强大的接口文档"}, {title:"接口管理",des:"强大的接口文档"}, {title:"接口管理",des:"强大的接口文档"} ], img:"./image/demo-img.png" },{ title:"接口管理", des:"yapi将满足你的所有接口管理需求。不再需要 为每个项目搭建独立的接口管理平台和编写离线的接口文档", detail:[ {title:"接口管理",des:"强大的接口文档"}, {title:"接口管理",des:"强大的接口文档"} ], img:"./image/demo-img.png" } ] }; export default Home