Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev

This commit is contained in:
zwjamnsss 2017-08-24 17:16:02 +08:00
commit fed679d3aa
18 changed files with 24 additions and 20 deletions

View File

@ -60,3 +60,8 @@ exports.pickRandomProperty = (obj) => {
if (Math.random() < 1/++count) result = prop;
return result;
}
exports.getImgPath = (path, type) => {
let rate = window.devicePixelRatio >= 2 ? 2 : 1;
return `${path}@${rate}x.${type}`;
}

View File

@ -9,6 +9,7 @@ import { changeMenuItem } from '../../reducer/modules/menu'
import { withRouter } from 'react-router';
import Srch from './Search/Search'
const { Header } = Layout;
import { logoSVG } from '../../common.js';
const MenuUser = (props) => (
<Menu className="user-menu" >
@ -166,7 +167,7 @@ export default class HeaderCom extends Component {
<div className="content g-row">
<div className="logo">
<Link to="/group" onClick={this.relieveLink} className="href">
<img className="img" src="/image/logo_header@1x.png" /><span className="logo-name">YAPI<span className="ui-badge"></span></span>
<span className="img">{logoSVG('32px')}</span><span className="logo-name">YAPI<span className="ui-badge"></span></span>
</Link>
</div>
<div className="user-toolbar">

View File

@ -28,7 +28,7 @@
position: absolute;
left: 0;
top: 50%;
transform: translateY(-56%);
transform: translateY(-17px);
}
.ui-badge {
position: absolute;

View File

@ -3,7 +3,6 @@
padding: 24px;
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.20);
border-radius: 4px;
min-height: 5rem;
margin-top: 0;
}

View File

@ -8,7 +8,6 @@
padding: 24px;
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.20);
border-radius: 4px;
min-height: 5rem;
margin-top: 0;
}

View File

@ -5,7 +5,7 @@ import { Link } from 'react-router-dom';
import { Row, Col, Button, Icon, Card } from 'antd';
import PropTypes from "prop-types";
import { withRouter } from 'react-router';
import { logoSVG } from '../../common.js';
import { logoSVG, getImgPath } from '../../common.js';
import { changeMenuItem } from '../../reducer/modules/menu'
const HomeGuest = () => (
@ -33,7 +33,7 @@ const HomeGuest = () => (
{logoSVG('72px')}
<span className="name">YAPI</span>
</div>
<div className="detail">高效易用可部署的API管理平台<br/><span className="desc">旨在为开发产品测试人员提供更优雅的接口管理服务</span></div>
<div className="detail">高效易用功能强大的API管理平台<br/><span className="desc">旨在为开发产品测试人员提供更优雅的接口管理服务</span></div>
<div className="btn-group">
<Link to="/login"><Button type="primary" className="btn-home btn-login">登录 / 注册</Button></Link>
<Button className="btn-home btn-home-normal" id="qsso-login">QSSO 登录</Button>
@ -42,7 +42,7 @@ const HomeGuest = () => (
</Col>
<Col span={15}>
<div className="img-container">
<img className="img" src="./image/demo-img.jpg"/>
<img className="img" src={getImgPath('./image/demo-img', 'jpg')}/>
</div>
</Col>
</Row>
@ -55,18 +55,18 @@ const HomeGuest = () => (
<Row key="feat-motion-row">
<Col span={8} className="section-item" key="feat-wrapper-1">
<Icon type="api" className="img" />
<h4 className="title">项目接口管理</h4>
<h4 className="title">项目管理</h4>
<span className="desc">提供基本的项目分组项目管理接口管理功能</span>
</Col>
<Col span={8} className="section-item" key="feat-wrapper-2">
<Icon type="code-o" className="img" />
<h4 className="title">可部署</h4>
<span className="desc">用户只需配置接口的基本路径通过将线上域名指到我们的YApi平台服务器就可使用mockServer服务</span>
<h4 className="title">接口管理</h4>
<span className="desc">友好的接口文档基于websocket的多人协作接口编辑功能和类postman测试工具让多人协作成倍提升开发效率</span>
</Col>
<Col span={8} className="section-item" key="feat-wrapper-3">
<Icon type="team" className="img" />
<h4 className="title">用户管理</h4>
<span className="desc">提供基本的用户注册登录管理等功能集成了去哪儿QSSO登录</span>
<h4 className="title">MockServer</h4>
<span className="desc">基于Mockjs使用简单功能强大</span>
</Col>
</Row>
</div>
@ -101,7 +101,7 @@ const HomeGuest = () => (
</Col>
<Col span={12} className="section-card mock-after">
<Card title="生成的 Mock 数据">
<p className="mock-desc">生成的 Mock 数据可以在线使用也可以下载到本地使用</p>
<p className="mock-desc">生成的 Mock 数据可以直接用 ajax 请求使用也可以通过服务器代理使用不需要修改项目一行代码</p>
<div className="code">
<ol start="1">
<li className="alt"><span className="orderNum orderNum-first">1</span><span><span>&#123;&ensp;&ensp;</span></span></li>

View File

@ -264,7 +264,7 @@ $color-bg-lightblue: #c6e2ff;
transform: translateX(-50%);
text-align: right;
.img{
width: 7.3rem;
width: 7.12rem;
border-radius: 4px;
box-shadow : 0 30px 60px rgba(0,0,0,0.2);
}

View File

@ -41,5 +41,5 @@
#### 4.4 测试接口
点击运行tab,可进入到接口测试页面,首先安装chrome crossRequest扩展才可正常使用此功能
<img src="./images/interface_run.png" width="400" style="margin:0px auto;display:block;" alt="图片名称" align=center />
<img src="./images/interface_run.png" width="800" style="margin:0px auto;display:block;" alt="图片名称" align=center />
点击保存按钮可把当前测试保存到测试集,方便下次调试

View File

@ -94,7 +94,7 @@
</div>
<h3 class="home-thumbnail-name">项目管理</h3>
<p class="home-thumbnail-desc">无论是大企业还是创业团队Yapi成熟的团队管理项目权限和优化的交互都能满足您的需求</p>
<p class="home-thumbnail-desc">YApi成熟的团队管理扁平化项目权限配置满足各类企业的需求</p>
</div>
<div class="home-item">
@ -114,7 +114,7 @@
</div>
<h3 class="home-thumbnail-name">MockServer</h3>
<p class="home-thumbnail-desc">基于Mockjs使用简单功能强大</p>
<p class="home-thumbnail-desc">基于Mockjs使用简单功能强大</p>
</div>
</div>

View File

@ -80,7 +80,7 @@
<p><img src="./images/interface_add.png" width="400" style="margin:0px auto;display:block;" alt="图片名称" align=center /></p>
<h4 class="subject" id="4.3 接口编辑">4.3 接口编辑 <a class="hashlink" href="#4.3 接口编辑">#</a></h4><p>添加完接口点击新添加的接口,跳转到接口预览页面,可看到刚才填写的信息。接口的详细信息点击编辑功能进行添加</p>
<h4 class="subject" id="4.4 测试接口">4.4 测试接口 <a class="hashlink" href="#4.4 测试接口">#</a></h4><p>点击运行tab,可进入到接口测试页面,首先安装chrome crossRequest扩展才可正常使用此功能
<img src="./images/interface_run.png" width="400" style="margin:0px auto;display:block;" alt="图片名称" align=center />
<img src="./images/interface_run.png" width="800" style="margin:0px auto;display:block;" alt="图片名称" align=center />
点击保存按钮可把当前测试保存到测试集,方便下次调试</p>
</article>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -39,7 +39,7 @@
"content": [{ // keykey
"name": "项目管理", //
"src": "http://ojk406wln.bkt.clouddn.com/intro_muti.png", //
"desc": "无论是大企业还是创业团队Yapi成熟的团队管理项目权限和优化的交互都能满足您的需求" //
"desc": "YApi成熟的团队管理扁平化项目权限配置满足各类企业的需求" //
},{
"name": "接口管理",
"src": "http://ojk406wln.bkt.clouddn.com/intro_md.png",
@ -47,7 +47,7 @@
},{
"name": "MockServer",
"src": "http://ojk406wln.bkt.clouddn.com/intro_theme.png",
"desc": "基于Mockjs使用简单功能强大"
"desc": "基于Mockjs使用简单功能强大"
}]
}
}]