代码整理
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||
<title>swagger-mg-ui</title>
|
||||
<title>接口文档管理系统 - zyplayer</title>
|
||||
<link rel="shortcut icon" href="webjars/mg-ui/img/api.ico"/>
|
||||
<link rel="stylesheet" href="webjars/zui/css/zui.min.css" />
|
||||
<link rel="stylesheet" href="webjars/zui/lib/dashboard/zui.dashboard.min.css" />
|
||||
@@ -12,12 +12,12 @@
|
||||
<body>
|
||||
<div class="left-body" id="leftContent">
|
||||
<div class="left-header">
|
||||
<span class="logo" id="logoText">swagger-mg-ui</span>
|
||||
<span class="logo" id="logoText">zyplayer-doc-swagger</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">
|
||||
<ul class="tree tree-lines tree-menu projects" data-ride="tree">
|
||||
<li>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="searchDocInput">
|
||||
@@ -27,7 +27,16 @@
|
||||
</div>
|
||||
</li>
|
||||
<li id="homePageLi"><a href="javascript:void(0)" path=""><i class="icon-home"></i> 控制台</a></li>
|
||||
<li id="onlineDebugLi" class="local-storage"><a href="javascript:void(0)" path=""><i class="icon-bug"></i> 在线调试管理</a></li>
|
||||
<li>
|
||||
<a href="#"><i class="icon icon-cogs"></i> 文档管理</a>
|
||||
<ul>
|
||||
<li id="onlineDebugLi" class="local-storage"><a href="javascript:void(0)" path=""><i class="icon-bug"></i> 在线调试管理</a></li>
|
||||
<li><a href="#" path=""><i class="icon-cog"></i> 文档展示配置</a></li>
|
||||
<li><a href="#" path=""><i class="icon-globe"></i> 全局参数管理</a></li>
|
||||
<li><a href="#" path=""><i class="icon-bug"></i> 调试数据管理</a></li>
|
||||
<li><a href="#" path=""><i class="icon-list-ul"></i> 文档地址管理</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div id="apiPathTree">
|
||||
<ul class="tree tree-lines projects"></ul>
|
||||
@@ -104,11 +113,11 @@
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div align="center">简介</div>
|
||||
swagger-mg-ui是swagger-ui的一个前端实现,使用简单、解析速度快、走心的设计,
|
||||
zyplayer-doc-swagger是swagger-ui的一个前端实现,使用简单、解析速度快、走心的设计,
|
||||
支持多项目同时展示,多种文档目录的展示方案,多种自定义配置,满足各种使用习惯。
|
||||
本项目是完全从头写的,所以有任何属性未解析到、UI上有何建议都能及时处理得到。
|
||||
使用中您有任何的意见和建议都可到源码地址处反馈哦!<br/>
|
||||
源码地址:<a target="_blank" href="https://gitee.com/zyplayer/swagger-mg-ui">swagger-mg-ui</a>,
|
||||
源码地址:<a target="_blank" href="https://gitee.com/zyplayer/zyplayer-doc">zyplayer-doc-swagger</a>,
|
||||
前端框架:<a target="_blank" href="http://zui.sexy">zui</a>,
|
||||
我的网站:<a target="_blank" href="http://kongjianzhou.com">空间轴</a>
|
||||
</td>
|
||||
@@ -369,7 +378,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">测试地址</td>
|
||||
<td><a id="simulationResultUrlTest" href="" target="_blank"></a> <i class="icon icon-info-sign" title='需要被访问项目导入swagger-mg-ui包才能使用'></i></td>
|
||||
<td><a id="simulationResultUrlTest" href="" target="_blank"></a> <i class="icon icon-info-sign" title='需要被访问项目导入zyplayer-doc包才能使用'></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info">返回内容</td>
|
||||
@@ -417,7 +426,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-danger hidden">
|
||||
1、请到 <a target="_blank" href="https://gitee.com/zyplayer/swagger-mg-ui">源码处下载</a>《对外文档模板.zip》解压<br/>
|
||||
1、请到 <a target="_blank" href="https://gitee.com/zyplayer/zyplayer-doc">源码处下载</a>《对外文档模板.zip》解压<br/>
|
||||
2、复制以下文本内容覆盖至 /js/mg-ui-data.js 文件内<br/>
|
||||
3、然后双击打开目录下的:document.html 即可看到导出的文档
|
||||
</div>
|
||||
|
||||
@@ -97,7 +97,7 @@ label{font-weight: normal;}
|
||||
.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;}
|
||||
.param-box .param-table tbody tr.base td:last-child i{display: none;}
|
||||
#bulkEditHeaderCheck{margin-left: 10px;}
|
||||
#bulkEditHeader,#bulkEditForm{display: none;}
|
||||
|
||||
|
||||
@@ -100,22 +100,23 @@ $(document).ready(function(){
|
||||
paramSendToServer.method = options;
|
||||
ajaxTemp("swagger-mg-ui/http/request", "post", "json", paramSendToServer, function(result){
|
||||
//console.log(result);
|
||||
var requestObj = result.data;
|
||||
setStorage('p-request-obj-' + docUrl, storeRequestParam);
|
||||
var afterSendTime = new Date().getTime();
|
||||
$("#httpRequestStatus").text(result.status);
|
||||
$("#httpRequestStatus").text(requestObj.status);
|
||||
$("#httpRequestTime").text((afterSendTime - beforSendTime) + "ms");
|
||||
try {
|
||||
var htmlStr = Formatjson.processObjectToHtmlPre(JSON.parse(result.data), 0, false, false, false, false);
|
||||
var htmlStr = Formatjson.processObjectToHtmlPre(JSON.parse(requestObj.data), 0, false, false, false, false);
|
||||
$("#responseBodyJsonDiv").html(htmlStr);
|
||||
} catch (e) {
|
||||
$("#responseBodyJsonDiv").html("<iframe id='responseBodyJsonIframe'></iframe>");
|
||||
setTimeout(function(){
|
||||
$("#responseBodyJsonIframe").contents().find("body").html(result.data);
|
||||
$("#responseBodyJsonIframe").contents().find("body").html(requestObj.data);
|
||||
}, 300);
|
||||
}
|
||||
$("#tabResponseHeader table tbody").empty();
|
||||
$("#tabResponseCookie table tbody").empty();
|
||||
var headers = result.header||[];
|
||||
var headers = requestObj.header||[];
|
||||
for (var i = 0; i < headers.length; i++) {
|
||||
var name = getNotEmptyStr(headers[i].name);
|
||||
var value = getNotEmptyStr(headers[i].value);
|
||||
@@ -123,7 +124,7 @@ $(document).ready(function(){
|
||||
'<tr>'+'<td>'+name+'</td>' + '<td>'+value+'</td>'+'</tr>'
|
||||
);
|
||||
}
|
||||
var cookies = result.cookie||[];
|
||||
var cookies = requestObj.cookie||[];
|
||||
for (var i = 0; i < cookies.length; i++) {
|
||||
var name = getNotEmptyStr(cookies[i].name);
|
||||
var value = getNotEmptyStr(cookies[i].value);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* swagger-mg-ui是swagger-ui的一个前端实现,使用简单、解析速度快、走心的设计
|
||||
* zyplayer-doc-swagger是swagger-ui的一个前端实现,使用简单、解析速度快、走心的设计
|
||||
* 支持多项目同时展示,多种文档目录的展示方案,多种自定义配置,满足各种使用习惯。
|
||||
* 使用中您有任何的意见和建议都可到源码地址处反馈哦!
|
||||
* git地址:https://gitee.com/zyplayer/swagger-mg-ui
|
||||
* git地址:https://gitee.com/zyplayer/zyplayer-doc-swagger
|
||||
* @author 暮光:城中城
|
||||
* @since 2018年5月20日
|
||||
*/
|
||||
@@ -873,11 +873,11 @@ function changeContentWidth(width) {
|
||||
$("#leftContent").css("width", width + 'px');
|
||||
$("#resizebleLeftRight").css("left", width + 'px');
|
||||
$("#rightContent").css("left", width + 'px');
|
||||
var logoText = "swagger-mg-ui";
|
||||
if(width < 270 && width > 140){
|
||||
logoText = "mg-ui";
|
||||
} else if(width < 140){
|
||||
logoText = "mui";
|
||||
var logoText = "zyplayer-doc-swagger";
|
||||
if(width < 370 && width > 290){
|
||||
logoText = "zyplayer-doc";
|
||||
} else if(width < 290){
|
||||
logoText = "doc";
|
||||
}
|
||||
$("#logoText").text(logoText);
|
||||
userSettings.prevWNow = width;
|
||||
|
||||
Reference in New Issue
Block a user