yapi/client/containers/Project/Activity/Activity.js
System Administrator 362172ef52 fix: bug修复
2017-09-14 18:19:13 +08:00

52 lines
1.5 KiB
JavaScript
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import './Activity.scss'
import React, { Component } from 'react'
import TimeTree from './Timeline/Timeline'
import { connect } from 'react-redux'
import PropTypes from 'prop-types'
import { Button } from 'antd'
@connect(
state => {
return {
uid: state.user.uid + '',
curdata: state.inter.curdata,
currProject: state.project.currProject
}
}
)
class Activity extends Component {
constructor(props) {
super(props);
}
static propTypes = {
uid: PropTypes.string,
getMockUrl: PropTypes.func,
match: PropTypes.object,
curdata: PropTypes.object,
currProject: PropTypes.object
}
render () {
let {currProject} = this.props;
return (
<div className="g-row">
<section className="news-box">
<div style={{display: "none"}} className="logHead">
{/*<Breadcrumb />*/}
<div className = "projectDes">
<p>高效易用可部署的API管理平台</p>
</div>
<div className="Mockurl">
<span>Mock地址</span>
<p>{location.protocol + '//' + location.hostname + (location.port !== "" ? ":" + location.port : "") + `/mock/${currProject._id}${currProject.basepath}/yourPath`}</p>
<Button type="primary"><a href = {`/api/project/download?project_id=${this.props.match.params.id}`}>下载Mock数据</a></Button>
</div>
</div>
<TimeTree typeid = {+this.props.match.params.id} />
</section>
</div>
)
}
}
export default Activity