增加debug参数管理,代码优化
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="resizebleLeftRight" class="ui-resizable-handle mgresizebleW"></div>
|
||||
<div id="resizableLeftRight" class="ui-resizable-handle mgresizableW"></div>
|
||||
<div class="right-container" id="rightContent">
|
||||
<div class="right-container" id="rightContentMask"></div>
|
||||
<div class="tab-page tab-home-page">
|
||||
@@ -74,25 +74,6 @@
|
||||
<div class="tab-page tab-zpages hide">
|
||||
<div class="tabs" id="rightZpages"></div>
|
||||
</div>
|
||||
<!-- 在线调试配置 -->
|
||||
<div class="tab-page tab-online-debug-page hide">
|
||||
<div class="title-info">
|
||||
<div class="text">
|
||||
每次点击在线调试的发送请求后,都会默认保存一次请求的form、header、body数据到网页的本地存储中,以备下次使用,在此页面可以管理这些数据。
|
||||
一般浏览都有5M左右存储空间,如果存储过多有可能会导致部分功能异常,请随时清理一下不再使用的。
|
||||
</div>
|
||||
<button class="btn btn-primary refresh" type="button"><i class="icon icon-refresh"></i> 刷新</button>
|
||||
<button class="btn btn-primary expand-all" type="button"><i class="icon icon-expand-full"></i> 全部展开</button>
|
||||
<button class="btn btn-primary collapse-all" type="button"><i class="icon icon-collapse-full"></i> 全部收起</button>
|
||||
<button class="btn btn-danger del-all-param" type="button"><i class="icon icon-remove-sign"></i> 全部删除</button>
|
||||
</div>
|
||||
<table class="table table-bordered" id="onlineDebugParamTable">
|
||||
<thead>
|
||||
<tr><th>接口地址</th><th>参数配置</th><th>操作</th></tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tab-page tab-document hide">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-tab href="#tabDocInfo">接口说明</a></li>
|
||||
|
||||
@@ -1,134 +1,134 @@
|
||||
body{width: 100%;height: 100%;margin: 0;padding: 0;}
|
||||
a:focus{outline:none;}
|
||||
ul{list-style: none;list-style-type: none;}
|
||||
.tree li a{white-space: nowrap;}
|
||||
.tree-menu li > ul{background-color: #f1f1f1;}
|
||||
.tree-menu li li li li a{padding-left: 68px;}
|
||||
.tree-menu li li li li li a{padding-left: 88px;}
|
||||
.tree-menu li li li li li li a{padding-left: 108px;}
|
||||
.tree-menu li li li li li li li a{padding-left: 128px;}
|
||||
.tree-menu li li li li li li li li a{padding-left: 148px;}
|
||||
.tree-menu li li li li li li li li li a{padding-left: 168px;}
|
||||
.tree-menu li li li li li li li li li li a{padding-left: 188px;}
|
||||
.table td, .table th {vertical-align: middle;}
|
||||
#tabDocInfo{position: absolute; bottom: 0;top: 60px;overflow-y: auto; right: 0; left: 10px;}
|
||||
#tabOnlineDebug .param-response-box{position: absolute; bottom: 0;top: 100px;overflow-y: auto; right: 0; left: 10px;}
|
||||
.tab-online-debug-page{overflow-y: auto;position: absolute; bottom: 0;top: 10px; right: 0; left: 10px;}
|
||||
.tab-online-debug-page .title-info{padding-bottom: 10px;}
|
||||
.tab-online-debug-page .title-info .btn{margin-right: 20px;}
|
||||
.tab-online-debug-page .title-info .text{padding-bottom: 10px;}
|
||||
|
||||
.local-storage{display: none;}
|
||||
|
||||
/**lable的覆盖样式*/
|
||||
.label{font-size: 100%;}
|
||||
.label-warning {background-color: #f9f5ee; color: #f1a325;}
|
||||
label{font-weight: normal;}
|
||||
|
||||
.nav.gray{background-color: #f1f1f1;margin-bottom: 10px;}
|
||||
|
||||
.doc-table tr .info{text-align: right; width: 100px;}
|
||||
.setting-table tr .info{text-align: right; max-width: 150px;}
|
||||
.show-doc span{color: #aaa;}
|
||||
|
||||
.mgresizebleW{z-index: 90;height: 100%; width: 10px; cursor: e-resize;}
|
||||
.ui-resizable-handle {display: block;font-size: 0.1px;position: absolute;}
|
||||
#resizebleLeftRight{left: 360px;}
|
||||
.unselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
||||
|
||||
#homePageDashboard{overflow-y: auto;bottom: 0;top: 0;right: 0;left: 0;position: absolute;overflow-x: hidden;padding: 10px;}
|
||||
#homePageDashboard .panel-body{padding: 10px;}
|
||||
|
||||
#homePageLi{margin-top: 5px;}
|
||||
|
||||
.left-body{
|
||||
width: 360px; height:100%; position: fixed; top: 0; bottom: 0; left: 0;
|
||||
}
|
||||
.left-header{
|
||||
background: #3280fc;width: 100%; height:60px;line-height:60px;
|
||||
position: absolute; top: 0; bottom: 0; left: 0;text-align: center;
|
||||
}
|
||||
.left-header .logo{
|
||||
font-size: 30px;color: #fff;
|
||||
}
|
||||
.left-header .icon-bars{
|
||||
font-size: 24px;float: right;margin: 18px 18px 0 0;color: #fff;cursor: pointer;
|
||||
}
|
||||
.left-container{
|
||||
width: 100%;position: absolute;background: #f1f1f1;color: rgba(163, 175, 183, .9);
|
||||
top: 60px; bottom: 0; left: 0; overflow-y: auto; padding: 10px;
|
||||
}
|
||||
.left-container .projects{border: 0px; border-radius: 0px;}
|
||||
|
||||
.right-container{
|
||||
position: fixed;top: 0px; bottom: 0; left: 360px; right: 0;padding: 10px;
|
||||
}
|
||||
|
||||
#docResponseModel td:first-child{width: 100px;}
|
||||
#docResponseExample td:first-child{width: 100px;}
|
||||
|
||||
.modal-table-box{margin-top: 10px; max-height: 500px;overflow-y: auto;}
|
||||
.modal-table-box{list-style: none;}
|
||||
.modal-table-box ul{padding-left: 10px;}
|
||||
.modal-table-box li{padding: 10px 15px; margin: 0 10px 10px 0; background-color: #f1f1f1;cursor: pointer;}
|
||||
.modal-table-box li.checked{background-color: #8666b8;color:#fff;}
|
||||
|
||||
#exportDocumentText{height: 350px;}
|
||||
|
||||
/* 在线调试框样式 */
|
||||
#tabParamBody .tab-content{padding-top: 10px;}
|
||||
|
||||
.post-url-box{padding: 10px 0;}
|
||||
.post-url-box .input-group-btn:nth-child(2) button{border-right: 0;border-radius: 0;}
|
||||
.post-url-box .send-request .hide{display: none;}
|
||||
|
||||
.param-box{}
|
||||
.param-box .panel-collapse{padding: 10px;}
|
||||
.param-box .nav{background-color: #f1f1f1;}
|
||||
/* .param-box .nav > li > *{padding: 8px 25px;} */
|
||||
.param-box .nav > li > span{position: relative; display: block;background-color: #ccc;padding: 9px 25px;}
|
||||
.param-box .nav > .form-to-url{position: relative; display: block;padding: 10px 0 0 25px;}
|
||||
.param-box .nav > .form-to-url label{margin: 0;}
|
||||
.param-box .nav > .form-to-url input{margin: 0;}
|
||||
.param-box .tab-content .tab-param-pane{padding: 10px 10px 0 10px;}
|
||||
.param-box .table.param-table td, .param-box .table.param-table th{padding: 4px 5px;}
|
||||
.param-box .param-table td:first-child{width: 250px;}
|
||||
.param-box .param-table tbody td:nth-child(2){border-right: 0;}
|
||||
.param-box .param-table tbody td:nth-child(3){border-left: 0;padding: 0 10px 0 0;width: 10px;}
|
||||
.param-box .param-table tbody td:nth-child(3) i{cursor: pointer;color: #ccc;}
|
||||
.param-box .param-table tbody td:nth-child(3) i:hover{color: #888;}
|
||||
.param-box .param-table tbody tr.base td:last-child{display: none;}
|
||||
#bulkEditHeaderCheck{margin-left: 10px;}
|
||||
#bulkEditHeader,#bulkEditForm{display: none;}
|
||||
|
||||
.response-box{margin-top: 20px;}
|
||||
.response-box .nav > li > *{padding: 8px 25px;}
|
||||
.response-box .nav > li span{position: relative; display: block;padding: 9px 25px;}
|
||||
.response-box .nav > li.info span{background-color: #ccc;}
|
||||
.response-box .nav > li.right{float: right;}
|
||||
.response-box .nav > li.right i{color: #3280fc;}
|
||||
.response-box .nav{background-color: #f1f1f1;}
|
||||
.response-box .tab-content .tab-response-pane{padding: 10px;}
|
||||
|
||||
#responseBodyJsonIframe{width: 100%;height: 300px;border: 0;}
|
||||
|
||||
/* S-模拟请求 */
|
||||
#tabSimulationResult{padding: 10px 0;}
|
||||
/* E-模拟请求 */
|
||||
|
||||
/* S-JSON展示的样式 */
|
||||
pre.json{margin-top:0px;margin-bottom:0px;}
|
||||
pre.json .canvas{font:10pt georgia;background-color:#ececec;color:#000000;border:1px solid #cecece;}
|
||||
pre.json .object-brace{color:#00aa00;font-weight:bold;}
|
||||
pre.json .array-brace{color:#0033ff;font-weight:bold;}
|
||||
pre.json .property-name{color:#cc0000;font-weight:bold;}
|
||||
pre.json .string{color:#007777;}
|
||||
pre.json .number{color:#aa00aa;}
|
||||
pre.json .boolean{color:#0000ff;}
|
||||
pre.json .function{color:#aa6633;text-decoration:italic;}
|
||||
pre.json .null{color:#0000ff;}
|
||||
pre.json .comma{color:#000000;font-weight:bold;}
|
||||
pre.json .annotation{color:#aaa;}
|
||||
pre img{cursor: pointer;}
|
||||
/* E-JSON展示的样式 */
|
||||
|
||||
body{width: 100%;height: 100%;margin: 0;padding: 0;}
|
||||
a:focus{outline:none;}
|
||||
ul{list-style: none;list-style-type: none;}
|
||||
.tree li a{white-space: nowrap;}
|
||||
.tree-menu li > ul{background-color: #f1f1f1;}
|
||||
.tree-menu li li li li a{padding-left: 68px;}
|
||||
.tree-menu li li li li li a{padding-left: 88px;}
|
||||
.tree-menu li li li li li li a{padding-left: 108px;}
|
||||
.tree-menu li li li li li li li a{padding-left: 128px;}
|
||||
.tree-menu li li li li li li li li a{padding-left: 148px;}
|
||||
.tree-menu li li li li li li li li li a{padding-left: 168px;}
|
||||
.tree-menu li li li li li li li li li li a{padding-left: 188px;}
|
||||
.table td, .table th {vertical-align: middle;}
|
||||
#tabDocInfo{position: absolute; bottom: 0;top: 60px;overflow-y: auto; right: 0; left: 10px;}
|
||||
#tabOnlineDebug .param-response-box{position: absolute; bottom: 0;top: 100px;overflow-y: auto; right: 0; left: 10px;}
|
||||
.tab-online-debug-page{overflow-y: auto;position: absolute; bottom: 0;top: 10px; right: 0; left: 10px;}
|
||||
.tab-online-debug-page .title-info{padding-bottom: 10px;}
|
||||
.tab-online-debug-page .title-info .btn{margin-right: 20px;}
|
||||
.tab-online-debug-page .title-info .text{padding-bottom: 10px;}
|
||||
|
||||
.local-storage{display: none;}
|
||||
|
||||
/**lable的覆盖样式*/
|
||||
.label{font-size: 100%;}
|
||||
.label-warning {background-color: #f9f5ee; color: #f1a325;}
|
||||
label{font-weight: normal;}
|
||||
|
||||
.nav.gray{background-color: #f1f1f1;margin-bottom: 10px;}
|
||||
|
||||
.doc-table tr .info{text-align: right; width: 100px;}
|
||||
.setting-table tr .info{text-align: right; max-width: 150px;}
|
||||
.show-doc span{color: #aaa;}
|
||||
|
||||
.mgresizableW{z-index: 90;height: 100%; width: 10px; cursor: e-resize;}
|
||||
.ui-resizable-handle {display: block;font-size: 0.1px;position: absolute;}
|
||||
#resizableLeftRight{left: 360px;}
|
||||
.unselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
||||
|
||||
#homePageDashboard{overflow-y: auto;bottom: 0;top: 0;right: 0;left: 0;position: absolute;overflow-x: hidden;padding: 10px;}
|
||||
#homePageDashboard .panel-body{padding: 10px;}
|
||||
|
||||
#homePageLi{margin-top: 5px;}
|
||||
|
||||
.left-body{
|
||||
width: 360px; height:100%; position: fixed; top: 0; bottom: 0; left: 0;
|
||||
}
|
||||
.left-header{
|
||||
background: #3280fc;width: 100%; height:60px;line-height:60px;
|
||||
position: absolute; top: 0; bottom: 0; left: 0;text-align: center;
|
||||
}
|
||||
.left-header .logo{
|
||||
font-size: 30px;color: #fff;
|
||||
}
|
||||
.left-header .icon-bars{
|
||||
font-size: 24px;float: right;margin: 18px 18px 0 0;color: #fff;cursor: pointer;
|
||||
}
|
||||
.left-container{
|
||||
width: 100%;position: absolute;background: #f1f1f1;color: rgba(163, 175, 183, .9);
|
||||
top: 60px; bottom: 0; left: 0; overflow-y: auto; padding: 10px;
|
||||
}
|
||||
.left-container .projects{border: 0px; border-radius: 0px;}
|
||||
|
||||
.right-container{
|
||||
position: fixed;top: 0px; bottom: 0; left: 360px; right: 0;padding: 10px;
|
||||
}
|
||||
|
||||
#docResponseModel td:first-child{width: 100px;}
|
||||
#docResponseExample td:first-child{width: 100px;}
|
||||
|
||||
.modal-table-box{margin-top: 10px; max-height: 500px;overflow-y: auto;}
|
||||
.modal-table-box{list-style: none;}
|
||||
.modal-table-box ul{padding-left: 10px;}
|
||||
.modal-table-box li{padding: 10px 15px; margin: 0 10px 10px 0; background-color: #f1f1f1;cursor: pointer;}
|
||||
.modal-table-box li.checked{background-color: #8666b8;color:#fff;}
|
||||
|
||||
#exportDocumentText{height: 350px;}
|
||||
|
||||
/* 在线调试框样式 */
|
||||
#tabParamBody .tab-content{padding-top: 10px;}
|
||||
|
||||
.post-url-box{padding: 10px 0;}
|
||||
.post-url-box .input-group-btn:nth-child(2) button{border-right: 0;border-radius: 0;}
|
||||
.post-url-box .send-request .hide{display: none;}
|
||||
|
||||
.param-box{}
|
||||
.param-box .panel-collapse{padding: 10px;}
|
||||
.param-box .nav{background-color: #f1f1f1;}
|
||||
/* .param-box .nav > li > *{padding: 8px 25px;} */
|
||||
.param-box .nav > li > span{position: relative; display: block;background-color: #ccc;padding: 9px 25px;}
|
||||
.param-box .nav > .form-to-url{position: relative; display: block;padding: 10px 0 0 25px;}
|
||||
.param-box .nav > .form-to-url label{margin: 0;}
|
||||
.param-box .nav > .form-to-url input{margin: 0;}
|
||||
.param-box .tab-content .tab-param-pane{padding: 10px 10px 0 10px;}
|
||||
.param-box .table.param-table td, .param-box .table.param-table th{padding: 4px 5px;}
|
||||
.param-box .param-table td:first-child{width: 250px;}
|
||||
.param-box .param-table tbody td:nth-child(2){border-right: 0;}
|
||||
.param-box .param-table tbody td:nth-child(3){border-left: 0;padding: 0 10px 0 0;width: 10px;}
|
||||
.param-box .param-table tbody td:nth-child(3) i{cursor: pointer;color: #ccc;}
|
||||
.param-box .param-table tbody td:nth-child(3) i:hover{color: #888;}
|
||||
.param-box .param-table tbody tr.base td:last-child{display: none;}
|
||||
#bulkEditHeaderCheck{margin-left: 10px;}
|
||||
#bulkEditHeader,#bulkEditForm{display: none;}
|
||||
|
||||
.response-box{margin-top: 20px;}
|
||||
.response-box .nav > li > *{padding: 8px 25px;}
|
||||
.response-box .nav > li span{position: relative; display: block;padding: 9px 25px;}
|
||||
.response-box .nav > li.info span{background-color: #ccc;}
|
||||
.response-box .nav > li.right{float: right;}
|
||||
.response-box .nav > li.right i{color: #3280fc;}
|
||||
.response-box .nav{background-color: #f1f1f1;}
|
||||
.response-box .tab-content .tab-response-pane{padding: 10px;}
|
||||
|
||||
#responseBodyJsonIframe{width: 100%;height: 300px;border: 0;}
|
||||
|
||||
/* S-模拟请求 */
|
||||
#tabSimulationResult{padding: 10px 0;}
|
||||
/* E-模拟请求 */
|
||||
|
||||
/* S-JSON展示的样式 */
|
||||
pre.json{margin-top:0px;margin-bottom:0px;}
|
||||
pre.json .canvas{font:10pt georgia;background-color:#ececec;color:#000000;border:1px solid #cecece;}
|
||||
pre.json .object-brace{color:#00aa00;font-weight:bold;}
|
||||
pre.json .array-brace{color:#0033ff;font-weight:bold;}
|
||||
pre.json .property-name{color:#cc0000;font-weight:bold;}
|
||||
pre.json .string{color:#007777;}
|
||||
pre.json .number{color:#aa00aa;}
|
||||
pre.json .boolean{color:#0000ff;}
|
||||
pre.json .function{color:#aa6633;text-decoration:italic;}
|
||||
pre.json .null{color:#0000ff;}
|
||||
pre.json .comma{color:#000000;font-weight:bold;}
|
||||
pre.json .annotation{color:#aaa;}
|
||||
pre img{cursor: pointer;}
|
||||
/* E-JSON展示的样式 */
|
||||
|
||||
|
||||
@@ -1,204 +1,204 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>swagger-mg-ui</title>
|
||||
<link rel="shortcut icon" href="img/api.ico"/>
|
||||
<link rel="stylesheet" href="css/zui.min.css" />
|
||||
<link rel="stylesheet" href="css/zui.dashboard.min.css" />
|
||||
<link rel="stylesheet" href="css/mg-ui.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="left-body" id="leftContent">
|
||||
<div class="left-header">
|
||||
<span class="logo" id="logoText">swagger-mg-ui</span>
|
||||
<i class="icon icon-bars" id="changeContentWidth"></i>
|
||||
</div>
|
||||
<div class="scrollbar-hover left-container">
|
||||
<!-- 样式类可选:tree-menu tree-folders tree-chevrons tree-angles -->
|
||||
<ul class="tree tree-lines tree-menu projects">
|
||||
<li>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="searchDocInput">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button" id="searchDocBt">搜索</button>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
<li id="homePageLi"><a href="javascript:void(0)" path=""><i class="icon-home"></i> 控制台</a></li>
|
||||
</ul>
|
||||
<div id="apiPathTree">
|
||||
<ul class="tree tree-lines projects"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="resizebleLeftRight" class="ui-resizable-handle mgresizebleW"></div>
|
||||
<div class="right-container" id="rightContent">
|
||||
<div class="tab-page tab-home-page">
|
||||
<div id="homePageDashboard" class="dashboard dashboard-draggable" data-height="290">
|
||||
<section class="row">
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div class="panel" data-id="1">
|
||||
<div class="panel-heading">
|
||||
<div class="title">配置中心</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="content">
|
||||
<table class="table table-bordered setting-table">
|
||||
<tr>
|
||||
<td class="info">目录展示方式</td>
|
||||
<td>
|
||||
<label><input type="radio" name="catalogShowType" value="1">分路径展示</label>
|
||||
<label><input type="radio" name="catalogShowType" value="2">分标签展示</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">树形菜单展示方式</td>
|
||||
<td>
|
||||
<label><input type="radio" name="treeShowType" value="1">直角</label>
|
||||
<label><input type="radio" name="treeShowType" value="2">导航</label>
|
||||
<label><input type="radio" name="treeShowType" value="3">加减</label>
|
||||
<label><input type="radio" name="treeShowType" value="4">文件夹</label>
|
||||
<label><input type="radio" name="treeShowType" value="5">V型</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">是否展示字段的类型</td>
|
||||
<td>
|
||||
<label><input type="radio" name="showParamType" value="1">是</label>
|
||||
<label><input type="radio" name="showParamType" value="0">否</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">自动填充请求参数</td>
|
||||
<td>
|
||||
<label><input type="radio" name="autoFillParam" value="0">否</label>
|
||||
<label><input type="radio" name="autoFillParam" value="1">智能填充</label>
|
||||
<label><input type="radio" name="autoFillParam" value="2">全部填充</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div align="center">简介</div>
|
||||
swagger-mg-ui是swagger-ui的一个前端实现,使用简单、解析速度快、走心的设计,
|
||||
支持多项目同时展示,多种文档目录的展示方案,多种自定义配置,满足各种使用习惯。
|
||||
本项目是完全从头写的,所以有任何属性未解析到、UI上有何建议都能及时处理得到。
|
||||
使用中您有任何的意见和建议都可到源码地址处反馈哦!<br/>
|
||||
源码地址:<a target="_blank" href="https://gitee.com/zyplayer/swagger-mg-ui">swagger-mg-ui</a>,
|
||||
前端框架:<a target="_blank" href="http://zui.sexy">zui</a>,
|
||||
我的网站:<a target="_blank" href="http://kongjianzhou.com">空间轴</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-page tab-document hide">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-tab href="#tabDocInfo">接口说明</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane tab-document-pane active" id="tabDocInfo">
|
||||
<table class="table table-bordered doc-table">
|
||||
<tr>
|
||||
<td class="info">接口地址</td>
|
||||
<td><span id="docUrl" class="label label-warning"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">说明</td>
|
||||
<td id="docInfo"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">请求方式</td>
|
||||
<td><span id="docRequestMethod" class="label label-warning"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">consumes</td>
|
||||
<td><span id="docConsumes" class="label label-warning"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">produces</td>
|
||||
<td><span id="docProduces" class="label label-warning"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">请求参数</td>
|
||||
<td>
|
||||
<ul class="nav nav-secondary gray">
|
||||
<li class="active"><a data-tab href="#docRequestParam">说明</a></li>
|
||||
<li><a data-tab href="#docRequestExample">例子</a></li>
|
||||
<!-- <i class="icon icon-info-sign" title='例:@ApiModelProperty(value="用户ID", example = "9527"),将example填入对象值里面'></i> -->
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane tab-param-type-pane active" id="docRequestParam">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr><th>参数名</th><th>说明</th><th>类型</th><th>参数位置</th><th>是否必填</th></tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tab-pane tab-param-type-pane" id="docRequestExample">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr><th>参数名</th><th>说明</th><th>类型</th><th>参数位置</th><th>是否必填</th></tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">响应Model</td>
|
||||
<td>
|
||||
<ul class="nav nav-secondary gray">
|
||||
<li class="active"><a data-tab href="#docResponseModel">说明</a></li>
|
||||
<li><a data-tab href="#docResponseExample">例子</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane tab-param-type-pane active" id="docResponseModel">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr><th>状态码</th><th>说明</th></tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tab-pane tab-param-type-pane" id="docResponseExample">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr><th>状态码</th><th>说明</th></tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript" src="js/jquery-3.1.0.min.js"></script>
|
||||
<script type="text/javascript" src="js/zui.min.js"></script>
|
||||
<script type="text/javascript" src="js/zui.dashboard.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="js/mg-ui-data.js"></script>
|
||||
|
||||
<script type="text/javascript" src="js/formatjson.js"></script>
|
||||
<script type="text/javascript" src="js/toast.js"></script>
|
||||
<script type="text/javascript" src="js/common.js"></script>
|
||||
<script type="text/javascript" src="js/mgResizeble.js"></script>
|
||||
<script type="text/javascript" src="js/mg-ui-tree.js"></script>
|
||||
<script type="text/javascript" src="js/mg-ui-tag.js"></script>
|
||||
<script type="text/javascript" src="js/mg-ui-debug.js"></script>
|
||||
<script type="text/javascript" src="js/mg-ui.js"></script>
|
||||
</html>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>swagger-mg-ui</title>
|
||||
<link rel="shortcut icon" href="img/api.ico"/>
|
||||
<link rel="stylesheet" href="css/zui.min.css" />
|
||||
<link rel="stylesheet" href="css/zui.dashboard.min.css" />
|
||||
<link rel="stylesheet" href="css/mg-ui.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="left-body" id="leftContent">
|
||||
<div class="left-header">
|
||||
<span class="logo" id="logoText">swagger-mg-ui</span>
|
||||
<i class="icon icon-bars" id="changeContentWidth"></i>
|
||||
</div>
|
||||
<div class="scrollbar-hover left-container">
|
||||
<!-- 样式类可选:tree-menu tree-folders tree-chevrons tree-angles -->
|
||||
<ul class="tree tree-lines tree-menu projects">
|
||||
<li>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="searchDocInput">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="button" id="searchDocBt">搜索</button>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
<li id="homePageLi"><a href="javascript:void(0)" path=""><i class="icon-home"></i> 控制台</a></li>
|
||||
</ul>
|
||||
<div id="apiPathTree">
|
||||
<ul class="tree tree-lines projects"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="resizableLeftRight" class="ui-resizable-handle mgresizableW"></div>
|
||||
<div class="right-container" id="rightContent">
|
||||
<div class="tab-page tab-home-page">
|
||||
<div id="homePageDashboard" class="dashboard dashboard-draggable" data-height="290">
|
||||
<section class="row">
|
||||
<div class="col-md-6 col-sm-6">
|
||||
<div class="panel" data-id="1">
|
||||
<div class="panel-heading">
|
||||
<div class="title">配置中心</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="content">
|
||||
<table class="table table-bordered setting-table">
|
||||
<tr>
|
||||
<td class="info">目录展示方式</td>
|
||||
<td>
|
||||
<label><input type="radio" name="catalogShowType" value="1">分路径展示</label>
|
||||
<label><input type="radio" name="catalogShowType" value="2">分标签展示</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">树形菜单展示方式</td>
|
||||
<td>
|
||||
<label><input type="radio" name="treeShowType" value="1">直角</label>
|
||||
<label><input type="radio" name="treeShowType" value="2">导航</label>
|
||||
<label><input type="radio" name="treeShowType" value="3">加减</label>
|
||||
<label><input type="radio" name="treeShowType" value="4">文件夹</label>
|
||||
<label><input type="radio" name="treeShowType" value="5">V型</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">是否展示字段的类型</td>
|
||||
<td>
|
||||
<label><input type="radio" name="showParamType" value="1">是</label>
|
||||
<label><input type="radio" name="showParamType" value="0">否</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">自动填充请求参数</td>
|
||||
<td>
|
||||
<label><input type="radio" name="autoFillParam" value="0">否</label>
|
||||
<label><input type="radio" name="autoFillParam" value="1">智能填充</label>
|
||||
<label><input type="radio" name="autoFillParam" value="2">全部填充</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div align="center">简介</div>
|
||||
swagger-mg-ui是swagger-ui的一个前端实现,使用简单、解析速度快、走心的设计,
|
||||
支持多项目同时展示,多种文档目录的展示方案,多种自定义配置,满足各种使用习惯。
|
||||
本项目是完全从头写的,所以有任何属性未解析到、UI上有何建议都能及时处理得到。
|
||||
使用中您有任何的意见和建议都可到源码地址处反馈哦!<br/>
|
||||
源码地址:<a target="_blank" href="https://gitee.com/zyplayer/swagger-mg-ui">swagger-mg-ui</a>,
|
||||
前端框架:<a target="_blank" href="http://zui.sexy">zui</a>,
|
||||
我的网站:<a target="_blank" href="http://kongjianzhou.com">空间轴</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-page tab-document hide">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-tab href="#tabDocInfo">接口说明</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane tab-document-pane active" id="tabDocInfo">
|
||||
<table class="table table-bordered doc-table">
|
||||
<tr>
|
||||
<td class="info">接口地址</td>
|
||||
<td><span id="docUrl" class="label label-warning"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">说明</td>
|
||||
<td id="docInfo"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">请求方式</td>
|
||||
<td><span id="docRequestMethod" class="label label-warning"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">consumes</td>
|
||||
<td><span id="docConsumes" class="label label-warning"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">produces</td>
|
||||
<td><span id="docProduces" class="label label-warning"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">请求参数</td>
|
||||
<td>
|
||||
<ul class="nav nav-secondary gray">
|
||||
<li class="active"><a data-tab href="#docRequestParam">说明</a></li>
|
||||
<li><a data-tab href="#docRequestExample">例子</a></li>
|
||||
<!-- <i class="icon icon-info-sign" title='例:@ApiModelProperty(value="用户ID", example = "9527"),将example填入对象值里面'></i> -->
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane tab-param-type-pane active" id="docRequestParam">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr><th>参数名</th><th>说明</th><th>类型</th><th>参数位置</th><th>是否必填</th></tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tab-pane tab-param-type-pane" id="docRequestExample">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr><th>参数名</th><th>说明</th><th>类型</th><th>参数位置</th><th>是否必填</th></tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">响应Model</td>
|
||||
<td>
|
||||
<ul class="nav nav-secondary gray">
|
||||
<li class="active"><a data-tab href="#docResponseModel">说明</a></li>
|
||||
<li><a data-tab href="#docResponseExample">例子</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane tab-param-type-pane active" id="docResponseModel">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr><th>状态码</th><th>说明</th></tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tab-pane tab-param-type-pane" id="docResponseExample">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr><th>状态码</th><th>说明</th></tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript" src="js/jquery-3.1.0.min.js"></script>
|
||||
<script type="text/javascript" src="js/zui.min.js"></script>
|
||||
<script type="text/javascript" src="js/zui.dashboard.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="js/mg-ui-data.js"></script>
|
||||
|
||||
<script type="text/javascript" src="js/formatjson.js"></script>
|
||||
<script type="text/javascript" src="js/toast.js"></script>
|
||||
<script type="text/javascript" src="js/common.js"></script>
|
||||
<script type="text/javascript" src="js/mgResizable.js"></script>
|
||||
<script type="text/javascript" src="js/mg-ui-tree.js"></script>
|
||||
<script type="text/javascript" src="js/mg-ui-tag.js"></script>
|
||||
<script type="text/javascript" src="js/mg-ui-debug.js"></script>
|
||||
<script type="text/javascript" src="js/mg-ui.js"></script>
|
||||
</html>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,106 +1,106 @@
|
||||
|
||||
/**
|
||||
* 两个元素上下、左右拖动动态改变大小
|
||||
* @author 暮光:城中城
|
||||
* @since 2017年5月7日
|
||||
*/
|
||||
(function($){
|
||||
$.fn.mgResizebleHeight = function(options) {
|
||||
var defaults = {prev:this,next:this, prevHtMin:0, prevHtMax:999, nextHtMin:0, nextHtMax:999};
|
||||
var opts = $.extend(defaults, options);
|
||||
var disY = 0, prevH = 0, nextH = 0, isStart = false;
|
||||
var prev, next, thisObj = this;
|
||||
$(document).mousemove(function(ev){
|
||||
if(!isStart){return;}
|
||||
var ev = ev || window.event;
|
||||
var H = ev.clientY - disY;
|
||||
var prevHNow = prevH+H, nextHNow = nextH-H;
|
||||
if(opts.prevHtMin >= prevHNow) {
|
||||
prevHNow = opts.prevHtMin;
|
||||
nextHNow = next.outerHeight();
|
||||
}
|
||||
if(opts.nextHtMin >= nextHNow) {
|
||||
nextHNow = opts.nextHtMin;
|
||||
prevHNow = prev.outerHeight();
|
||||
}
|
||||
if(opts.prevHtMax <= prevHNow) {
|
||||
prevHNow = opts.prevHtMax;
|
||||
nextHNow = next.outerHeight();
|
||||
}
|
||||
if(opts.nextHtMax <= nextHNow) {
|
||||
nextHNow = opts.nextHtMax;
|
||||
prevHNow = prev.outerHeight();
|
||||
}
|
||||
//prev.css("height", prevHNow + 'px');
|
||||
//next.css("height", nextHNow + 'px');
|
||||
if(typeof opts.onresize == 'function') {
|
||||
opts.onresize(prevHNow, nextHNow);
|
||||
}
|
||||
}).mouseup(function(ev){
|
||||
isStart = false;
|
||||
});
|
||||
$(this).mousedown(function(ev){
|
||||
var ev = ev || window.event;
|
||||
disY = ev.clientY;
|
||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||
prevH = prev.outerHeight();
|
||||
nextH = next.outerHeight();
|
||||
isStart = true;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 改变宽度的功能,只是实现各种消息的通知,实际改变大小需要在回调里面自己操作
|
||||
*/
|
||||
$.fn.mgResizebleWidth = function(options) {
|
||||
var defaults = {prev:this,next:this, prevWtMin:0, prevWtMax:999, nextWtMin:0, nextWtMax:999};
|
||||
var opts = $.extend(defaults, options);
|
||||
var disX = 0, prevW = 0, nextW = 0, isStart = false;
|
||||
var prev, next, thisObj = this;
|
||||
$(document).mousemove(function(ev){
|
||||
if(!isStart){return;}
|
||||
var ev = ev || window.event;
|
||||
var W = ev.clientX - disX;
|
||||
var prevWNow = prevW+W, nextWNow = nextW-W;
|
||||
if(opts.prevWtMin >= prevWNow) {
|
||||
prevWNow = opts.prevWtMin;
|
||||
nextWNow = next.outerWidth();
|
||||
}
|
||||
if(opts.nextWtMin >= nextWNow) {
|
||||
nextWNow = opts.nextWtMin;
|
||||
prevWNow = prev.outerWidth();
|
||||
}
|
||||
if(opts.prevWtMax <= prevWNow) {
|
||||
prevWNow = opts.prevWtMax;
|
||||
nextWNow = next.outerWidth();
|
||||
}
|
||||
if(opts.nextWtMax <= nextWNow) {
|
||||
nextWNow = opts.nextWtMax;
|
||||
prevWNow = prev.outerWidth();
|
||||
}
|
||||
//prev.css("width", prevWNow + 'px');
|
||||
//next.css("width", nextWNow + 'px');
|
||||
if(typeof opts.onresize == 'function') {
|
||||
opts.onresize(prevWNow, nextWNow);
|
||||
}
|
||||
}).mouseup(function(ev){
|
||||
if(!isStart){return;}
|
||||
isStart = false;
|
||||
if(typeof opts.onfinish == 'function') {
|
||||
opts.onfinish();
|
||||
}
|
||||
});
|
||||
$(this).mousedown(function(ev){
|
||||
var ev = ev || window.event;
|
||||
disX = ev.clientX;
|
||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||
prevW = prev.outerWidth();
|
||||
nextW = next.outerWidth();
|
||||
isStart = true;
|
||||
if(typeof opts.onstart == 'function') {
|
||||
opts.onstart();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 两个元素上下、左右拖动动态改变大小
|
||||
* @author 暮光:城中城
|
||||
* @since 2017年5月7日
|
||||
*/
|
||||
(function($){
|
||||
$.fn.mgResizableHeight = function(options) {
|
||||
var defaults = {prev:this,next:this, prevHtMin:0, prevHtMax:999, nextHtMin:0, nextHtMax:999};
|
||||
var opts = $.extend(defaults, options);
|
||||
var disY = 0, prevH = 0, nextH = 0, isStart = false;
|
||||
var prev, next, thisObj = this;
|
||||
$(document).mousemove(function(ev){
|
||||
if(!isStart){return;}
|
||||
var ev = ev || window.event;
|
||||
var H = ev.clientY - disY;
|
||||
var prevHNow = prevH+H, nextHNow = nextH-H;
|
||||
if(opts.prevHtMin >= prevHNow) {
|
||||
prevHNow = opts.prevHtMin;
|
||||
nextHNow = next.outerHeight();
|
||||
}
|
||||
if(opts.nextHtMin >= nextHNow) {
|
||||
nextHNow = opts.nextHtMin;
|
||||
prevHNow = prev.outerHeight();
|
||||
}
|
||||
if(opts.prevHtMax <= prevHNow) {
|
||||
prevHNow = opts.prevHtMax;
|
||||
nextHNow = next.outerHeight();
|
||||
}
|
||||
if(opts.nextHtMax <= nextHNow) {
|
||||
nextHNow = opts.nextHtMax;
|
||||
prevHNow = prev.outerHeight();
|
||||
}
|
||||
//prev.css("height", prevHNow + 'px');
|
||||
//next.css("height", nextHNow + 'px');
|
||||
if(typeof opts.onresize == 'function') {
|
||||
opts.onresize(prevHNow, nextHNow);
|
||||
}
|
||||
}).mouseup(function(ev){
|
||||
isStart = false;
|
||||
});
|
||||
$(this).mousedown(function(ev){
|
||||
var ev = ev || window.event;
|
||||
disY = ev.clientY;
|
||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||
prevH = prev.outerHeight();
|
||||
nextH = next.outerHeight();
|
||||
isStart = true;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 改变宽度的功能,只是实现各种消息的通知,实际改变大小需要在回调里面自己操作
|
||||
*/
|
||||
$.fn.mgResizableWidth = function(options) {
|
||||
var defaults = {prev:this,next:this, prevWtMin:0, prevWtMax:999, nextWtMin:0, nextWtMax:999};
|
||||
var opts = $.extend(defaults, options);
|
||||
var disX = 0, prevW = 0, nextW = 0, isStart = false;
|
||||
var prev, next, thisObj = this;
|
||||
$(document).mousemove(function(ev){
|
||||
if(!isStart){return;}
|
||||
var ev = ev || window.event;
|
||||
var W = ev.clientX - disX;
|
||||
var prevWNow = prevW+W, nextWNow = nextW-W;
|
||||
if(opts.prevWtMin >= prevWNow) {
|
||||
prevWNow = opts.prevWtMin;
|
||||
nextWNow = next.outerWidth();
|
||||
}
|
||||
if(opts.nextWtMin >= nextWNow) {
|
||||
nextWNow = opts.nextWtMin;
|
||||
prevWNow = prev.outerWidth();
|
||||
}
|
||||
if(opts.prevWtMax <= prevWNow) {
|
||||
prevWNow = opts.prevWtMax;
|
||||
nextWNow = next.outerWidth();
|
||||
}
|
||||
if(opts.nextWtMax <= nextWNow) {
|
||||
nextWNow = opts.nextWtMax;
|
||||
prevWNow = prev.outerWidth();
|
||||
}
|
||||
//prev.css("width", prevWNow + 'px');
|
||||
//next.css("width", nextWNow + 'px');
|
||||
if(typeof opts.onresize == 'function') {
|
||||
opts.onresize(prevWNow, nextWNow);
|
||||
}
|
||||
}).mouseup(function(ev){
|
||||
if(!isStart){return;}
|
||||
isStart = false;
|
||||
if(typeof opts.onfinish == 'function') {
|
||||
opts.onfinish();
|
||||
}
|
||||
});
|
||||
$(this).mousedown(function(ev){
|
||||
var ev = ev || window.event;
|
||||
disX = ev.clientX;
|
||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||
prevW = prev.outerWidth();
|
||||
nextW = next.outerWidth();
|
||||
isStart = true;
|
||||
if(typeof opts.onstart == 'function') {
|
||||
opts.onstart();
|
||||
}
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
||||
@@ -1,138 +1,134 @@
|
||||
body{width: 100%;height: 100%;margin: 0;padding: 0;}
|
||||
a:focus{outline:none;}
|
||||
ul{list-style: none;list-style-type: none;}
|
||||
.tree li a{white-space: nowrap;}
|
||||
.tree-menu li > ul{background-color: #f1f1f1;}
|
||||
.tree-menu li li li li a{padding-left: 68px;}
|
||||
.tree-menu li li li li li a{padding-left: 88px;}
|
||||
.tree-menu li li li li li li a{padding-left: 108px;}
|
||||
.tree-menu li li li li li li li a{padding-left: 128px;}
|
||||
.tree-menu li li li li li li li li a{padding-left: 148px;}
|
||||
.tree-menu li li li li li li li li li a{padding-left: 168px;}
|
||||
.tree-menu li li li li li li li li li li a{padding-left: 188px;}
|
||||
.table td, .table th {vertical-align: middle;}
|
||||
#tabDocInfo{position: absolute; bottom: 0;top: 60px;overflow-y: auto; right: 0; left: 10px;}
|
||||
#tabOnlineDebug .param-response-box{position: absolute; bottom: 0;top: 100px;overflow-y: auto; right: 0; left: 10px;}
|
||||
.tab-online-debug-page{overflow-y: auto;position: absolute; bottom: 0;top: 10px; right: 0; left: 10px;}
|
||||
.tab-online-debug-page .title-info{padding-bottom: 10px;}
|
||||
.tab-online-debug-page .title-info .btn{margin-right: 20px;}
|
||||
.tab-online-debug-page .title-info .text{padding-bottom: 10px;}
|
||||
|
||||
.local-storage{display: none;}
|
||||
|
||||
/**lable的覆盖样式*/
|
||||
.label{font-size: 100%;}
|
||||
.label-warning {background-color: #f9f5ee; color: #f1a325;}
|
||||
label{font-weight: normal;}
|
||||
|
||||
.nav.gray{background-color: #f1f1f1;margin-bottom: 10px;}
|
||||
|
||||
.doc-table tr .info{text-align: right; width: 100px;}
|
||||
.setting-table tr .info{text-align: right; max-width: 150px;}
|
||||
.show-doc span{color: #aaa;}
|
||||
|
||||
.mgresizebleW{z-index: 90;height: 100%; width: 10px; cursor: e-resize;}
|
||||
.ui-resizable-handle {display: block;font-size: 0.1px;position: absolute;}
|
||||
#resizebleLeftRight{left: 360px;}
|
||||
.unselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
||||
|
||||
#homePageDashboard{overflow-y: auto;bottom: 0;top: 0;right: 0;left: 0;position: absolute;overflow-x: hidden;padding: 10px;}
|
||||
#homePageDashboard .panel-body{padding: 10px;}
|
||||
.content.about{line-height: 30px;}
|
||||
|
||||
#homePageLi{margin-top: 5px;}
|
||||
|
||||
.left-body{
|
||||
width: 360px; height:100%; position: fixed; top: 0; bottom: 0; left: 0;
|
||||
}
|
||||
.left-header{
|
||||
background: #3280fc;width: 100%; height:60px;line-height:60px;
|
||||
position: absolute; top: 0; bottom: 0; left: 0;text-align: center;
|
||||
}
|
||||
.left-header .logo{
|
||||
font-size: 30px;color: #fff;
|
||||
}
|
||||
.left-header .icon-bars{
|
||||
font-size: 24px;float: right;margin: 18px 18px 0 0;color: #fff;cursor: pointer;
|
||||
}
|
||||
.left-container{
|
||||
width: 100%;position: absolute;background: #f1f1f1;color: rgba(163, 175, 183, .9);
|
||||
top: 60px; bottom: 0; left: 0; overflow-y: auto; padding: 10px;
|
||||
}
|
||||
.left-container .projects{border: 0px; border-radius: 0px;}
|
||||
|
||||
.right-container{
|
||||
position: fixed;top: 0px; bottom: 0; left: 360px; right: 0;padding: 10px;
|
||||
}
|
||||
|
||||
#docResponseModel td:first-child{width: 100px;}
|
||||
#docResponseExample td:first-child{width: 100px;}
|
||||
|
||||
.modal-table-box{margin-top: 10px; max-height: 500px;overflow-y: auto;}
|
||||
.modal-table-box{list-style: none;}
|
||||
.modal-table-box ul{padding-left: 10px;}
|
||||
.modal-table-box li{padding: 10px 15px; margin: 0 10px 10px 0; background-color: #f1f1f1;cursor: pointer;}
|
||||
.modal-table-box li.checked{background-color: #8666b8;color:#fff;}
|
||||
|
||||
#exportDocumentText{height: 350px;}
|
||||
|
||||
#rightContentMask{background-color: rgba(0, 0, 0, 0);padding: 0;z-index:9999; height: 100%;display: none;position: absolute;top: 0;bottom: 0;left:0;right: 0;}
|
||||
#rightZpages{height: 100%;position: relative;top: 0;bottom: 0;left:0;right: 0;}
|
||||
|
||||
/* 在线调试框样式 */
|
||||
#tabParamBody .tab-content{padding-top: 10px;}
|
||||
|
||||
.post-url-box{padding: 10px 0;}
|
||||
.post-url-box .input-group-btn:nth-child(2) button{border-right: 0;border-radius: 0;}
|
||||
.post-url-box .send-request .hide{display: none;}
|
||||
|
||||
.param-box{}
|
||||
.param-box .panel-collapse{padding: 10px;}
|
||||
.param-box .nav{background-color: #f1f1f1;}
|
||||
/* .param-box .nav > li > *{padding: 8px 25px;} */
|
||||
.param-box .nav > li > span{position: relative; display: block;background-color: #ccc;padding: 9px 25px;}
|
||||
.param-box .nav > .form-to-url{position: relative; display: block;padding: 10px 0 0 25px;}
|
||||
.param-box .nav > .form-to-url label{margin: 0;}
|
||||
.param-box .nav > .form-to-url input{margin: 0;}
|
||||
.param-box .tab-content .tab-param-pane{padding: 10px 10px 0 10px;}
|
||||
.param-box .table.param-table td, .param-box .table.param-table th{padding: 4px 5px;}
|
||||
.param-box .param-table td:first-child{width: 250px;}
|
||||
.param-box .param-table tbody td:nth-child(2){border-right: 0;}
|
||||
.param-box .param-table tbody td:nth-child(3){border-left: 0;padding: 0 10px 0 0;width: 10px;}
|
||||
.param-box .param-table tbody td:nth-child(3) i{cursor: pointer;color: #ccc;}
|
||||
.param-box .param-table tbody td:nth-child(3) i:hover{color: #888;}
|
||||
.param-box .param-table tbody tr.base td:last-child i{display: none;}
|
||||
#bulkEditHeaderCheck{margin-left: 10px;}
|
||||
#bulkEditHeader,#bulkEditForm{display: none;}
|
||||
|
||||
.response-box{margin-top: 20px;}
|
||||
.response-box .nav > li > *{padding: 8px 25px;}
|
||||
.response-box .nav > li span{position: relative; display: block;padding: 9px 25px;}
|
||||
.response-box .nav > li.info span{background-color: #ccc;}
|
||||
.response-box .nav > li.right{float: right;}
|
||||
.response-box .nav > li.right i{color: #3280fc;}
|
||||
.response-box .nav{background-color: #f1f1f1;}
|
||||
.response-box .tab-content .tab-response-pane{padding: 10px;}
|
||||
|
||||
#responseBodyJsonIframe{width: 100%;height: 300px;border: 0;}
|
||||
|
||||
/* S-模拟请求 */
|
||||
#tabSimulationResult{padding: 10px 0;}
|
||||
/* E-模拟请求 */
|
||||
|
||||
/* S-JSON展示的样式 */
|
||||
pre.json{margin-top:0px;margin-bottom:0px;}
|
||||
pre.json .canvas{font:10pt georgia;background-color:#ececec;color:#000000;border:1px solid #cecece;}
|
||||
pre.json .object-brace{color:#00aa00;font-weight:bold;}
|
||||
pre.json .array-brace{color:#0033ff;font-weight:bold;}
|
||||
pre.json .property-name{color:#cc0000;font-weight:bold;}
|
||||
pre.json .string{color:#007777;}
|
||||
pre.json .number{color:#aa00aa;}
|
||||
pre.json .boolean{color:#0000ff;}
|
||||
pre.json .function{color:#aa6633;text-decoration:italic;}
|
||||
pre.json .null{color:#0000ff;}
|
||||
pre.json .comma{color:#000000;font-weight:bold;}
|
||||
pre.json .annotation{color:#aaa;}
|
||||
pre img{cursor: pointer;}
|
||||
/* E-JSON展示的样式 */
|
||||
|
||||
body{width: 100%;height: 100%;margin: 0;padding: 0;}
|
||||
a:focus{outline:none;}
|
||||
ul{list-style: none;list-style-type: none;}
|
||||
.tree li a{white-space: nowrap;}
|
||||
.tree-menu li > ul{background-color: #f1f1f1;}
|
||||
.tree-menu li li li li a{padding-left: 68px;}
|
||||
.tree-menu li li li li li a{padding-left: 88px;}
|
||||
.tree-menu li li li li li li a{padding-left: 108px;}
|
||||
.tree-menu li li li li li li li a{padding-left: 128px;}
|
||||
.tree-menu li li li li li li li li a{padding-left: 148px;}
|
||||
.tree-menu li li li li li li li li li a{padding-left: 168px;}
|
||||
.tree-menu li li li li li li li li li li a{padding-left: 188px;}
|
||||
.table td, .table th {vertical-align: middle;}
|
||||
#tabDocInfo{position: absolute; bottom: 0;top: 60px;overflow-y: auto; right: 0; left: 10px;}
|
||||
#tabOnlineDebug .param-response-box{position: absolute; bottom: 0;top: 100px;overflow-y: auto; right: 0; left: 10px;}
|
||||
|
||||
.local-storage{display: none;}
|
||||
|
||||
/**lable的覆盖样式*/
|
||||
.label{font-size: 100%;}
|
||||
.label-warning {background-color: #f9f5ee; color: #f1a325;}
|
||||
label{font-weight: normal;}
|
||||
|
||||
.nav.gray{background-color: #f1f1f1;margin-bottom: 10px;}
|
||||
|
||||
.doc-table tr .info{text-align: right; width: 100px;}
|
||||
.setting-table tr .info{text-align: right; max-width: 150px;}
|
||||
.show-doc span{color: #aaa;}
|
||||
|
||||
.mgresizableW{z-index: 90;height: 100%; width: 10px; cursor: e-resize;}
|
||||
.ui-resizable-handle {display: block;font-size: 0.1px;position: absolute;}
|
||||
#resizableLeftRight{left: 360px;}
|
||||
.unselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
||||
|
||||
#homePageDashboard{overflow-y: auto;bottom: 0;top: 0;right: 0;left: 0;position: absolute;overflow-x: hidden;padding: 10px;}
|
||||
#homePageDashboard .panel-body{padding: 10px;}
|
||||
.content.about{line-height: 30px;}
|
||||
|
||||
#homePageLi{margin-top: 5px;}
|
||||
|
||||
.left-body{
|
||||
width: 360px; height:100%; position: fixed; top: 0; bottom: 0; left: 0;
|
||||
}
|
||||
.left-header{
|
||||
background: #3280fc;width: 100%; height:60px;line-height:60px;
|
||||
position: absolute; top: 0; bottom: 0; left: 0;text-align: center;
|
||||
}
|
||||
.left-header .logo{
|
||||
font-size: 30px;color: #fff;
|
||||
}
|
||||
.left-header .icon-bars{
|
||||
font-size: 24px;float: right;margin: 18px 18px 0 0;color: #fff;cursor: pointer;
|
||||
}
|
||||
.left-container{
|
||||
width: 100%;position: absolute;background: #f1f1f1;color: rgba(163, 175, 183, .9);
|
||||
top: 60px; bottom: 0; left: 0; overflow-y: auto; padding: 10px;
|
||||
}
|
||||
.left-container .projects{border: 0px; border-radius: 0px;}
|
||||
|
||||
.right-container{
|
||||
position: fixed;top: 0px; bottom: 0; left: 360px; right: 0;padding: 10px;
|
||||
}
|
||||
|
||||
#docResponseModel td:first-child{width: 100px;}
|
||||
#docResponseExample td:first-child{width: 100px;}
|
||||
|
||||
.modal-table-box{margin-top: 10px; max-height: 500px;overflow-y: auto;}
|
||||
.modal-table-box{list-style: none;}
|
||||
.modal-table-box ul{padding-left: 10px;}
|
||||
.modal-table-box li{padding: 10px 15px; margin: 0 10px 10px 0; background-color: #f1f1f1;cursor: pointer;}
|
||||
.modal-table-box li.checked{background-color: #8666b8;color:#fff;}
|
||||
|
||||
#exportDocumentText{height: 350px;}
|
||||
|
||||
#rightContentMask{background-color: rgba(0, 0, 0, 0);padding: 0;z-index:9999; height: 100%;display: none;position: absolute;top: 0;bottom: 0;left:0;right: 0;}
|
||||
#rightZpages{height: 100%;position: relative;top: 0;bottom: 0;left:0;right: 0;}
|
||||
|
||||
/* 在线调试框样式 */
|
||||
#tabParamBody .tab-content{padding-top: 10px;}
|
||||
|
||||
.post-url-box{padding: 10px 0;}
|
||||
.post-url-box .input-group-btn:nth-child(2) button{border-right: 0;border-radius: 0;}
|
||||
.post-url-box .send-request .hide{display: none;}
|
||||
|
||||
.param-box{}
|
||||
.param-box .panel-collapse{padding: 10px;}
|
||||
.param-box .nav{background-color: #f1f1f1;}
|
||||
/* .param-box .nav > li > *{padding: 8px 25px;} */
|
||||
.param-box .nav > li > span{position: relative; display: block;background-color: #ccc;padding: 9px 25px;}
|
||||
.param-box .nav > .form-to-url{position: relative; display: block;padding: 10px 0 0 25px;}
|
||||
.param-box .nav > .form-to-url label{margin: 0;}
|
||||
.param-box .nav > .form-to-url input{margin: 0;}
|
||||
.param-box .tab-content .tab-param-pane{padding: 10px 10px 0 10px;}
|
||||
.param-box .table.param-table td, .param-box .table.param-table th{padding: 4px 5px;}
|
||||
.param-box .param-table td:first-child{width: 250px;}
|
||||
.param-box .param-table tbody td:nth-child(2){border-right: 0;}
|
||||
.param-box .param-table tbody td:nth-child(3){border-left: 0;padding: 0 10px 0 0;width: 10px;}
|
||||
.param-box .param-table tbody td:nth-child(3) i{cursor: pointer;color: #ccc;}
|
||||
.param-box .param-table tbody td:nth-child(3) i:hover{color: #888;}
|
||||
.param-box .param-table tbody tr.base td:last-child i{display: none;}
|
||||
#bulkEditHeaderCheck{margin-left: 10px;}
|
||||
#bulkEditHeader,#bulkEditForm{display: none;}
|
||||
|
||||
.response-box{margin-top: 20px;}
|
||||
.response-box .nav > li > *{padding: 8px 25px;}
|
||||
.response-box .nav > li span{position: relative; display: block;padding: 9px 25px;}
|
||||
.response-box .nav > li.info span{background-color: #ccc;}
|
||||
.response-box .nav > li.right{float: right;}
|
||||
.response-box .nav > li.right i{color: #3280fc;}
|
||||
.response-box .nav{background-color: #f1f1f1;}
|
||||
.response-box .tab-content .tab-response-pane{padding: 10px;}
|
||||
|
||||
#responseBodyJsonIframe{width: 100%;height: 300px;border: 0;}
|
||||
|
||||
/* S-模拟请求 */
|
||||
#tabSimulationResult{padding: 10px 0;}
|
||||
/* E-模拟请求 */
|
||||
|
||||
/* S-JSON展示的样式 */
|
||||
pre.json{margin-top:0px;margin-bottom:0px;}
|
||||
pre.json .canvas{font:10pt georgia;background-color:#ececec;color:#000000;border:1px solid #cecece;}
|
||||
pre.json .object-brace{color:#00aa00;font-weight:bold;}
|
||||
pre.json .array-brace{color:#0033ff;font-weight:bold;}
|
||||
pre.json .property-name{color:#cc0000;font-weight:bold;}
|
||||
pre.json .string{color:#007777;}
|
||||
pre.json .number{color:#aa00aa;}
|
||||
pre.json .boolean{color:#0000ff;}
|
||||
pre.json .function{color:#aa6633;text-decoration:italic;}
|
||||
pre.json .null{color:#0000ff;}
|
||||
pre.json .comma{color:#000000;font-weight:bold;}
|
||||
pre.json .annotation{color:#aaa;}
|
||||
pre img{cursor: pointer;}
|
||||
/* E-JSON展示的样式 */
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ function serialize(value) {
|
||||
|
||||
function deserialize(value) {
|
||||
if (typeof value !== 'string' || isEmpty(value)) {
|
||||
return undefined;
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
return JSON.parse(value);
|
||||
@@ -266,6 +266,29 @@ String.prototype.startWith = function(str) {
|
||||
return (this.substr(0, str.length) == str);
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取数据,异步的操作
|
||||
*/
|
||||
function getStorageLike(key, success, fail) {
|
||||
var start = (typeof urlBase === 'string') ? urlBase : '';
|
||||
ajaxTemp(start + "swagger-mg-ui/storage/like", "post", "json", {key: key}, function(json){
|
||||
if(json.errCode == 200) {
|
||||
if(typeof success == "function") {
|
||||
var result = deserialize(json.data);
|
||||
success(result);
|
||||
}
|
||||
} else {
|
||||
if(typeof fail == "function") {
|
||||
fail();
|
||||
}
|
||||
}
|
||||
}, function(msg){
|
||||
if(typeof fail == "function") {
|
||||
fail();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据,异步的操作
|
||||
*/
|
||||
@@ -313,6 +336,29 @@ function setStorage(key, value, success, fail) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*/
|
||||
function deleteStorage(key, success, fail) {
|
||||
var start = (typeof urlBase === 'string') ? urlBase : '';
|
||||
ajaxTemp(start + "swagger-mg-ui/storage/delete", "post", "json", {key: key}, function(json){
|
||||
if(json.errCode == 200) {
|
||||
if(typeof success == "function") {
|
||||
success();
|
||||
}
|
||||
} else {
|
||||
if(typeof fail == "function") {
|
||||
fail(getNotEmptyStr(json.errMsg));
|
||||
}
|
||||
}
|
||||
}, function(msg){
|
||||
if(typeof fail == "function") {
|
||||
fail("");
|
||||
}
|
||||
console.log("存储数据到服务器失败,请检查");
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取父窗口的exports
|
||||
* @returns
|
||||
|
||||
@@ -2,4 +2,5 @@ var cacheKeys = {
|
||||
userSettings: 'userSettings',
|
||||
swaggerResourcesList: 'swagger-resources-list',
|
||||
globalParamList: 'zyplayer-doc-global-param-list',
|
||||
pRequestObjStart: 'p-request-obj-',
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,106 +1,106 @@
|
||||
|
||||
/**
|
||||
* 两个元素上下、左右拖动动态改变大小
|
||||
* @author 暮光:城中城
|
||||
* @since 2017年5月7日
|
||||
*/
|
||||
(function($){
|
||||
$.fn.mgResizebleHeight = function(options) {
|
||||
var defaults = {prev:this,next:this, prevHtMin:0, prevHtMax:999, nextHtMin:0, nextHtMax:999};
|
||||
var opts = $.extend(defaults, options);
|
||||
var disY = 0, prevH = 0, nextH = 0, isStart = false;
|
||||
var prev, next, thisObj = this;
|
||||
$(document).mousemove(function(ev){
|
||||
if(!isStart){return;}
|
||||
var ev = ev || window.event;
|
||||
var H = ev.clientY - disY;
|
||||
var prevHNow = prevH+H, nextHNow = nextH-H;
|
||||
if(opts.prevHtMin >= prevHNow) {
|
||||
prevHNow = opts.prevHtMin;
|
||||
nextHNow = next.outerHeight();
|
||||
}
|
||||
if(opts.nextHtMin >= nextHNow) {
|
||||
nextHNow = opts.nextHtMin;
|
||||
prevHNow = prev.outerHeight();
|
||||
}
|
||||
if(opts.prevHtMax <= prevHNow) {
|
||||
prevHNow = opts.prevHtMax;
|
||||
nextHNow = next.outerHeight();
|
||||
}
|
||||
if(opts.nextHtMax <= nextHNow) {
|
||||
nextHNow = opts.nextHtMax;
|
||||
prevHNow = prev.outerHeight();
|
||||
}
|
||||
//prev.css("height", prevHNow + 'px');
|
||||
//next.css("height", nextHNow + 'px');
|
||||
if(typeof opts.onresize == 'function') {
|
||||
opts.onresize(prevHNow, nextHNow);
|
||||
}
|
||||
}).mouseup(function(ev){
|
||||
isStart = false;
|
||||
});
|
||||
$(this).mousedown(function(ev){
|
||||
var ev = ev || window.event;
|
||||
disY = ev.clientY;
|
||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||
prevH = prev.outerHeight();
|
||||
nextH = next.outerHeight();
|
||||
isStart = true;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 改变宽度的功能,只是实现各种消息的通知,实际改变大小需要在回调里面自己操作
|
||||
*/
|
||||
$.fn.mgResizebleWidth = function(options) {
|
||||
var defaults = {prev:this,next:this, prevWtMin:0, prevWtMax:999, nextWtMin:0, nextWtMax:999};
|
||||
var opts = $.extend(defaults, options);
|
||||
var disX = 0, prevW = 0, nextW = 0, isStart = false;
|
||||
var prev, next, thisObj = this;
|
||||
$(document).mousemove(function(ev){
|
||||
if(!isStart){return;}
|
||||
var ev = ev || window.event;
|
||||
var W = ev.clientX - disX;
|
||||
var prevWNow = prevW+W, nextWNow = nextW-W;
|
||||
if(opts.prevWtMin >= prevWNow) {
|
||||
prevWNow = opts.prevWtMin;
|
||||
nextWNow = next.outerWidth();
|
||||
}
|
||||
if(opts.nextWtMin >= nextWNow) {
|
||||
nextWNow = opts.nextWtMin;
|
||||
prevWNow = prev.outerWidth();
|
||||
}
|
||||
if(opts.prevWtMax <= prevWNow) {
|
||||
prevWNow = opts.prevWtMax;
|
||||
nextWNow = next.outerWidth();
|
||||
}
|
||||
if(opts.nextWtMax <= nextWNow) {
|
||||
nextWNow = opts.nextWtMax;
|
||||
prevWNow = prev.outerWidth();
|
||||
}
|
||||
//prev.css("width", prevWNow + 'px');
|
||||
//next.css("width", nextWNow + 'px');
|
||||
if(typeof opts.onresize == 'function') {
|
||||
opts.onresize(prevWNow, nextWNow);
|
||||
}
|
||||
}).mouseup(function(ev){
|
||||
if(!isStart){return;}
|
||||
isStart = false;
|
||||
if(typeof opts.onfinish == 'function') {
|
||||
opts.onfinish();
|
||||
}
|
||||
});
|
||||
$(this).mousedown(function(ev){
|
||||
var ev = ev || window.event;
|
||||
disX = ev.clientX;
|
||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||
prevW = prev.outerWidth();
|
||||
nextW = next.outerWidth();
|
||||
isStart = true;
|
||||
if(typeof opts.onstart == 'function') {
|
||||
opts.onstart();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 两个元素上下、左右拖动动态改变大小
|
||||
* @author 暮光:城中城
|
||||
* @since 2017年5月7日
|
||||
*/
|
||||
(function($){
|
||||
$.fn.mgResizableHeight = function(options) {
|
||||
var defaults = {prev:this,next:this, prevHtMin:0, prevHtMax:999, nextHtMin:0, nextHtMax:999};
|
||||
var opts = $.extend(defaults, options);
|
||||
var disY = 0, prevH = 0, nextH = 0, isStart = false;
|
||||
var prev, next, thisObj = this;
|
||||
$(document).mousemove(function(ev){
|
||||
if(!isStart){return;}
|
||||
var ev = ev || window.event;
|
||||
var H = ev.clientY - disY;
|
||||
var prevHNow = prevH+H, nextHNow = nextH-H;
|
||||
if(opts.prevHtMin >= prevHNow) {
|
||||
prevHNow = opts.prevHtMin;
|
||||
nextHNow = next.outerHeight();
|
||||
}
|
||||
if(opts.nextHtMin >= nextHNow) {
|
||||
nextHNow = opts.nextHtMin;
|
||||
prevHNow = prev.outerHeight();
|
||||
}
|
||||
if(opts.prevHtMax <= prevHNow) {
|
||||
prevHNow = opts.prevHtMax;
|
||||
nextHNow = next.outerHeight();
|
||||
}
|
||||
if(opts.nextHtMax <= nextHNow) {
|
||||
nextHNow = opts.nextHtMax;
|
||||
prevHNow = prev.outerHeight();
|
||||
}
|
||||
//prev.css("height", prevHNow + 'px');
|
||||
//next.css("height", nextHNow + 'px');
|
||||
if(typeof opts.onresize == 'function') {
|
||||
opts.onresize(prevHNow, nextHNow);
|
||||
}
|
||||
}).mouseup(function(ev){
|
||||
isStart = false;
|
||||
});
|
||||
$(this).mousedown(function(ev){
|
||||
var ev = ev || window.event;
|
||||
disY = ev.clientY;
|
||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||
prevH = prev.outerHeight();
|
||||
nextH = next.outerHeight();
|
||||
isStart = true;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 改变宽度的功能,只是实现各种消息的通知,实际改变大小需要在回调里面自己操作
|
||||
*/
|
||||
$.fn.mgResizableWidth = function(options) {
|
||||
var defaults = {prev:this,next:this, prevWtMin:0, prevWtMax:999, nextWtMin:0, nextWtMax:999};
|
||||
var opts = $.extend(defaults, options);
|
||||
var disX = 0, prevW = 0, nextW = 0, isStart = false;
|
||||
var prev, next, thisObj = this;
|
||||
$(document).mousemove(function(ev){
|
||||
if(!isStart){return;}
|
||||
var ev = ev || window.event;
|
||||
var W = ev.clientX - disX;
|
||||
var prevWNow = prevW+W, nextWNow = nextW-W;
|
||||
if(opts.prevWtMin >= prevWNow) {
|
||||
prevWNow = opts.prevWtMin;
|
||||
nextWNow = next.outerWidth();
|
||||
}
|
||||
if(opts.nextWtMin >= nextWNow) {
|
||||
nextWNow = opts.nextWtMin;
|
||||
prevWNow = prev.outerWidth();
|
||||
}
|
||||
if(opts.prevWtMax <= prevWNow) {
|
||||
prevWNow = opts.prevWtMax;
|
||||
nextWNow = next.outerWidth();
|
||||
}
|
||||
if(opts.nextWtMax <= nextWNow) {
|
||||
nextWNow = opts.nextWtMax;
|
||||
prevWNow = prev.outerWidth();
|
||||
}
|
||||
//prev.css("width", prevWNow + 'px');
|
||||
//next.css("width", nextWNow + 'px');
|
||||
if(typeof opts.onresize == 'function') {
|
||||
opts.onresize(prevWNow, nextWNow);
|
||||
}
|
||||
}).mouseup(function(ev){
|
||||
if(!isStart){return;}
|
||||
isStart = false;
|
||||
if(typeof opts.onfinish == 'function') {
|
||||
opts.onfinish();
|
||||
}
|
||||
});
|
||||
$(this).mousedown(function(ev){
|
||||
var ev = ev || window.event;
|
||||
disX = ev.clientX;
|
||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||
prevW = prev.outerWidth();
|
||||
nextW = next.outerWidth();
|
||||
isStart = true;
|
||||
if(typeof opts.onstart == 'function') {
|
||||
opts.onstart();
|
||||
}
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
||||
@@ -1,37 +1,94 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>调试数据管理</title>
|
||||
<link rel="stylesheet" type="text/css" href="../zui/css/zui.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
调试数据管理
|
||||
</div>
|
||||
</body>
|
||||
<script src="../zui/js/zui.min.js"></script>
|
||||
<script src="../mg-ui/js/jquery-3.1.0.min.js"></script>
|
||||
<script src="../vue/vue.js"></script>
|
||||
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
userId: "",
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
<!doctype html>
|
||||
<html xmlns:v-on="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>调试数据管理</title>
|
||||
<link rel="stylesheet" type="text/css" href="../zui/css/zui.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<div class="title-info">
|
||||
<div class="alert alert-primary">
|
||||
<div class="content">Tips:每次点击在线调试的发送请求后,都会默认保存一次请求的form、header、body数据,以备下次使用,在此页面可以管理这些数据</div>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-bordered" id="onlineDebugParamTable">
|
||||
<thead>
|
||||
<tr><th>接口地址</th><th>参数配置</th><th>操作</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item,index) in debugDataList" :key="item.id" :data-id="item.id" :data-index="index" >
|
||||
<td>{{item.key}}</td>
|
||||
<td>{{item.value}}</td>
|
||||
<td>
|
||||
<button class="btn btn-danger" type="button" v-on:click="deleteDebugData($event)">删除</button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="center">
|
||||
<button class="btn" type="button" v-on:click="btnRefreshList"> 刷新 </button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../mg-ui/js/jquery-3.1.0.min.js"></script>
|
||||
<script src="../zui/js/zui.min.js"></script>
|
||||
<script src="../mg-ui/js/common.js"></script>
|
||||
<script src="../mg-ui/js/mg-ui-cache-keys.js"></script>
|
||||
<script src="../vue/vue.js"></script>
|
||||
<script src="../mg-ui/js/toast.js"></script>
|
||||
|
||||
<script>
|
||||
var urlBase = "../../";
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
debugDataList: [],
|
||||
},
|
||||
mounted: function(){
|
||||
this.refreshList();
|
||||
},
|
||||
methods: {
|
||||
btnRefreshList: function(){
|
||||
this.refreshList();
|
||||
Toast.success("刷新成功!");
|
||||
},
|
||||
deleteDebugData: function(event){
|
||||
if(!confirm("确定要删除吗?")) {
|
||||
return;
|
||||
}
|
||||
var tr = $(event.currentTarget).parents("tr");
|
||||
var index = tr.data("index");
|
||||
var delKey = app.debugDataList[index].key;
|
||||
var newDebugList = [];
|
||||
for(var i=0;i<app.debugDataList.length;i++){
|
||||
if(i != index) {
|
||||
newDebugList.push(app.debugDataList[i]);
|
||||
}
|
||||
}
|
||||
deleteStorage(delKey, function(data){
|
||||
app.debugDataList = newDebugList;
|
||||
Toast.success("删除成功!");
|
||||
});
|
||||
},
|
||||
refreshList: function () {
|
||||
getStorageLike(cacheKeys.pRequestObjStart, function(data){
|
||||
// console.log(data);
|
||||
app.debugDataList = data;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#app{padding-top: 10px;}
|
||||
</style>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user