parent
26a41111db
commit
6ac4147f9c
@ -1,60 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<script src="../../../js/jquery.min.js" type="text/javascript"></script>
|
|
||||||
<link href="../../../css/base.css" rel="stylesheet">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="api">
|
|
||||||
<h3>用户登录</h3>
|
|
||||||
<h5>请求方法</h5>
|
|
||||||
|
|
||||||
<div class="wrapper">
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th width="200">参数</th>
|
|
||||||
<th width="100">类型</th>
|
|
||||||
<th width="100">必需</th>
|
|
||||||
<th>说明</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>username</td>
|
|
||||||
<td>字符串</td>
|
|
||||||
<td style="color: red">是</td>
|
|
||||||
<td>用户登录名称</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>password</td>
|
|
||||||
<td>字符串</td>
|
|
||||||
<td style="color: red">是</td>
|
|
||||||
<td>用户登录密码</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<h5>响应参数</h5>
|
|
||||||
|
|
||||||
<div class="wrapper">
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th width="200">参数</th>
|
|
||||||
<th width="100">类型</th>
|
|
||||||
<th width="100">必有</th>
|
|
||||||
<th>说明</th>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>token</td>
|
|
||||||
<td>字符串</td>
|
|
||||||
<td>是</td>
|
|
||||||
<td>用户操作凭证</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>taskCount</td>
|
|
||||||
<td>数字</td>
|
|
||||||
<td>否</td>
|
|
||||||
<td>任务数量</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,10 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<script src="js/jquery.min.js" type="text/javascript"></script>
|
|
||||||
<link href="css/base.css" rel="stylesheet">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,63 +0,0 @@
|
|||||||
* {
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.api {
|
|
||||||
width: 700px;
|
|
||||||
margin: 20px auto;
|
|
||||||
border-left: 8px solid #dddfe4;
|
|
||||||
border-right: 1px solid #eef0f4;
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
background: #eef0f4;
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h5 {
|
|
||||||
padding: 5px;
|
|
||||||
color: #989898;
|
|
||||||
font-weight: normal;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wrapper {
|
|
||||||
padding: 16px;
|
|
||||||
background: #eef0f4;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
border-collapse: collapse;
|
|
||||||
display: table;
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
background-color: transparent;
|
|
||||||
border-spacing: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
table tr th, table tr td {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #4f4f4f;
|
|
||||||
line-height: 22px;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
padding: 8px;
|
|
||||||
word-break: normal !important;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
table tr {
|
|
||||||
border: 0;
|
|
||||||
border-top: 1px solid #ddd;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
table tr:nth-child(2n) {
|
|
||||||
background-color: #f7f7f7;
|
|
||||||
}
|
|
||||||
|
|
||||||
table tr th {
|
|
||||||
font-weight: 700;
|
|
||||||
background-color: #eff3f5;
|
|
||||||
}
|
|
@ -0,0 +1,246 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script src="js/vue.min.js" type="text/javascript"></script>
|
||||||
|
<link href="css/base.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
[v-cloak] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
html, body, #app {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 240px;
|
||||||
|
height: 50px;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search input {
|
||||||
|
padding: 5px;
|
||||||
|
height: 30px;
|
||||||
|
outline: none;
|
||||||
|
width: 100%;
|
||||||
|
border: 1px dashed #cacaca;
|
||||||
|
}
|
||||||
|
|
||||||
|
.side {
|
||||||
|
height: calc(100% - 50px);
|
||||||
|
margin-top: 50px;
|
||||||
|
width: 240px;
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.side ul li a {
|
||||||
|
display: block;
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 8px;
|
||||||
|
color: #585858;
|
||||||
|
}
|
||||||
|
|
||||||
|
.side ul li a:hover {
|
||||||
|
opacity: .9;
|
||||||
|
background: #efefef;
|
||||||
|
}
|
||||||
|
|
||||||
|
.body {
|
||||||
|
margin-left: 240px;
|
||||||
|
width: calc(100% - 240px);
|
||||||
|
height: 100%;
|
||||||
|
background: #ffffff;
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.api {
|
||||||
|
width: 700px;
|
||||||
|
border-left: 10px solid #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
background: #eef0f4;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h5 {
|
||||||
|
padding: 5px;
|
||||||
|
color: #989898;
|
||||||
|
font-weight: normal;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wrapper {
|
||||||
|
padding: 16px;
|
||||||
|
background: #eef0f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
display: table;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
background-color: transparent;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr th, table tr td {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #4f4f4f;
|
||||||
|
line-height: 22px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
padding: 8px;
|
||||||
|
word-break: normal !important;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr {
|
||||||
|
border: 0;
|
||||||
|
border-top: 1px solid #ddd;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr:nth-child(2n) {
|
||||||
|
background-color: #f7f7f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr th {
|
||||||
|
font-weight: 700;
|
||||||
|
background-color: #eff3f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<body>
|
||||||
|
<div id="app" v-cloak>
|
||||||
|
<div class="side">
|
||||||
|
<ul>
|
||||||
|
<li v-for="(item,index) in list" @click="onSelect(item)">
|
||||||
|
<a href="javascript:;"><span>{{item.title}}</span></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search">
|
||||||
|
<input v-model="searchKey" placeholder="搜索关键字...">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="body">
|
||||||
|
<div class="api" v-if="item.title">
|
||||||
|
<h3>{{item.title}}</h3>
|
||||||
|
<h5>请求参数</h5>
|
||||||
|
|
||||||
|
<div class="wrapper">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th width="200">参数</th>
|
||||||
|
<th width="100">类型</th>
|
||||||
|
<th width="100">必需</th>
|
||||||
|
<th>说明</th>
|
||||||
|
</tr>
|
||||||
|
<tr v-for="p in item.reqParams">
|
||||||
|
<td>{{p.name}}</td>
|
||||||
|
<td>{{p.type}}</td>
|
||||||
|
<td v-if="p.required" style="color: red">是</td>
|
||||||
|
<td v-if="!p.required">否</td>
|
||||||
|
<td>{{p.note}}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<h5>响应参数</h5>
|
||||||
|
|
||||||
|
<div class="wrapper">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th width="200">参数</th>
|
||||||
|
<th width="100">类型</th>
|
||||||
|
<th>说明</th>
|
||||||
|
</tr>
|
||||||
|
<tr v-for="p in item.rspParams">
|
||||||
|
<td>{{p.name}}</td>
|
||||||
|
<td v-if="p.type == 'Object'"><a href="javascript:;">{{p.type}}</a></td>
|
||||||
|
<td v-if="p.type != 'Object'">{{p.type}}</td>
|
||||||
|
<td>{{p.note}}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var app = new Vue({
|
||||||
|
el: "#app",
|
||||||
|
data: {
|
||||||
|
searchKey: '',
|
||||||
|
item: {},
|
||||||
|
data: [{
|
||||||
|
title: "登录",
|
||||||
|
module: "system",
|
||||||
|
target: "user",
|
||||||
|
method: "login",
|
||||||
|
reqParams: [
|
||||||
|
{
|
||||||
|
name: "username",
|
||||||
|
type: "String",
|
||||||
|
required: true,
|
||||||
|
note: "用户登录名"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "password",
|
||||||
|
type: "String",
|
||||||
|
required: true,
|
||||||
|
note: "用户登录密码"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
rspParams: [
|
||||||
|
{
|
||||||
|
name: "token",
|
||||||
|
type: "String",
|
||||||
|
note: "登录凭证"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "User",
|
||||||
|
type: "Object",
|
||||||
|
note: "用户"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}],
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
list: function () {
|
||||||
|
let reg = new RegExp(this.searchKey, 'ig');// 不区分大小写
|
||||||
|
if (this.searchKey) {
|
||||||
|
return this.data.filter(function (item) {
|
||||||
|
return item.title.match(reg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return this.data;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onSelect: function (item) {
|
||||||
|
this.item = item;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
"searchKey": function (v1, v2) {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue