yapi/client/containers/Home/Home.js

78 lines
2.2 KiB
JavaScript
Raw Normal View History

2017-07-10 11:50:56 +08:00
import './Home.scss'
2017-07-06 17:01:48 +08:00
import React, { Component } from 'react'
2017-07-17 21:11:58 +08:00
import { Row, Col } from 'antd'
import PropTypes from "prop-types"
import Login from '../Login/login-wrap'
2017-07-17 21:11:58 +08:00
import Intro from '../../components/Intro/Intro'
2017-07-05 14:10:06 +08:00
2017-07-06 17:01:48 +08:00
class Home extends Component {
constructor(props) {
super(props)
}
2017-07-17 21:11:58 +08:00
static propTypes = {
introList:PropTypes.array
}
2017-07-06 17:01:48 +08:00
render () {
return (
<div className="home-main">
<div className="main-one">
2017-07-17 21:11:58 +08:00
<div className="container">
<Row>
<Col span={24}>
<div className="home-des">
<p className="title">YAPI</p>
<div className="detail">一个高效易用功能强大的api管理系统</div>
</div>
</Col>
</Row>
<Row>
<Col span={8} className="main-one-left">
<Login/>
</Col>
<Col span={16} className="main-one-right">
<div className="img-container">
<img src="./static/image/demo-img.png"/>
</div>
</Col>
</Row>
</div>
</div>
2017-07-17 21:11:58 +08:00
{ this.props.introList.map(function(intro,i){
return (
<div className="main-part" key={i}>
<div className="container">
<Intro intro={intro}/>
</div>
</div>
)
})}
</div>
2017-07-06 17:01:48 +08:00
)
}
2017-07-05 21:08:51 +08:00
}
2017-07-06 17:01:48 +08:00
2017-07-17 21:11:58 +08:00
Home.defaultProps={
introList:[{
title:"接口管理",
des:"yapi将满足你的所有接口管理需求。不再需要 为每个项目搭建独立的接口管理平台和编写离线的接口文档",
detail:[
{title:"接口管理",des:"强大的接口文档"},
{title:"接口管理",des:"强大的接口文档"},
{title:"接口管理",des:"强大的接口文档"}
],
img:"./static/image/demo-img.png"
},{
title:"接口管理",
des:"yapi将满足你的所有接口管理需求。不再需要 为每个项目搭建独立的接口管理平台和编写离线的接口文档",
detail:[
{title:"接口管理",des:"强大的接口文档"},
{title:"接口管理",des:"强大的接口文档"}
],
img:"./static/image/demo-img.png"
}
]
};
2017-07-10 21:29:03 +08:00
export default Home