-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
107 lines (93 loc) · 3.54 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>ajax-data-test</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=3, minimum-scale=1">
<meta name="author" content="lyuan">
<link rel="icon" href="/img/favicon.ico">
<link rel='stylesheet' href='css/bootstrap.css' />
<link rel='stylesheet' href='css/inspector-json.css' />
<style type="text/css">
ul,li{list-style:none;}
.section input{display:inline}
.header{padding:30px;background:#eee;text-align:center;}
.header h1{margin:0 0 10px 0;}
.header h2{font-size:24px;color:#555;}
.section{padding:20px 200px;min-height: 230px;}
.section-config{background:#ddd;}
.section-config input[type="text"]{width:500px;margin-right:20px;}
.section-config li{margin-bottom:10px;}
.section-config li span{width:100px;display:inline-block;}
.section-config li label{padding-right:20px;}
.section-config li label input{margin-left:5px;}
.section-params{min-height:230px;background:#eee;}
.section-params h4{text-align:center;}
.section-params h4 a{margin-left:20px;}
.section-params .params-wrap{width:750px;}
.section-params li{margin-bottom:10px;}
.section-params .list input[type="checkbox"]{margin:0 15px 0 0;vertical-align:middle;}
.section-params input[type="text"]{width:300px;margin-right:20px;}
.params-wrap-single{float:left;}
.params-wrap-multiple{float:right;}
@media screen and (max-width: 1500px){
.params-wrap-multiple{float:left;margin-top:20px;}
}
.section-action{background:#ddd;}
.section-action .btn{margin-left:40px;}
.section-result{background:#fff;}
.inspector-json{font-size:16px;}
</style>
</head>
<body>
<header class="header">
<h1>数据接口测试工具</h1>
<h2>编写稳定、高质量的后端数据接口</h2>
</header>
<section class="section section-config clearfix">
<h3>请求配置</h3>
<ul>
<li><span>url</span> <input type="text" name="url" value="" class="form-control" /></li>
<li><span>dataType</span> <input type="text" name="dataType" value="" class="form-control" /></li>
<li><span>jsonp</span> <input type="text" name="jsonp" value="" class="form-control" /></li>
<li class="sc-type">
<span>type</span>
<label>GET<input type="radio" value="GET" name="type" /></label>
<label>POST<input type="radio" value="POST" name="type" /></label>
</li>
</ul>
</section>
<section class="section section-params clearfix">
<h3>参数设置</h3>
<div class="params-wrap params-wrap-single">
<h4>简单值:orgId:123, courseId:456
<a class="add-btn" data-type="single" href="javascript:;">添加</a>
</h4>
<ul></ul>
</div>
<div class="params-wrap params-wrap-multiple">
<h4>复杂值:jsonStr: [{courseId:123, coursePic:a.jpg, coursePrice:1}]
<a class="add-btn" data-type="multiple" href="javascript:;">添加</a>
</h4>
<ul>
<li class="multiple-key-list">
<input type="text" value="" class="key form-control" placeholder="key" />
<input type="checkbox" checked value="" />
</li>
</ul>
</div>
</section>
<section class="section section-action">
<h3>操作</h3>
<button id="J_data_validate" class="btn btn-primary" type="button">验证接口</button>
<button id="J_params_reset" class="btn btn-primary" type="button">重置参数设置</button>
<button id="J_show_demo" class="btn btn-primary" type="button">demo 展示</button>
</section>
<section class="section section-result">
<h3>结果</h3>
<div id="J_show_data" class="show-data"></div>
</section>
<script type="text/javascript" src="js/inspector-json.js"></script>
<script src="js/require-jquery.js" data-main="js/index.js"></script>
</body>
</html>