mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-15 05:10:47 +08:00
Merge branch 'dev' of gitlab.corp.qunar.com:mfe/yapi into dev
This commit is contained in:
commit
c1a4c8b745
@ -1,4 +1,7 @@
|
||||
## 介绍
|
||||
进入项目页,可以看到项目下的所有接口,需要注意的是,YApi有 `接口集合` 和 `测试集合` 两个概念。
|
||||
|
||||
- `接口集合` 将接口进行分类,使结构结构更清晰,一个接口只能属于一个集合,且不允许与其他接口重名。
|
||||
- `测试集合` 为了方便我们测试接口,`测试集合` 将若干接口组合在一起,在这里一个接口可以属于不同集合。
|
||||
|
||||
## 接口配置
|
||||
|
||||
|
5107
static/doc/api.html
5107
static/doc/api.html
File diff suppressed because it is too large
Load Diff
@ -9,7 +9,13 @@
|
||||
<meta name="description" content="description of your site">
|
||||
<meta name="author" content="author of the site">
|
||||
<title>YApi 首页</title>
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -32,11 +38,6 @@
|
||||
<a href="usage.html">使用手册</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="manage.html">管理学院</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="api.html"></a>
|
||||
@ -74,7 +75,7 @@
|
||||
|
||||
<div class="ydoc-container">
|
||||
|
||||
<div class="ydoc-container-content" id="readme">
|
||||
<div class="ydoc-container-content ydoc-container-home" id="readme">
|
||||
|
||||
|
||||
<h1 class="home-page-title">为API开发者设计的管理平台</h1>
|
||||
@ -149,7 +150,7 @@
|
||||
<script src="source/app.js"></script>
|
||||
|
||||
<script>
|
||||
var lineHeight = 17.4;
|
||||
var lineHeight = 18;
|
||||
var EXAMPLE_MAX_HEIGHT;
|
||||
|
||||
function fold() {
|
||||
@ -173,8 +174,8 @@
|
||||
var $this = $(this);
|
||||
$this.removeClass('extend').addClass('fold');
|
||||
$this.html('折叠代码');
|
||||
$this.prev().height('auto');
|
||||
$this.prev().parent().height('auto');
|
||||
$this.parent().children('.js-code').height('auto');
|
||||
$this.parent().height('auto');
|
||||
});
|
||||
$('.ydoc-example').delegate('.fold', 'click', function() {
|
||||
var $this = $(this);
|
||||
@ -182,7 +183,7 @@
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
$this.removeClass('fold').addClass('extend');
|
||||
$this.parent().height(EXAMPLE_MAX_HEIGHT); // pre
|
||||
$this.prev().height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.parent().children('.js-code').height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.html("展开更多……");
|
||||
});
|
||||
}
|
||||
|
@ -1,170 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
|
||||
<meta name="format-detection" content="telephone=no,email=no" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge, chrome=1">
|
||||
<meta name="description" content="description of your site">
|
||||
<meta name="author" content="author of the site">
|
||||
<title>YApi 管理学院</title>
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
<header class="ydoc-header">
|
||||
<div class="ydoc-header-area">
|
||||
|
||||
<a href="http://ued.qunar.com/ymfe/" class="navbar-brand">YMFE</a>
|
||||
|
||||
<button class="ydocIcon navbar-toggle"></button>
|
||||
<nav class="ydoc-nav">
|
||||
<ul class="navbar-left">
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="index.html">首页</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="usage.html">使用手册</a>
|
||||
</li>
|
||||
|
||||
<li class="active">
|
||||
|
||||
<a href="manage.html">管理学院</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="api.html"></a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- <header style="height:20px"></header> -->
|
||||
|
||||
<!-- Docs page layout -->
|
||||
|
||||
<div class="ydoc-banner-bg">
|
||||
<div class="ydoc-banner ">
|
||||
<div class="ydoc-banner-area">
|
||||
<h1 >管理学院</h1>
|
||||
<p class="desc ">超级管理员、分组/项目组长的学院。</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ydoc-container">
|
||||
|
||||
<div class="ydoc-container-content">
|
||||
|
||||
|
||||
<div class="content-left " role="complementary">
|
||||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav docs-sidenav">
|
||||
|
||||
<!-- <li class="active" class="active" > -->
|
||||
<li class="active" >
|
||||
|
||||
<a href="manage-介绍.html">介绍</a>
|
||||
</li>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="manage-部署.html">部署</a>
|
||||
</li>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="manage-超管职责.html">超管职责</a>
|
||||
</li>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="manage-版本升级.html">版本升级</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="content-right markdown-body " role="main">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="copyright">
|
||||
© 2016 <a href="http://ued.qunar.com/ymfe/">YMFE</a> Team. Build by <a href="http://ued.qunar.com/ydoc/">ydoc</a>.
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="open-panel"></div>
|
||||
<div class="mask"></div>
|
||||
|
||||
|
||||
<script src="source/main.js"></script>
|
||||
<script src="source/app.js"></script>
|
||||
|
||||
<script>
|
||||
var lineHeight = 17.4;
|
||||
var EXAMPLE_MAX_HEIGHT;
|
||||
|
||||
function fold() {
|
||||
// 折叠code
|
||||
$('.markdown-body pre').css({
|
||||
"line-height": lineHeight + "px"
|
||||
});
|
||||
$('.markdown-body pre').map(function(i, item) {
|
||||
var $item = $(item);
|
||||
var foldnumber = $item.data('foldnumber');
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
if ($item.height() > EXAMPLE_MAX_HEIGHT) {
|
||||
$item.css({
|
||||
"padding-bottom": 30
|
||||
});
|
||||
$item.find('code').height(EXAMPLE_MAX_HEIGHT);
|
||||
$item.append('<span class="extend">展开更多……</span>');
|
||||
};
|
||||
});
|
||||
$('.ydoc-example').delegate('.extend', 'click', function() {
|
||||
var $this = $(this);
|
||||
$this.removeClass('extend').addClass('fold');
|
||||
$this.html('折叠代码');
|
||||
$this.prev().height('auto');
|
||||
$this.prev().parent().height('auto');
|
||||
});
|
||||
$('.ydoc-example').delegate('.fold', 'click', function() {
|
||||
var $this = $(this);
|
||||
var foldnumber = $this.parent().data('foldnumber');
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
$this.removeClass('fold').addClass('extend');
|
||||
$this.parent().height(EXAMPLE_MAX_HEIGHT); // pre
|
||||
$this.prev().height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.html("展开更多……");
|
||||
});
|
||||
}
|
||||
$(document).ready(fold);
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,171 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
|
||||
<meta name="format-detection" content="telephone=no,email=no" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge, chrome=1">
|
||||
<meta name="description" content="description of your site">
|
||||
<meta name="author" content="author of the site">
|
||||
<title>YApi 管理学院</title>
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
<header class="ydoc-header">
|
||||
<div class="ydoc-header-area">
|
||||
|
||||
<a href="http://ued.qunar.com/ymfe/" class="navbar-brand">YMFE</a>
|
||||
|
||||
<button class="ydocIcon navbar-toggle"></button>
|
||||
<nav class="ydoc-nav">
|
||||
<ul class="navbar-left">
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="index.html">首页</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="usage.html">使用手册</a>
|
||||
</li>
|
||||
|
||||
<li class="active">
|
||||
|
||||
<a href="manage.html">管理学院</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="api.html"></a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- <header style="height:20px"></header> -->
|
||||
|
||||
<!-- Docs page layout -->
|
||||
|
||||
<div class="ydoc-banner-bg">
|
||||
<div class="ydoc-banner ">
|
||||
<div class="ydoc-banner-area">
|
||||
<h1 >管理学院</h1>
|
||||
<p class="desc ">超级管理员、分组/项目组长的学院。</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ydoc-container">
|
||||
|
||||
<div class="ydoc-container-content">
|
||||
|
||||
|
||||
<div class="content-left " role="complementary">
|
||||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav docs-sidenav">
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="manage-介绍.html">介绍</a>
|
||||
</li>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="manage-部署.html">部署</a>
|
||||
</li>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="manage-超管职责.html">超管职责</a>
|
||||
</li>
|
||||
|
||||
<!-- <li class="active" class="active" > -->
|
||||
<li class="active" >
|
||||
|
||||
<a href="manage-版本升级.html">版本升级</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="content-right markdown-body " role="main">
|
||||
|
||||
<p>版本升级</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="copyright">
|
||||
© 2016 <a href="http://ued.qunar.com/ymfe/">YMFE</a> Team. Build by <a href="http://ued.qunar.com/ydoc/">ydoc</a>.
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="open-panel"></div>
|
||||
<div class="mask"></div>
|
||||
|
||||
|
||||
<script src="source/main.js"></script>
|
||||
<script src="source/app.js"></script>
|
||||
|
||||
<script>
|
||||
var lineHeight = 17.4;
|
||||
var EXAMPLE_MAX_HEIGHT;
|
||||
|
||||
function fold() {
|
||||
// 折叠code
|
||||
$('.markdown-body pre').css({
|
||||
"line-height": lineHeight + "px"
|
||||
});
|
||||
$('.markdown-body pre').map(function(i, item) {
|
||||
var $item = $(item);
|
||||
var foldnumber = $item.data('foldnumber');
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
if ($item.height() > EXAMPLE_MAX_HEIGHT) {
|
||||
$item.css({
|
||||
"padding-bottom": 30
|
||||
});
|
||||
$item.find('code').height(EXAMPLE_MAX_HEIGHT);
|
||||
$item.append('<span class="extend">展开更多……</span>');
|
||||
};
|
||||
});
|
||||
$('.ydoc-example').delegate('.extend', 'click', function() {
|
||||
var $this = $(this);
|
||||
$this.removeClass('extend').addClass('fold');
|
||||
$this.html('折叠代码');
|
||||
$this.prev().height('auto');
|
||||
$this.prev().parent().height('auto');
|
||||
});
|
||||
$('.ydoc-example').delegate('.fold', 'click', function() {
|
||||
var $this = $(this);
|
||||
var foldnumber = $this.parent().data('foldnumber');
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
$this.removeClass('fold').addClass('extend');
|
||||
$this.parent().height(EXAMPLE_MAX_HEIGHT); // pre
|
||||
$this.prev().height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.html("展开更多……");
|
||||
});
|
||||
}
|
||||
$(document).ready(fold);
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,186 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
|
||||
<meta name="format-detection" content="telephone=no,email=no" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge, chrome=1">
|
||||
<meta name="description" content="description of your site">
|
||||
<meta name="author" content="author of the site">
|
||||
<title>YApi 管理学院</title>
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
<header class="ydoc-header">
|
||||
<div class="ydoc-header-area">
|
||||
|
||||
<a href="http://ued.qunar.com/ymfe/" class="navbar-brand">YMFE</a>
|
||||
|
||||
<button class="ydocIcon navbar-toggle"></button>
|
||||
<nav class="ydoc-nav">
|
||||
<ul class="navbar-left">
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="index.html">首页</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="usage.html">使用手册</a>
|
||||
</li>
|
||||
|
||||
<li class="active">
|
||||
|
||||
<a href="manage.html">管理学院</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="api.html"></a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- <header style="height:20px"></header> -->
|
||||
|
||||
<!-- Docs page layout -->
|
||||
|
||||
<div class="ydoc-banner-bg">
|
||||
<div class="ydoc-banner ">
|
||||
<div class="ydoc-banner-area">
|
||||
<h1 >管理学院</h1>
|
||||
<p class="desc ">超级管理员、分组/项目组长的学院。</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ydoc-container">
|
||||
|
||||
<div class="ydoc-container-content">
|
||||
|
||||
|
||||
<div class="content-left " role="complementary">
|
||||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav docs-sidenav">
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="manage-介绍.html">介绍</a>
|
||||
</li>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="manage-部署.html">部署</a>
|
||||
</li>
|
||||
|
||||
<!-- <li class="active" class="active" > -->
|
||||
<li class="active" >
|
||||
|
||||
<a href="manage-超管职责.html">超管职责</a>
|
||||
</li>
|
||||
|
||||
<ul class="nav docs-sidenav-extend" >
|
||||
|
||||
<li >
|
||||
<a href="#用户管理">用户管理</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#分配组长">分配组长</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#维护数据库">维护数据库</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="manage-版本升级.html">版本升级</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="content-right markdown-body " role="main">
|
||||
|
||||
<h2 class="subject" id="用户管理">用户管理 <a class="hashlink" href="#用户管理">#</a></h2><h2 class="subject" id="分配组长">分配组长 <a class="hashlink" href="#分配组长">#</a></h2><h2 class="subject" id="维护数据库">维护数据库 <a class="hashlink" href="#维护数据库">#</a></h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="copyright">
|
||||
© 2016 <a href="http://ued.qunar.com/ymfe/">YMFE</a> Team. Build by <a href="http://ued.qunar.com/ydoc/">ydoc</a>.
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="open-panel"></div>
|
||||
<div class="mask"></div>
|
||||
|
||||
|
||||
<script src="source/main.js"></script>
|
||||
<script src="source/app.js"></script>
|
||||
|
||||
<script>
|
||||
var lineHeight = 17.4;
|
||||
var EXAMPLE_MAX_HEIGHT;
|
||||
|
||||
function fold() {
|
||||
// 折叠code
|
||||
$('.markdown-body pre').css({
|
||||
"line-height": lineHeight + "px"
|
||||
});
|
||||
$('.markdown-body pre').map(function(i, item) {
|
||||
var $item = $(item);
|
||||
var foldnumber = $item.data('foldnumber');
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
if ($item.height() > EXAMPLE_MAX_HEIGHT) {
|
||||
$item.css({
|
||||
"padding-bottom": 30
|
||||
});
|
||||
$item.find('code').height(EXAMPLE_MAX_HEIGHT);
|
||||
$item.append('<span class="extend">展开更多……</span>');
|
||||
};
|
||||
});
|
||||
$('.ydoc-example').delegate('.extend', 'click', function() {
|
||||
var $this = $(this);
|
||||
$this.removeClass('extend').addClass('fold');
|
||||
$this.html('折叠代码');
|
||||
$this.prev().height('auto');
|
||||
$this.prev().parent().height('auto');
|
||||
});
|
||||
$('.ydoc-example').delegate('.fold', 'click', function() {
|
||||
var $this = $(this);
|
||||
var foldnumber = $this.parent().data('foldnumber');
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
$this.removeClass('fold').addClass('extend');
|
||||
$this.parent().height(EXAMPLE_MAX_HEIGHT); // pre
|
||||
$this.prev().height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.html("展开更多……");
|
||||
});
|
||||
}
|
||||
$(document).ready(fold);
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,182 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
|
||||
<meta name="format-detection" content="telephone=no,email=no" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge, chrome=1">
|
||||
<meta name="description" content="description of your site">
|
||||
<meta name="author" content="author of the site">
|
||||
<title>YApi 管理学院</title>
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
<header class="ydoc-header">
|
||||
<div class="ydoc-header-area">
|
||||
|
||||
<a href="http://ued.qunar.com/ymfe/" class="navbar-brand">YMFE</a>
|
||||
|
||||
<button class="ydocIcon navbar-toggle"></button>
|
||||
<nav class="ydoc-nav">
|
||||
<ul class="navbar-left">
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="index.html">首页</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="usage.html">使用手册</a>
|
||||
</li>
|
||||
|
||||
<li class="active">
|
||||
|
||||
<a href="manage.html">管理学院</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="api.html"></a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- <header style="height:20px"></header> -->
|
||||
|
||||
<!-- Docs page layout -->
|
||||
|
||||
<div class="ydoc-banner-bg">
|
||||
<div class="ydoc-banner ">
|
||||
<div class="ydoc-banner-area">
|
||||
<h1 >管理学院</h1>
|
||||
<p class="desc ">超级管理员、分组/项目组长的学院。</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ydoc-container">
|
||||
|
||||
<div class="ydoc-container-content">
|
||||
|
||||
|
||||
<div class="content-left " role="complementary">
|
||||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav docs-sidenav">
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="manage-介绍.html">介绍</a>
|
||||
</li>
|
||||
|
||||
<!-- <li class="active" class="active" > -->
|
||||
<li class="active" >
|
||||
|
||||
<a href="manage-部署.html">部署</a>
|
||||
</li>
|
||||
|
||||
<ul class="nav docs-sidenav-extend" >
|
||||
|
||||
<li >
|
||||
<a href="#快速部署">快速部署</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#配置说明">配置说明</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="manage-超管职责.html">超管职责</a>
|
||||
</li>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="manage-版本升级.html">版本升级</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="content-right markdown-body " role="main">
|
||||
|
||||
<h2 class="subject" id="快速部署">快速部署 <a class="hashlink" href="#快速部署">#</a></h2><h2 class="subject" id="配置说明">配置说明 <a class="hashlink" href="#配置说明">#</a></h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="copyright">
|
||||
© 2016 <a href="http://ued.qunar.com/ymfe/">YMFE</a> Team. Build by <a href="http://ued.qunar.com/ydoc/">ydoc</a>.
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="open-panel"></div>
|
||||
<div class="mask"></div>
|
||||
|
||||
|
||||
<script src="source/main.js"></script>
|
||||
<script src="source/app.js"></script>
|
||||
|
||||
<script>
|
||||
var lineHeight = 17.4;
|
||||
var EXAMPLE_MAX_HEIGHT;
|
||||
|
||||
function fold() {
|
||||
// 折叠code
|
||||
$('.markdown-body pre').css({
|
||||
"line-height": lineHeight + "px"
|
||||
});
|
||||
$('.markdown-body pre').map(function(i, item) {
|
||||
var $item = $(item);
|
||||
var foldnumber = $item.data('foldnumber');
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
if ($item.height() > EXAMPLE_MAX_HEIGHT) {
|
||||
$item.css({
|
||||
"padding-bottom": 30
|
||||
});
|
||||
$item.find('code').height(EXAMPLE_MAX_HEIGHT);
|
||||
$item.append('<span class="extend">展开更多……</span>');
|
||||
};
|
||||
});
|
||||
$('.ydoc-example').delegate('.extend', 'click', function() {
|
||||
var $this = $(this);
|
||||
$this.removeClass('extend').addClass('fold');
|
||||
$this.html('折叠代码');
|
||||
$this.prev().height('auto');
|
||||
$this.prev().parent().height('auto');
|
||||
});
|
||||
$('.ydoc-example').delegate('.fold', 'click', function() {
|
||||
var $this = $(this);
|
||||
var foldnumber = $this.parent().data('foldnumber');
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
$this.removeClass('fold').addClass('extend');
|
||||
$this.parent().height(EXAMPLE_MAX_HEIGHT); // pre
|
||||
$this.prev().height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.html("展开更多……");
|
||||
});
|
||||
}
|
||||
$(document).ready(fold);
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
@ -1,170 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
|
||||
<meta name="format-detection" content="telephone=no,email=no" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge, chrome=1">
|
||||
<meta name="description" content="description of your site">
|
||||
<meta name="author" content="author of the site">
|
||||
<title>YApi 管理学院</title>
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
<header class="ydoc-header">
|
||||
<div class="ydoc-header-area">
|
||||
|
||||
<a href="http://ued.qunar.com/ymfe/" class="navbar-brand">YMFE</a>
|
||||
|
||||
<button class="ydocIcon navbar-toggle"></button>
|
||||
<nav class="ydoc-nav">
|
||||
<ul class="navbar-left">
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="index.html">首页</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="usage.html">使用手册</a>
|
||||
</li>
|
||||
|
||||
<li class="active">
|
||||
|
||||
<a href="manage.html">管理学院</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="api.html"></a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- <header style="height:20px"></header> -->
|
||||
|
||||
<!-- Docs page layout -->
|
||||
|
||||
<div class="ydoc-banner-bg">
|
||||
<div class="ydoc-banner ">
|
||||
<div class="ydoc-banner-area">
|
||||
<h1 >管理学院</h1>
|
||||
<p class="desc ">超级管理员、分组/项目组长的学院。</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="ydoc-container">
|
||||
|
||||
<div class="ydoc-container-content">
|
||||
|
||||
|
||||
<div class="content-left " role="complementary">
|
||||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav docs-sidenav">
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="manage-介绍.html">介绍</a>
|
||||
</li>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="manage-部署.html">部署</a>
|
||||
</li>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="manage-超管职责.html">超管职责</a>
|
||||
</li>
|
||||
|
||||
<!-- <li > -->
|
||||
<li >
|
||||
|
||||
<a href="manage-版本升级.html">版本升级</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="content-right markdown-body " role="main">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="copyright">
|
||||
© 2016 <a href="http://ued.qunar.com/ymfe/">YMFE</a> Team. Build by <a href="http://ued.qunar.com/ydoc/">ydoc</a>.
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="open-panel"></div>
|
||||
<div class="mask"></div>
|
||||
|
||||
|
||||
<script src="source/main.js"></script>
|
||||
<script src="source/app.js"></script>
|
||||
|
||||
<script>
|
||||
var lineHeight = 17.4;
|
||||
var EXAMPLE_MAX_HEIGHT;
|
||||
|
||||
function fold() {
|
||||
// 折叠code
|
||||
$('.markdown-body pre').css({
|
||||
"line-height": lineHeight + "px"
|
||||
});
|
||||
$('.markdown-body pre').map(function(i, item) {
|
||||
var $item = $(item);
|
||||
var foldnumber = $item.data('foldnumber');
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
if ($item.height() > EXAMPLE_MAX_HEIGHT) {
|
||||
$item.css({
|
||||
"padding-bottom": 30
|
||||
});
|
||||
$item.find('code').height(EXAMPLE_MAX_HEIGHT);
|
||||
$item.append('<span class="extend">展开更多……</span>');
|
||||
};
|
||||
});
|
||||
$('.ydoc-example').delegate('.extend', 'click', function() {
|
||||
var $this = $(this);
|
||||
$this.removeClass('extend').addClass('fold');
|
||||
$this.html('折叠代码');
|
||||
$this.prev().height('auto');
|
||||
$this.prev().parent().height('auto');
|
||||
});
|
||||
$('.ydoc-example').delegate('.fold', 'click', function() {
|
||||
var $this = $(this);
|
||||
var foldnumber = $this.parent().data('foldnumber');
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
$this.removeClass('fold').addClass('extend');
|
||||
$this.parent().height(EXAMPLE_MAX_HEIGHT); // pre
|
||||
$this.prev().height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.html("展开更多……");
|
||||
});
|
||||
}
|
||||
$(document).ready(fold);
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
@ -129,26 +129,10 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
$('.markdown-body pre').map(function(i, item) {
|
||||
$(item).addClass('ydoc-example');
|
||||
$(item).addClass('ydoc-example').append('<div class="ui-copy js-copy" data-clipboard-action="copy" data-clipboard-target=".js-code-' + i + '" data-copy-number="' + i + '">copy</div><div class="copy-tip copy-tip-' + i + '">已复制</div>');
|
||||
$(item).children('code').addClass('js-code-'+i);
|
||||
});
|
||||
|
||||
// $('code').each(function(i, block) {
|
||||
// if (block.innerHTML.indexOf('\n') != -1) {
|
||||
// var pn = block.parentNode;
|
||||
// if (pn.tagName.toUpperCase() == 'PRE') {
|
||||
// try {
|
||||
// hljs.highlightBlock(block);
|
||||
// } catch(e) {}
|
||||
// } else {
|
||||
// pn.innerHTML = '<pre><code>' + block.innerHTML + '</code></pre>';
|
||||
// try {
|
||||
// hljs.highlightBlock(pn.childNodes[0].childNodes[0]);
|
||||
// } catch(e) {}
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
var winHeight = $(window).height() - 44,
|
||||
sidebar = $('.docs-sidebar');
|
||||
var docSideNav = $('.docs-sidenav');
|
||||
@ -205,46 +189,9 @@ $(document).ready(function() {
|
||||
|
||||
// 退出全屏浏览器窗口大小改变,不触发resize
|
||||
$(window).on('resize', function(e) {
|
||||
resizeSidebar();
|
||||
$contentLeftWidth = $contentLeft.width() - 1;
|
||||
});
|
||||
|
||||
function resizeSidebar() {
|
||||
var winHeight = $(window).height() - 44,
|
||||
sidebar = $('.docs-sidebar');
|
||||
var docSideNav = $('.docs-sidenav');
|
||||
if (winWidth > 767) {
|
||||
docSideNav.width($contentLeftWidth);
|
||||
}
|
||||
if (sidebar.height() > winHeight) {
|
||||
sidebar.css('max-height', winHeight + 'px');
|
||||
$('.docs-sidenav').css('max-height', winHeight + 'px');
|
||||
$('.docs-sidenav').css({
|
||||
'overflow-y': 'scroll',
|
||||
'overflow-x': 'hidden'
|
||||
});
|
||||
var barScroll = false;
|
||||
|
||||
sidebar.on('mouseover', function() {
|
||||
barScroll = true;
|
||||
});
|
||||
|
||||
sidebar.on('mouseout', function() {
|
||||
barScroll = false;
|
||||
});
|
||||
// scroll
|
||||
if ($(window).scrollTop() > ($('.footer').offset().top - $(window).height())) {
|
||||
winHeight = $(window).height() - $('.footer').outerHeight() - 44;
|
||||
sidebar.css('max-height', winHeight + 'px');
|
||||
$('.docs-sidenav').css('max-height', winHeight + 'px');
|
||||
} else {
|
||||
winHeight = $(window).height() - 44;
|
||||
sidebar.css('max-height', winHeight + 'px');
|
||||
$('.docs-sidenav').css('max-height', winHeight + 'px');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function sortAsOffset(propertyName) {
|
||||
return function(obj1, obj2) {
|
||||
var val1 = obj1[propertyName];
|
||||
@ -267,4 +214,17 @@ $(document).ready(function() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 代码复制功能
|
||||
var clipboard = new Clipboard('.js-copy');
|
||||
|
||||
clipboard.on('success', function(e) {
|
||||
var copyNumber = $(e.trigger).attr('data-copy-number');
|
||||
$('.copy-tip-'+copyNumber).show();
|
||||
setTimeout(function() {
|
||||
$('.copy-tip-'+copyNumber).hide();
|
||||
}, 1000);
|
||||
e.clearSelection();
|
||||
});
|
||||
|
||||
});
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -9,7 +9,13 @@
|
||||
<meta name="description" content="description of your site">
|
||||
<meta name="author" content="author of the site">
|
||||
<title>YApi 使用手册</title>
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -32,11 +38,6 @@
|
||||
<a href="usage.html">使用手册</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="manage.html">管理学院</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="api.html"></a>
|
||||
@ -63,10 +64,10 @@
|
||||
|
||||
<div class="ydoc-container">
|
||||
|
||||
<div class="ydoc-container-content">
|
||||
<div class="ydoc-container-content ">
|
||||
|
||||
|
||||
<div class="content-left " role="complementary">
|
||||
<div class="content-left staticsidenav" role="complementary">
|
||||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav docs-sidenav">
|
||||
|
||||
@ -140,7 +141,7 @@
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="content-right markdown-body " role="main">
|
||||
<div class="content-right markdown-body use-sidebar" role="main">
|
||||
|
||||
<h2 class="subject" id="Mock介绍">Mock介绍 <a class="hashlink" href="#Mock介绍">#</a></h2> <p style='text-indent:2em;line-height:1.8em'>yapi的Mock功能可以根据用户的输入接口信息如协议、URL、接口名、请求头、请求参数、mock规则(<a href="#mock">点击到Mock规则</a>)生成Mock接口,这些接口会自动生成模拟数据,创建者可以自由构造需要的数据。而且与常见的Mock方式如将Mock写在代码里和JS拦截等相比yapi的Mock在使用场景和效率和复杂度上是相差甚远的,正是由于yapi的Mock是一个第三方平台,那么在团队开发时任何人都可以权限许可下创建、修改接口信息等操作,这对于团队开发是很有好处的。 </p>
|
||||
|
||||
@ -171,26 +172,26 @@
|
||||
"name|regexp"<span class="token operator">:</span> <span class="token string">"[a-z0-9_]+?"</span><span class="token punctuation">,</span>
|
||||
"type|regexp"<span class="token operator">:</span> "json|text|xml" //枚举数据类型可这样实现
|
||||
<span class="token punctuation">}</span>
|
||||
</code></pre><h2 class="subject" id="如何使用Mock?">如何使用Mock? <a class="hashlink" href="#如何使用Mock?">#</a></h2><h3 class="subject" id="1 在js代码直接请求yapi提供的mock地址(不用担心跨域问题)">1 在js代码直接请求yapi提供的mock地址(不用担心跨域问题) <a class="hashlink" href="#1 在js代码直接请求yapi提供的mock地址(不用担心跨域问题)">#</a></h3><p>在代码直接请求yapi提供的mock地址,以jQuery为例:</p>
|
||||
</code></pre><h2 class="subject" id="如何使用Mock?">如何使用Mock? <a class="hashlink" href="#如何使用Mock?">#</a></h2><h3 class="subject" id="1_在js代码直接请求yapi提供的mock地址(不用担心跨域问题)">1 在js代码直接请求yapi提供的mock地址(不用担心跨域问题) <a class="hashlink" href="#1_在js代码直接请求yapi提供的mock地址(不用担心跨域问题)">#</a></h3><p>在代码直接请求yapi提供的mock地址,以jQuery为例:</p>
|
||||
<pre><code class="lang-javascript"><span class="token keyword">let</span> prefix <span class="token operator">=</span> <span class="token string">'http://yapi.local.qunar.com:3000/mock/2817'</span>
|
||||
$<span class="token punctuation">.</span><span class="token function">post</span><span class="token punctuation">(</span>prefix<span class="token operator">+</span><span class="token string">'/baseapi/path'</span><span class="token punctuation">,</span> <span class="token punctuation">{</span>username<span class="token punctuation">:</span> <span class="token string">'xxx'</span><span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token keyword">function</span><span class="token punctuation">(</span>res<span class="token punctuation">)</span><span class="token punctuation">{</span>
|
||||
console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span>res<span class="token punctuation">)</span> <span class="token comment" spellcheck="true">//返回上图预览部分的数据</span>
|
||||
<span class="token punctuation">}</span><span class="token punctuation">)</span>
|
||||
</code></pre>
|
||||
<h3 class="subject" id="2 基于本地服务器反向代理">2 基于本地服务器反向代理 <a class="hashlink" href="#2 基于本地服务器反向代理">#</a></h3><p>优点:不用修改项目代码</p>
|
||||
<h4 class="subject" id="2.1 基于nginx反向代理">2.1 基于nginx反向代理 <a class="hashlink" href="#2.1 基于nginx反向代理">#</a></h4><pre><code class="lang-nginx"><span class="token keyword">location</span> <span class="token operator">/</span>baseapi
|
||||
<h3 class="subject" id="2_基于本地服务器反向代理">2 基于本地服务器反向代理 <a class="hashlink" href="#2_基于本地服务器反向代理">#</a></h3><p>优点:不用修改项目代码</p>
|
||||
<h4 class="subject" id="2.1_基于nginx反向代理">2.1 基于nginx反向代理 <a class="hashlink" href="#2.1_基于nginx反向代理">#</a></h4><pre><code class="lang-nginx"><span class="token keyword">location</span> <span class="token operator">/</span>baseapi
|
||||
<span class="token punctuation">{</span>
|
||||
<span class="token keyword">proxy_pass</span> <span class="token keyword">http</span><span class="token punctuation">:</span><span class="token operator">/</span><span class="token operator">/</span>yapi<span class="token punctuation">.</span>corp<span class="token punctuation">.</span>qunar<span class="token punctuation">.</span>com<span class="token operator">/</span>mock<span class="token operator">/</span><span class="token number">2817</span><span class="token operator">/</span>baseapi<span class="token punctuation">;</span> <span class="token comment" spellcheck="true">#baseapi后面没有"/"</span>
|
||||
<span class="token punctuation">}</span>
|
||||
</code></pre>
|
||||
<h4 class="subject" id="2.2 基于ykit mock功能">2.2 基于ykit mock功能 <a class="hashlink" href="#2.2 基于ykit mock功能">#</a></h4><pre><code class="lang-javascript"><span class="token punctuation">{</span>
|
||||
<h4 class="subject" id="2.2_基于ykit_mock功能">2.2 基于ykit mock功能 <a class="hashlink" href="#2.2_基于ykit_mock功能">#</a></h4><pre><code class="lang-javascript"><span class="token punctuation">{</span>
|
||||
pattern<span class="token punctuation">:</span> <span class="token regex">/\/api\/(.*)/</span><span class="token punctuation">,</span>
|
||||
responder<span class="token punctuation">:</span> <span class="token string">'http://yapi.corp.qunar.com/mock/58/api/$1'</span>
|
||||
<span class="token punctuation">}</span>
|
||||
</code></pre>
|
||||
<p>上面通过正则匹配,将所有接口转到 <a href="http://yapi.corp.qunar.com">http://yapi.corp.qunar.com</a> 上,比如 <code>http://localhost/api/user/status</code> 会成为 <code>http://yapi.corp.qunar.com/mock/58/api/user/status</code></p>
|
||||
<p>详细使用指南: <a target="_blank" href="https://ykit.ymfe.org/plugins-mock.html#获取远程数据_Map_Remote_">ykit-config-mock</a></p>
|
||||
<h4 class="subject" id="2.3 基于ykit Jerry代理">2.3 基于ykit Jerry代理 <a class="hashlink" href="#2.3 基于ykit Jerry代理">#</a></h4><p>假设您本地服务器访问地址是: <a href="http://xxx.com">http://xxx.com</a></p>
|
||||
<h4 class="subject" id="2.3_基于ykit_Jerry代理">2.3 基于ykit Jerry代理 <a class="hashlink" href="#2.3_基于ykit_Jerry代理">#</a></h4><p>假设您本地服务器访问地址是: <a href="http://xxx.com">http://xxx.com</a></p>
|
||||
<p><img src="./images/ykit.jpg" /></p>
|
||||
<h2 class="subject" id="Mock语法规范">Mock语法规范 <a class="hashlink" href="#Mock语法规范">#</a></h2><blockquote>
|
||||
<p>了解更多Mock详情:<a href="https://github.com/nuysoft/Mock/wiki/Syntax-Specification">Mock.js 官方文档</a></p>
|
||||
@ -199,7 +200,7 @@ $<span class="token punctuation">.</span><span class="token function">post</span
|
||||
<p><a href="#DTD">1. 数据模板定义规范(Data Template Definition,DTD)</a></p>
|
||||
<p><a href="#DPD">2. 数据占位符定义规范(Data Placeholder Definition,DPD)</a></p>
|
||||
<p><span id = "DTD"></span></p>
|
||||
<h3 class="subject" id="数据模板定义规范(Data Template Definition,DTD)">数据模板定义规范(Data Template Definition,DTD) <a class="hashlink" href="#数据模板定义规范(Data Template Definition,DTD)">#</a></h3><p>数据模板中的每个属性由 3 部分构成:属性名、生成规则、属性值:</p>
|
||||
<h3 class="subject" id="数据模板定义规范(Data_Template_Definition,DTD)">数据模板定义规范(Data Template Definition,DTD) <a class="hashlink" href="#数据模板定义规范(Data_Template_Definition,DTD)">#</a></h3><p>数据模板中的每个属性由 3 部分构成:属性名、生成规则、属性值:</p>
|
||||
<pre><code>// 属性名 name (与生成规则之间用 "|<span class="token string">" 隔开)
|
||||
// 生成规则 rule(生成规则有7种详见下面的生成规则)
|
||||
// 属性值 value(可以含有 "</span>@占位符" 同时也指定了最终值的初始值和类型)
|
||||
@ -215,14 +216,14 @@ $<span class="token punctuation">.</span><span class="token function">post</span
|
||||
'name|count.dcount'<span class="token operator">:</span> value
|
||||
'name|+step'<span class="token operator">:</span> value
|
||||
</code></pre><p>下面提供了6种生成规则以及示例包括 String、Number、Boolean、Object、Array:</p>
|
||||
<h3 class="subject" id="1. 属性值是字符串 String">1. 属性值是字符串 String <a class="hashlink" href="#1. 属性值是字符串 String">#</a></h3><pre><code><span class="token number">1</span>. 'name|min-max'<span class="token operator">:</span> string
|
||||
<h3 class="subject" id="1._属性值是字符串_String">1. 属性值是字符串 String <a class="hashlink" href="#1._属性值是字符串_String">#</a></h3><pre><code><span class="token number">1</span>. 'name|min-max'<span class="token operator">:</span> string
|
||||
|
||||
通过重复 string 生成一个字符串,重复次数大于等于 min,小于等于 max。
|
||||
|
||||
<span class="token number">2</span>. 'name|count'<span class="token operator">:</span> string
|
||||
|
||||
通过重复 string 生成一个字符串,重复次数等于 count。
|
||||
</code></pre><h3 class="subject" id="2. 属性值是数字 Number">2. 属性值是数字 Number <a class="hashlink" href="#2. 属性值是数字 Number">#</a></h3><pre><code><span class="token number">1</span>. 'name|+<span class="token number">1</span>'<span class="token operator">:</span> number
|
||||
</code></pre><h3 class="subject" id="2._属性值是数字_Number">2. 属性值是数字 Number <a class="hashlink" href="#2._属性值是数字_Number">#</a></h3><pre><code><span class="token number">1</span>. 'name|+<span class="token number">1</span>'<span class="token operator">:</span> number
|
||||
|
||||
属性值自动加 <span class="token number">1</span>,初始值为 number。
|
||||
|
||||
@ -248,21 +249,21 @@ Mock.mock(<span class="token punctuation">{</span>
|
||||
<span class="token property">"number3"</span><span class="token operator">:</span> <span class="token number">123.777</span><span class="token punctuation">,</span>
|
||||
<span class="token property">"number4"</span><span class="token operator">:</span> <span class="token number">123.1231091814</span>
|
||||
<span class="token punctuation">}</span>
|
||||
</code></pre><h3 class="subject" id="3. 属性值是布尔型 Boolean">3. 属性值是布尔型 Boolean <a class="hashlink" href="#3. 属性值是布尔型 Boolean">#</a></h3><pre><code><span class="token number">1</span>. 'name|<span class="token number">1</span>'<span class="token operator">:</span> boolean
|
||||
</code></pre><h3 class="subject" id="3._属性值是布尔型_Boolean">3. 属性值是布尔型 Boolean <a class="hashlink" href="#3._属性值是布尔型_Boolean">#</a></h3><pre><code><span class="token number">1</span>. 'name|<span class="token number">1</span>'<span class="token operator">:</span> boolean
|
||||
|
||||
随机生成一个布尔值,值为 <span class="token boolean">true</span> 的概率是 <span class="token number">1</span>/<span class="token number">2</span>,值为 <span class="token boolean">false</span> 的概率同样是 <span class="token number">1</span>/<span class="token number">2</span>。
|
||||
|
||||
<span class="token number">2</span>. 'name|min-max'<span class="token operator">:</span> value
|
||||
|
||||
随机生成一个布尔值,值为 value 的概率是 min / (min + max<span class="token punctuation">)</span>,值为 !value 的概率是 max / (min + max<span class="token punctuation">)</span>。
|
||||
</code></pre><h3 class="subject" id="4. 属性值是对象 Object">4. 属性值是对象 Object <a class="hashlink" href="#4. 属性值是对象 Object">#</a></h3><pre><code><span class="token number">1</span>. 'name|count'<span class="token operator">:</span> object
|
||||
</code></pre><h3 class="subject" id="4._属性值是对象_Object">4. 属性值是对象 Object <a class="hashlink" href="#4._属性值是对象_Object">#</a></h3><pre><code><span class="token number">1</span>. 'name|count'<span class="token operator">:</span> object
|
||||
|
||||
从属性值 object 中随机选取 count 个属性。
|
||||
|
||||
<span class="token number">2</span>. 'name|min-max'<span class="token operator">:</span> object
|
||||
|
||||
从属性值 object 中随机选取 min 到 max 个属性。
|
||||
</code></pre><h3 class="subject" id="5. 属性值是数组 Array">5. 属性值是数组 Array <a class="hashlink" href="#5. 属性值是数组 Array">#</a></h3><pre><code><span class="token number">1</span>. 'name|<span class="token number">1</span>'<span class="token operator">:</span> array
|
||||
</code></pre><h3 class="subject" id="5._属性值是数组_Array">5. 属性值是数组 Array <a class="hashlink" href="#5._属性值是数组_Array">#</a></h3><pre><code><span class="token number">1</span>. 'name|<span class="token number">1</span>'<span class="token operator">:</span> array
|
||||
|
||||
从属性值 array 中随机选取 <span class="token number">1</span> 个元素,作为最终值。
|
||||
|
||||
@ -278,7 +279,7 @@ Mock.mock(<span class="token punctuation">{</span>
|
||||
|
||||
通过重复属性值 array 生成一个新数组,重复次数为 count。
|
||||
</code></pre><p><span id = "DPD"></span></p>
|
||||
<h3 class="subject" id="数据占位符定义规范(Data Placeholder Definition,DPD)">数据占位符定义规范(Data Placeholder Definition,DPD) <a class="hashlink" href="#数据占位符定义规范(Data Placeholder Definition,DPD)">#</a></h3><pre><code>占位符 只是在属性值字符串中占个位置,并不出现在最终的属性值中。
|
||||
<h3 class="subject" id="数据占位符定义规范(Data_Placeholder_Definition,DPD)">数据占位符定义规范(Data Placeholder Definition,DPD) <a class="hashlink" href="#数据占位符定义规范(Data_Placeholder_Definition,DPD)">#</a></h3><pre><code>占位符 只是在属性值字符串中占个位置,并不出现在最终的属性值中。
|
||||
|
||||
占位符 的格式为:
|
||||
|
||||
@ -325,7 +326,7 @@ name<span class="token operator">:</span> <span class="token punctuation">{</spa
|
||||
<script src="source/app.js"></script>
|
||||
|
||||
<script>
|
||||
var lineHeight = 17.4;
|
||||
var lineHeight = 18;
|
||||
var EXAMPLE_MAX_HEIGHT;
|
||||
|
||||
function fold() {
|
||||
@ -349,8 +350,8 @@ name<span class="token operator">:</span> <span class="token punctuation">{</spa
|
||||
var $this = $(this);
|
||||
$this.removeClass('extend').addClass('fold');
|
||||
$this.html('折叠代码');
|
||||
$this.prev().height('auto');
|
||||
$this.prev().parent().height('auto');
|
||||
$this.parent().children('.js-code').height('auto');
|
||||
$this.parent().height('auto');
|
||||
});
|
||||
$('.ydoc-example').delegate('.fold', 'click', function() {
|
||||
var $this = $(this);
|
||||
@ -358,7 +359,7 @@ name<span class="token operator">:</span> <span class="token punctuation">{</spa
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
$this.removeClass('fold').addClass('extend');
|
||||
$this.parent().height(EXAMPLE_MAX_HEIGHT); // pre
|
||||
$this.prev().height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.parent().children('.js-code').height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.html("展开更多……");
|
||||
});
|
||||
}
|
||||
|
@ -9,7 +9,13 @@
|
||||
<meta name="description" content="description of your site">
|
||||
<meta name="author" content="author of the site">
|
||||
<title>YApi 使用手册</title>
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -32,11 +38,6 @@
|
||||
<a href="usage.html">使用手册</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="manage.html">管理学院</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="api.html"></a>
|
||||
@ -63,10 +64,10 @@
|
||||
|
||||
<div class="ydoc-container">
|
||||
|
||||
<div class="ydoc-container-content">
|
||||
<div class="ydoc-container-content ">
|
||||
|
||||
|
||||
<div class="content-left " role="complementary">
|
||||
<div class="content-left staticsidenav" role="complementary">
|
||||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav docs-sidenav">
|
||||
|
||||
@ -136,9 +137,9 @@
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="content-right markdown-body " role="main">
|
||||
<div class="content-right markdown-body use-sidebar" role="main">
|
||||
|
||||
<h2 class="subject" id="介绍1">介绍 <a class="hashlink" href="#介绍1">#</a></h2><p style='text-indent:2em;line-height:1.8em'>测试集是接口用例的集合。接口用例用来保存接口运行请求参数,方便我们下次再测试接口,无需再填请求参数。</p>
|
||||
<h2 class="subject" id="介绍">介绍 <a class="hashlink" href="#介绍">#</a></h2><p style='text-indent:2em;line-height:1.8em'>测试集是接口用例的集合。接口用例用来保存接口运行请求参数,方便我们下次再测试接口,无需再填请求参数。</p>
|
||||
|
||||
<h2 class="subject" id="添加测试集">添加测试集 <a class="hashlink" href="#添加测试集">#</a></h2><p>添加测试集,我们可以创建个人测试集、环境测试集或者功能测试集等等。每个测试集只是接口用例的集合,可以按照任何维度去创建。</p>
|
||||
<p>项目接口页面,测试集合 tab 下面『加号』按钮添加测试集。</p>
|
||||
@ -176,7 +177,7 @@
|
||||
<script src="source/app.js"></script>
|
||||
|
||||
<script>
|
||||
var lineHeight = 17.4;
|
||||
var lineHeight = 18;
|
||||
var EXAMPLE_MAX_HEIGHT;
|
||||
|
||||
function fold() {
|
||||
@ -200,8 +201,8 @@
|
||||
var $this = $(this);
|
||||
$this.removeClass('extend').addClass('fold');
|
||||
$this.html('折叠代码');
|
||||
$this.prev().height('auto');
|
||||
$this.prev().parent().height('auto');
|
||||
$this.parent().children('.js-code').height('auto');
|
||||
$this.parent().height('auto');
|
||||
});
|
||||
$('.ydoc-example').delegate('.fold', 'click', function() {
|
||||
var $this = $(this);
|
||||
@ -209,7 +210,7 @@
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
$this.removeClass('fold').addClass('extend');
|
||||
$this.parent().height(EXAMPLE_MAX_HEIGHT); // pre
|
||||
$this.prev().height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.parent().children('.js-code').height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.html("展开更多……");
|
||||
});
|
||||
}
|
||||
|
@ -9,7 +9,13 @@
|
||||
<meta name="description" content="description of your site">
|
||||
<meta name="author" content="author of the site">
|
||||
<title>YApi 使用手册</title>
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -32,11 +38,6 @@
|
||||
<a href="usage.html">使用手册</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="manage.html">管理学院</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="api.html"></a>
|
||||
@ -63,10 +64,10 @@
|
||||
|
||||
<div class="ydoc-container">
|
||||
|
||||
<div class="ydoc-container-content">
|
||||
<div class="ydoc-container-content ">
|
||||
|
||||
|
||||
<div class="content-left " role="complementary">
|
||||
<div class="content-left staticsidenav" role="complementary">
|
||||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav docs-sidenav">
|
||||
|
||||
@ -132,7 +133,7 @@
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="content-right markdown-body " role="main">
|
||||
<div class="content-right markdown-body use-sidebar" role="main">
|
||||
|
||||
<h3 class="subject" id="如何创建项目?">如何创建项目? <a class="hashlink" href="#如何创建项目?">#</a></h3><p>把大象装进冰箱分几步?三步:把冰箱门打开,把大象装进去,关门,搞定~</p>
|
||||
<p>新建接口分几步?也是三步:</p>
|
||||
@ -185,7 +186,7 @@
|
||||
<script src="source/app.js"></script>
|
||||
|
||||
<script>
|
||||
var lineHeight = 17.4;
|
||||
var lineHeight = 18;
|
||||
var EXAMPLE_MAX_HEIGHT;
|
||||
|
||||
function fold() {
|
||||
@ -209,8 +210,8 @@
|
||||
var $this = $(this);
|
||||
$this.removeClass('extend').addClass('fold');
|
||||
$this.html('折叠代码');
|
||||
$this.prev().height('auto');
|
||||
$this.prev().parent().height('auto');
|
||||
$this.parent().children('.js-code').height('auto');
|
||||
$this.parent().height('auto');
|
||||
});
|
||||
$('.ydoc-example').delegate('.fold', 'click', function() {
|
||||
var $this = $(this);
|
||||
@ -218,7 +219,7 @@
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
$this.removeClass('fold').addClass('extend');
|
||||
$this.parent().height(EXAMPLE_MAX_HEIGHT); // pre
|
||||
$this.prev().height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.parent().children('.js-code').height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.html("展开更多……");
|
||||
});
|
||||
}
|
||||
|
@ -9,7 +9,13 @@
|
||||
<meta name="description" content="description of your site">
|
||||
<meta name="author" content="author of the site">
|
||||
<title>YApi 使用手册</title>
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -32,11 +38,6 @@
|
||||
<a href="usage.html">使用手册</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="manage.html">管理学院</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="api.html"></a>
|
||||
@ -63,10 +64,10 @@
|
||||
|
||||
<div class="ydoc-container">
|
||||
|
||||
<div class="ydoc-container-content">
|
||||
<div class="ydoc-container-content ">
|
||||
|
||||
|
||||
<div class="content-left " role="complementary">
|
||||
<div class="content-left staticsidenav" role="complementary">
|
||||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav docs-sidenav">
|
||||
|
||||
@ -102,10 +103,6 @@
|
||||
|
||||
<ul class="nav docs-sidenav-extend" >
|
||||
|
||||
<li >
|
||||
<a href="#介绍">介绍</a>
|
||||
</li>
|
||||
|
||||
<li >
|
||||
<a href="#接口配置">接口配置</a>
|
||||
</li>
|
||||
@ -132,9 +129,12 @@
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="content-right markdown-body " role="main">
|
||||
<div class="content-right markdown-body use-sidebar" role="main">
|
||||
|
||||
<h2 class="subject" id="介绍">介绍 <a class="hashlink" href="#介绍">#</a></h2><h2 class="subject" id="接口配置">接口配置 <a class="hashlink" href="#接口配置">#</a></h2><p><a href="./usage-创建第一个API.html#新建_编辑接口">新建接口</a> 后,点击新添加的接口,右侧可以看到接口的预览信息,点击右侧的 <code>编辑</code> Tab项进入编辑面板。</p>
|
||||
<p>进入项目页,可以看到项目下的所有接口,需要注意的是,YApi有 <code>接口集合</code> 和 <code>测试集合</code> 两个概念。</p>
|
||||
<ul>
|
||||
<li><code>接口集合</code> 将接口进行分类,使结构结构更清晰,一个接口只能属于一个集合,且不允许与其他接口重名。</li><li><code>测试集合</code> 为了方便我们测试接口,<code>测试集合</code> 将若干接口组合在一起,在这里一个接口可以属于不同集合。</li></ul>
|
||||
<h2 class="subject" id="接口配置">接口配置 <a class="hashlink" href="#接口配置">#</a></h2><p><a href="./usage-创建第一个API.html#新建_编辑接口">新建接口</a> 后,点击新添加的接口,右侧可以看到接口的预览信息,点击右侧的 <code>编辑</code> Tab项进入编辑面板。</p>
|
||||
<p>在改面板中你可以看到接口的基本信息(接口名称、分类、路径),除此以外,你还可以完善以下接口信息:</p>
|
||||
<ul>
|
||||
<li>状态: 用于标识接口是否开发完成。</li><li>接口描述: 用简短的文字描述接口的作用。</li><li>query: 接口url的查询字符串。</li><li>请求 Headers: http 请求头字段。</li><li>请求 Body: http 请求 body 部分。</li><li>请求 Body: http 请求 body 部分。</li><li><p>响应 Body: 模拟返回结果。</p>
|
||||
@ -174,7 +174,7 @@
|
||||
<script src="source/app.js"></script>
|
||||
|
||||
<script>
|
||||
var lineHeight = 17.4;
|
||||
var lineHeight = 18;
|
||||
var EXAMPLE_MAX_HEIGHT;
|
||||
|
||||
function fold() {
|
||||
@ -198,8 +198,8 @@
|
||||
var $this = $(this);
|
||||
$this.removeClass('extend').addClass('fold');
|
||||
$this.html('折叠代码');
|
||||
$this.prev().height('auto');
|
||||
$this.prev().parent().height('auto');
|
||||
$this.parent().children('.js-code').height('auto');
|
||||
$this.parent().height('auto');
|
||||
});
|
||||
$('.ydoc-example').delegate('.fold', 'click', function() {
|
||||
var $this = $(this);
|
||||
@ -207,7 +207,7 @@
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
$this.removeClass('fold').addClass('extend');
|
||||
$this.parent().height(EXAMPLE_MAX_HEIGHT); // pre
|
||||
$this.prev().height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.parent().children('.js-code').height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.html("展开更多……");
|
||||
});
|
||||
}
|
||||
|
@ -9,7 +9,13 @@
|
||||
<meta name="description" content="description of your site">
|
||||
<meta name="author" content="author of the site">
|
||||
<title>YApi 使用手册</title>
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -32,11 +38,6 @@
|
||||
<a href="usage.html">使用手册</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="manage.html">管理学院</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="api.html"></a>
|
||||
@ -63,10 +64,10 @@
|
||||
|
||||
<div class="ydoc-container">
|
||||
|
||||
<div class="ydoc-container-content">
|
||||
<div class="ydoc-container-content ">
|
||||
|
||||
|
||||
<div class="content-left " role="complementary">
|
||||
<div class="content-left staticsidenav" role="complementary">
|
||||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav docs-sidenav">
|
||||
|
||||
@ -128,7 +129,7 @@
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="content-right markdown-body " role="main">
|
||||
<div class="content-right markdown-body use-sidebar" role="main">
|
||||
|
||||
<p>接口管理的逻辑较为复杂,操作频率高,层层审批将严重拖慢生产效率,因此传统的金字塔管理模式并不适用。</p>
|
||||
<p>YAPI 将扁平化管理模式的思想引入到产品的权限管理中,<code>超级管理员</code> 拥有最高的权限,并将权限分配给若干 <code>组长</code>,<code>超级管理员</code> 只需管理<code>组长</code> 即可,实际上管理YAPI各大分组与项目的是“<code>组长</code>”。<code>组长</code>对分组或项目负责,一般由BU负责人/项目负责人担任。</p>
|
||||
@ -269,7 +270,7 @@
|
||||
<script src="source/app.js"></script>
|
||||
|
||||
<script>
|
||||
var lineHeight = 17.4;
|
||||
var lineHeight = 18;
|
||||
var EXAMPLE_MAX_HEIGHT;
|
||||
|
||||
function fold() {
|
||||
@ -293,8 +294,8 @@
|
||||
var $this = $(this);
|
||||
$this.removeClass('extend').addClass('fold');
|
||||
$this.html('折叠代码');
|
||||
$this.prev().height('auto');
|
||||
$this.prev().parent().height('auto');
|
||||
$this.parent().children('.js-code').height('auto');
|
||||
$this.parent().height('auto');
|
||||
});
|
||||
$('.ydoc-example').delegate('.fold', 'click', function() {
|
||||
var $this = $(this);
|
||||
@ -302,7 +303,7 @@
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
$this.removeClass('fold').addClass('extend');
|
||||
$this.parent().height(EXAMPLE_MAX_HEIGHT); // pre
|
||||
$this.prev().height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.parent().children('.js-code').height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.html("展开更多……");
|
||||
});
|
||||
}
|
||||
|
@ -9,7 +9,13 @@
|
||||
<meta name="description" content="description of your site">
|
||||
<meta name="author" content="author of the site">
|
||||
<title>YApi 使用手册</title>
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -32,11 +38,6 @@
|
||||
<a href="usage.html">使用手册</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="manage.html">管理学院</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="api.html"></a>
|
||||
@ -63,10 +64,10 @@
|
||||
|
||||
<div class="ydoc-container">
|
||||
|
||||
<div class="ydoc-container-content">
|
||||
<div class="ydoc-container-content ">
|
||||
|
||||
|
||||
<div class="content-left " role="complementary">
|
||||
<div class="content-left staticsidenav" role="complementary">
|
||||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav docs-sidenav">
|
||||
|
||||
@ -136,7 +137,7 @@
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="content-right markdown-body " role="main">
|
||||
<div class="content-right markdown-body use-sidebar" role="main">
|
||||
|
||||
<p>YApi 是高效、易用、功能强大的api管理平台。
|
||||
<!-- 它有扁平化的管理结构(`超管`-`组长`-`组员`),有清晰的接口组织方式(`分组`-`项目`-`接口`),有更方便的mock方案。 --></p>
|
||||
@ -186,7 +187,7 @@
|
||||
<script src="source/app.js"></script>
|
||||
|
||||
<script>
|
||||
var lineHeight = 17.4;
|
||||
var lineHeight = 18;
|
||||
var EXAMPLE_MAX_HEIGHT;
|
||||
|
||||
function fold() {
|
||||
@ -210,8 +211,8 @@
|
||||
var $this = $(this);
|
||||
$this.removeClass('extend').addClass('fold');
|
||||
$this.html('折叠代码');
|
||||
$this.prev().height('auto');
|
||||
$this.prev().parent().height('auto');
|
||||
$this.parent().children('.js-code').height('auto');
|
||||
$this.parent().height('auto');
|
||||
});
|
||||
$('.ydoc-example').delegate('.fold', 'click', function() {
|
||||
var $this = $(this);
|
||||
@ -219,7 +220,7 @@
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
$this.removeClass('fold').addClass('extend');
|
||||
$this.parent().height(EXAMPLE_MAX_HEIGHT); // pre
|
||||
$this.prev().height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.parent().children('.js-code').height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.html("展开更多……");
|
||||
});
|
||||
}
|
||||
|
@ -9,7 +9,13 @@
|
||||
<meta name="description" content="description of your site">
|
||||
<meta name="author" content="author of the site">
|
||||
<title>YApi 使用手册</title>
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -32,11 +38,6 @@
|
||||
<a href="usage.html">使用手册</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="manage.html">管理学院</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="api.html"></a>
|
||||
@ -63,10 +64,10 @@
|
||||
|
||||
<div class="ydoc-container">
|
||||
|
||||
<div class="ydoc-container-content">
|
||||
<div class="ydoc-container-content ">
|
||||
|
||||
|
||||
<div class="content-left " role="complementary">
|
||||
<div class="content-left staticsidenav" role="complementary">
|
||||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav docs-sidenav">
|
||||
|
||||
@ -132,7 +133,7 @@
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="content-right markdown-body " role="main">
|
||||
<div class="content-right markdown-body use-sidebar" role="main">
|
||||
|
||||
<h2 class="subject" id="新建项目">新建项目 <a class="hashlink" href="#新建项目">#</a></h2><p>点击右上角的 <code>+</code> 新建项目,进入新建项目页面。</p>
|
||||
<p><img src="./images/usage/project_add.png" /></p>
|
||||
@ -177,7 +178,7 @@
|
||||
<script src="source/app.js"></script>
|
||||
|
||||
<script>
|
||||
var lineHeight = 17.4;
|
||||
var lineHeight = 18;
|
||||
var EXAMPLE_MAX_HEIGHT;
|
||||
|
||||
function fold() {
|
||||
@ -201,8 +202,8 @@
|
||||
var $this = $(this);
|
||||
$this.removeClass('extend').addClass('fold');
|
||||
$this.html('折叠代码');
|
||||
$this.prev().height('auto');
|
||||
$this.prev().parent().height('auto');
|
||||
$this.parent().children('.js-code').height('auto');
|
||||
$this.parent().height('auto');
|
||||
});
|
||||
$('.ydoc-example').delegate('.fold', 'click', function() {
|
||||
var $this = $(this);
|
||||
@ -210,7 +211,7 @@
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
$this.removeClass('fold').addClass('extend');
|
||||
$this.parent().height(EXAMPLE_MAX_HEIGHT); // pre
|
||||
$this.prev().height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.parent().children('.js-code').height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.html("展开更多……");
|
||||
});
|
||||
}
|
||||
|
@ -9,7 +9,13 @@
|
||||
<meta name="description" content="description of your site">
|
||||
<meta name="author" content="author of the site">
|
||||
<title>YApi 使用手册</title>
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
<link rel="stylesheet" href="source/main.css" />
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="styles/theme.css" />
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="ydoc">
|
||||
@ -32,11 +38,6 @@
|
||||
<a href="usage.html">使用手册</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="manage.html">管理学院</a>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
|
||||
<a href="api.html"></a>
|
||||
@ -63,10 +64,10 @@
|
||||
|
||||
<div class="ydoc-container">
|
||||
|
||||
<div class="ydoc-container-content">
|
||||
<div class="ydoc-container-content ">
|
||||
|
||||
|
||||
<div class="content-left " role="complementary">
|
||||
<div class="content-left staticsidenav" role="complementary">
|
||||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||||
<ul class="nav docs-sidenav">
|
||||
|
||||
@ -116,21 +117,21 @@
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="content-right markdown-body " role="main">
|
||||
<div class="content-right markdown-body use-sidebar" role="main">
|
||||
|
||||
<p>YApi 是高效、易用、功能强大的api管理平台。
|
||||
<!-- 它有扁平化的管理结构(`超管`-`组长`-`组员`),有清晰的接口组织方式(`分组`-`项目`-`接口`),有更方便的mock方案。 --></p>
|
||||
<p>在开始使用 YApi 之前,我们先来熟悉一下 YApi 的网站结构,这将让你快速了解YApi。</p>
|
||||
<h2 class="subject" id="登录与注册2">登录与注册 <a class="hashlink" href="#登录与注册2">#</a></h2><p>想要使用 YApi ,首先要拥有账号,目前支持注册账号登录与QSSO登录两种方式。</p>
|
||||
<h2 class="subject" id="登录与注册">登录与注册 <a class="hashlink" href="#登录与注册">#</a></h2><p>想要使用 YApi ,首先要拥有账号,目前支持注册账号登录与QSSO登录两种方式。</p>
|
||||
<p><img src="./images/usage/login.png" /></p>
|
||||
<h2 class="subject" id="首页3">首页 <a class="hashlink" href="#首页3">#</a></h2><p>登录后进入首页,首页展示了分组与项目。</p>
|
||||
<h2 class="subject" id="首页">首页 <a class="hashlink" href="#首页">#</a></h2><p>登录后进入首页,首页展示了分组与项目。</p>
|
||||
<p>此时你作为新用户,没有任何分组与项目的权限,因此只能搜索、浏览 “公开项目” 的接口,如果在首页找不到任何项目,请联系管理员将你加入对应项目。</p>
|
||||
<p><span class="list-index">1</span>首页头部展示了当前所在的位置、搜索框、新建项目、查看文档和用户信息。</p>
|
||||
<p><span class="list-index">2</span>首页左侧展示分组信息,“分组”是“项目”的集合,只有超级管理员可以管理分组。</p>
|
||||
<p><span class="list-index">3</span>首页右侧是分组下的项目和成员列表,点击左侧的某个分组,右侧会出现该分组下的项目和成员信息。</p>
|
||||
<p><span class="list-index">4</span>点击项目右上角的星星即可关注项目,关注的项目可以在“我的关注”页面查看。</p>
|
||||
<p><img src="./images/usage/index.png" /></p>
|
||||
<h2 class="subject" id="项目页4">项目页 <a class="hashlink" href="#项目页4">#</a></h2><p>点击一个项目,进入项目页,项目页展示了属于该项目的全部接口,并提供项目、接口的全部操作。</p>
|
||||
<h2 class="subject" id="项目页">项目页 <a class="hashlink" href="#项目页">#</a></h2><p>点击一个项目,进入项目页,项目页展示了属于该项目的全部接口,并提供项目、接口的全部操作。</p>
|
||||
<p>此时你作为新用户,只能浏览接口信息,不可以编辑项目或接口,如果需要编辑,请联系管理员将你加入该项目。</p>
|
||||
<p><span class="list-index">1</span>项目页左侧的 “接口列表” 展示了该项目下的所有接口,右侧默认显示该项目下所有接口的列表。</p>
|
||||
<p><span class="list-index">2</span>点击左侧的某个接口,右侧会出现“预览”、“编辑”和“运行”。</p>
|
||||
@ -138,7 +139,7 @@
|
||||
<p><span class="list-index">4</span>点击二级导航的“设置”,项目组长即可编辑项目信息和管理成员列表。</p>
|
||||
<p><span class="list-index">5</span>点击二级导航的“动态”,即可查看项目的操作日志。</p>
|
||||
<p><img src="./images/usage/project.png" /></p>
|
||||
<h2 class="subject" id="个人中心5">个人中心 <a class="hashlink" href="#个人中心5">#</a></h2><p>鼠标移动到右上角的用户头像或用户名上,即可点击“个人中心”查看个人信息。</p>
|
||||
<h2 class="subject" id="个人中心">个人中心 <a class="hashlink" href="#个人中心">#</a></h2><p>鼠标移动到右上角的用户头像或用户名上,即可点击“个人中心”查看个人信息。</p>
|
||||
<p><img src="./images/usage/hover.png" /></p>
|
||||
<p>在个人信息页面可以查看并修改自己的用户名、密码等信息。</p>
|
||||
<p><img src="./images/usage/user.png" /></p>
|
||||
@ -166,7 +167,7 @@
|
||||
<script src="source/app.js"></script>
|
||||
|
||||
<script>
|
||||
var lineHeight = 17.4;
|
||||
var lineHeight = 18;
|
||||
var EXAMPLE_MAX_HEIGHT;
|
||||
|
||||
function fold() {
|
||||
@ -190,8 +191,8 @@
|
||||
var $this = $(this);
|
||||
$this.removeClass('extend').addClass('fold');
|
||||
$this.html('折叠代码');
|
||||
$this.prev().height('auto');
|
||||
$this.prev().parent().height('auto');
|
||||
$this.parent().children('.js-code').height('auto');
|
||||
$this.parent().height('auto');
|
||||
});
|
||||
$('.ydoc-example').delegate('.fold', 'click', function() {
|
||||
var $this = $(this);
|
||||
@ -199,7 +200,7 @@
|
||||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||||
$this.removeClass('fold').addClass('extend');
|
||||
$this.parent().height(EXAMPLE_MAX_HEIGHT); // pre
|
||||
$this.prev().height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.parent().children('.js-code').height(EXAMPLE_MAX_HEIGHT); // code
|
||||
$this.html("展开更多……");
|
||||
});
|
||||
}
|
||||
|
52
ydoc.json
52
ydoc.json
@ -93,32 +93,32 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "manage",
|
||||
"title": "管理学院",
|
||||
"banner": {
|
||||
"title": "管理学院",
|
||||
"description": "超级管理员、分组/项目组长的学院。"
|
||||
},
|
||||
"content": {
|
||||
"sidebar": true,
|
||||
"multi": true,
|
||||
"index": "./doc/page/manage/intro.md",
|
||||
"pages": [{
|
||||
"name": "介绍",
|
||||
"content": "./doc/page/manage/intro.md"
|
||||
}, {
|
||||
"name": "部署",
|
||||
"content": "./doc/page/manage/build.md"
|
||||
}, {
|
||||
"name": "超管职责",
|
||||
"content": "./doc/page/manage/admin.md"
|
||||
}, {
|
||||
"name": "版本升级",
|
||||
"content": "./doc/page/manage/update.md"
|
||||
}]
|
||||
}
|
||||
},
|
||||
// {
|
||||
// "name": "manage",
|
||||
// "title": "管理学院",
|
||||
// "banner": {
|
||||
// "title": "管理学院",
|
||||
// "description": "超级管理员、分组/项目组长的学院。"
|
||||
// },
|
||||
// "content": {
|
||||
// "sidebar": true,
|
||||
// "multi": true,
|
||||
// "index": "./doc/page/manage/intro.md",
|
||||
// "pages": [{
|
||||
// "name": "介绍",
|
||||
// "content": "./doc/page/manage/intro.md"
|
||||
// }, {
|
||||
// "name": "部署",
|
||||
// "content": "./doc/page/manage/build.md"
|
||||
// }, {
|
||||
// "name": "超管职责",
|
||||
// "content": "./doc/page/manage/admin.md"
|
||||
// }, {
|
||||
// "name": "版本升级",
|
||||
// "content": "./doc/page/manage/update.md"
|
||||
// }]
|
||||
// }
|
||||
// },
|
||||
{
|
||||
"name": "api",
|
||||
"title": "",
|
||||
|
Loading…
Reference in New Issue
Block a user