Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev
@ -60,3 +60,8 @@ exports.pickRandomProperty = (obj) => {
|
|||||||
if (Math.random() < 1/++count) result = prop;
|
if (Math.random() < 1/++count) result = prop;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exports.getImgPath = (path, type) => {
|
||||||
|
let rate = window.devicePixelRatio >= 2 ? 2 : 1;
|
||||||
|
return `${path}@${rate}x.${type}`;
|
||||||
|
}
|
||||||
|
@ -9,6 +9,7 @@ import { changeMenuItem } from '../../reducer/modules/menu'
|
|||||||
import { withRouter } from 'react-router';
|
import { withRouter } from 'react-router';
|
||||||
import Srch from './Search/Search'
|
import Srch from './Search/Search'
|
||||||
const { Header } = Layout;
|
const { Header } = Layout;
|
||||||
|
import { logoSVG } from '../../common.js';
|
||||||
|
|
||||||
const MenuUser = (props) => (
|
const MenuUser = (props) => (
|
||||||
<Menu className="user-menu" >
|
<Menu className="user-menu" >
|
||||||
@ -166,7 +167,7 @@ export default class HeaderCom extends Component {
|
|||||||
<div className="content g-row">
|
<div className="content g-row">
|
||||||
<div className="logo">
|
<div className="logo">
|
||||||
<Link to="/group" onClick={this.relieveLink} className="href">
|
<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>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="user-toolbar">
|
<div className="user-toolbar">
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-56%);
|
transform: translateY(-17px);
|
||||||
}
|
}
|
||||||
.ui-badge {
|
.ui-badge {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
padding: 24px;
|
padding: 24px;
|
||||||
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.20);
|
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.20);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
min-height: 5rem;
|
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
padding: 24px;
|
padding: 24px;
|
||||||
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.20);
|
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.20);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
min-height: 5rem;
|
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import { Link } from 'react-router-dom';
|
|||||||
import { Row, Col, Button, Icon, Card } from 'antd';
|
import { Row, Col, Button, Icon, Card } from 'antd';
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { withRouter } from 'react-router';
|
import { withRouter } from 'react-router';
|
||||||
import { logoSVG } from '../../common.js';
|
import { logoSVG, getImgPath } from '../../common.js';
|
||||||
import { changeMenuItem } from '../../reducer/modules/menu'
|
import { changeMenuItem } from '../../reducer/modules/menu'
|
||||||
|
|
||||||
const HomeGuest = () => (
|
const HomeGuest = () => (
|
||||||
@ -33,7 +33,7 @@ const HomeGuest = () => (
|
|||||||
{logoSVG('72px')}
|
{logoSVG('72px')}
|
||||||
<span className="name">YAPI</span>
|
<span className="name">YAPI</span>
|
||||||
</div>
|
</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">
|
<div className="btn-group">
|
||||||
<Link to="/login"><Button type="primary" className="btn-home btn-login">登录 / 注册</Button></Link>
|
<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>
|
<Button className="btn-home btn-home-normal" id="qsso-login">QSSO 登录</Button>
|
||||||
@ -42,7 +42,7 @@ const HomeGuest = () => (
|
|||||||
</Col>
|
</Col>
|
||||||
<Col span={15}>
|
<Col span={15}>
|
||||||
<div className="img-container">
|
<div className="img-container">
|
||||||
<img className="img" src="./image/demo-img.jpg"/>
|
<img className="img" src={getImgPath('./image/demo-img', 'jpg')}/>
|
||||||
</div>
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
@ -55,18 +55,18 @@ const HomeGuest = () => (
|
|||||||
<Row key="feat-motion-row">
|
<Row key="feat-motion-row">
|
||||||
<Col span={8} className="section-item" key="feat-wrapper-1">
|
<Col span={8} className="section-item" key="feat-wrapper-1">
|
||||||
<Icon type="api" className="img" />
|
<Icon type="api" className="img" />
|
||||||
<h4 className="title">项目接口管理</h4>
|
<h4 className="title">项目管理</h4>
|
||||||
<span className="desc">提供基本的项目分组,项目管理,接口管理功能</span>
|
<span className="desc">提供基本的项目分组,项目管理,接口管理功能</span>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={8} className="section-item" key="feat-wrapper-2">
|
<Col span={8} className="section-item" key="feat-wrapper-2">
|
||||||
<Icon type="code-o" className="img" />
|
<Icon type="code-o" className="img" />
|
||||||
<h4 className="title">可部署</h4>
|
<h4 className="title">接口管理</h4>
|
||||||
<span className="desc">用户只需配置接口的基本路径,通过将线上域名指到我们的YApi平台服务器,就可使用mockServer服务</span>
|
<span className="desc">友好的接口文档,基于websocket的多人协作接口编辑功能和类postman测试工具,让多人协作成倍提升开发效率</span>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={8} className="section-item" key="feat-wrapper-3">
|
<Col span={8} className="section-item" key="feat-wrapper-3">
|
||||||
<Icon type="team" className="img" />
|
<Icon type="team" className="img" />
|
||||||
<h4 className="title">用户管理</h4>
|
<h4 className="title">MockServer</h4>
|
||||||
<span className="desc">提供基本的用户注册登录管理等功能,集成了去哪儿QSSO登录</span>
|
<span className="desc">基于Mockjs,使用简单功能强大</span>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
@ -101,7 +101,7 @@ const HomeGuest = () => (
|
|||||||
</Col>
|
</Col>
|
||||||
<Col span={12} className="section-card mock-after">
|
<Col span={12} className="section-card mock-after">
|
||||||
<Card title="生成的 Mock 数据">
|
<Card title="生成的 Mock 数据">
|
||||||
<p className="mock-desc">生成的 Mock 数据可以在线使用,也可以下载到本地使用。</p>
|
<p className="mock-desc">生成的 Mock 数据可以直接用 ajax 请求使用,也可以通过服务器代理使用(不需要修改项目一行代码)</p>
|
||||||
<div className="code">
|
<div className="code">
|
||||||
<ol start="1">
|
<ol start="1">
|
||||||
<li className="alt"><span className="orderNum orderNum-first">1</span><span><span>{  </span></span></li>
|
<li className="alt"><span className="orderNum orderNum-first">1</span><span><span>{  </span></span></li>
|
||||||
|
@ -264,7 +264,7 @@ $color-bg-lightblue: #c6e2ff;
|
|||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
text-align: right;
|
text-align: right;
|
||||||
.img{
|
.img{
|
||||||
width: 7.3rem;
|
width: 7.12rem;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
box-shadow : 0 30px 60px rgba(0,0,0,0.2);
|
box-shadow : 0 30px 60px rgba(0,0,0,0.2);
|
||||||
}
|
}
|
||||||
|
@ -41,5 +41,5 @@
|
|||||||
|
|
||||||
#### 4.4 测试接口
|
#### 4.4 测试接口
|
||||||
点击运行tab,可进入到接口测试页面,首先安装chrome crossRequest扩展,才可正常使用此功能
|
点击运行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 />
|
||||||
点击保存按钮可把当前测试保存到测试集,方便下次调试
|
点击保存按钮可把当前测试保存到测试集,方便下次调试
|
@ -94,7 +94,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3 class="home-thumbnail-name">项目管理</h3>
|
<h3 class="home-thumbnail-name">项目管理</h3>
|
||||||
<p class="home-thumbnail-desc">无论是大企业还是创业团队,Yapi成熟的团队管理,项目权限和优化的交互都能满足您的需求</p>
|
<p class="home-thumbnail-desc">YApi成熟的团队管理,扁平化项目权限配置满足各类企业的需求</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="home-item">
|
<div class="home-item">
|
||||||
@ -114,7 +114,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3 class="home-thumbnail-name">MockServer</h3>
|
<h3 class="home-thumbnail-name">MockServer</h3>
|
||||||
<p class="home-thumbnail-desc">基于Mockjs,使用简单,功能强大</p>
|
<p class="home-thumbnail-desc">基于Mockjs,使用简单功能强大</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
<p><img src="./images/interface_add.png" width="400" style="margin:0px auto;display:block;" alt="图片名称" align=center /></p>
|
<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.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扩展,才可正常使用此功能
|
<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>
|
点击保存按钮可把当前测试保存到测试集,方便下次调试</p>
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
|
Before Width: | Height: | Size: 98 KiB |
BIN
static/image/demo-img@1x.jpg
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
static/image/demo-img@2x.jpg
Normal file
After Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 209 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 4.1 KiB |
@ -39,7 +39,7 @@
|
|||||||
"content": [{ // 三列布局的内容,每项的key值非必需,但建议每列的key值一致
|
"content": [{ // 三列布局的内容,每项的key值非必需,但建议每列的key值一致
|
||||||
"name": "项目管理", // 板块名称
|
"name": "项目管理", // 板块名称
|
||||||
"src": "http://ojk406wln.bkt.clouddn.com/intro_muti.png", // 缩略图
|
"src": "http://ojk406wln.bkt.clouddn.com/intro_muti.png", // 缩略图
|
||||||
"desc": "无论是大企业还是创业团队,Yapi成熟的团队管理,项目权限和优化的交互都能满足您的需求" // 描述
|
"desc": "YApi成熟的团队管理,扁平化项目权限配置满足各类企业的需求" // 描述
|
||||||
},{
|
},{
|
||||||
"name": "接口管理",
|
"name": "接口管理",
|
||||||
"src": "http://ojk406wln.bkt.clouddn.com/intro_md.png",
|
"src": "http://ojk406wln.bkt.clouddn.com/intro_md.png",
|
||||||
@ -47,7 +47,7 @@
|
|||||||
},{
|
},{
|
||||||
"name": "MockServer",
|
"name": "MockServer",
|
||||||
"src": "http://ojk406wln.bkt.clouddn.com/intro_theme.png",
|
"src": "http://ojk406wln.bkt.clouddn.com/intro_theme.png",
|
||||||
"desc": "基于Mockjs,使用简单,功能强大"
|
"desc": "基于Mockjs,使用简单功能强大"
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
|