diff --git a/zyplayer-doc-manage/pom.xml b/zyplayer-doc-manage/pom.xml
index af5c9096..d5244ef7 100644
--- a/zyplayer-doc-manage/pom.xml
+++ b/zyplayer-doc-manage/pom.xml
@@ -27,7 +27,7 @@
2.0
6.1.0
1.1.9
- 1.8.7
+ 1.8.9
2.9.2
2.9.2
1.0.1
@@ -138,4 +138,4 @@
-
\ No newline at end of file
+
diff --git a/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/framework/config/security/WebSecurityConfig.java b/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/framework/config/security/WebSecurityConfig.java
index 9f43a8ba..cdea7fac 100644
--- a/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/framework/config/security/WebSecurityConfig.java
+++ b/zyplayer-doc-manage/src/main/java/com/zyplayer/doc/manage/framework/config/security/WebSecurityConfig.java
@@ -22,6 +22,8 @@ import org.springframework.security.web.authentication.rememberme.RememberMeAuth
import org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices;
import org.springframework.util.DigestUtils;
+import java.util.Objects;
+
@Order(1)
@Configuration
@EnableWebSecurity
@@ -98,7 +100,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
public boolean matches(CharSequence charSequence, String s) {
String digestAsHex = DigestUtils.md5DigestAsHex(charSequence.toString().getBytes());
- return s.equals(digestAsHex);
+ return Objects.equals(s, digestAsHex);
}
}).and().authenticationProvider(rememberMeAuthenticationProvider());
}
diff --git a/zyplayer-doc-manage/src/main/webapp/static/manage/login.html b/zyplayer-doc-manage/src/main/webapp/static/manage/login.html
index 610f1c92..334f9f94 100644
--- a/zyplayer-doc-manage/src/main/webapp/static/manage/login.html
+++ b/zyplayer-doc-manage/src/main/webapp/static/manage/login.html
@@ -16,23 +16,22 @@
-
-
-
-
{{errorInfo}}
+
+
+
{{userNameError}}
-
+
-
+
+
{{passwordError}}
-
@@ -42,6 +41,7 @@
+
-
diff --git a/zyplayer-doc-swagger/src/main/resources/webjars/mg-ui/css/mg-ui.css b/zyplayer-doc-swagger/src/main/resources/webjars/mg-ui/css/mg-ui.css
index 67516ef2..0c168cf9 100644
--- a/zyplayer-doc-swagger/src/main/resources/webjars/mg-ui/css/mg-ui.css
+++ b/zyplayer-doc-swagger/src/main/resources/webjars/mg-ui/css/mg-ui.css
@@ -11,6 +11,7 @@ ul{list-style: none;list-style-type: none;}
.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;}
+.dropdown-menu>li>a{max-width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
#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;padding-right: 10px;}
#tabOnlineDebug .panel{margin-bottom: 10px;}
@@ -21,6 +22,7 @@ ul{list-style: none;list-style-type: none;}
.choice-location-list{margin-bottom: 10px; width: 100%;}
.choice-location-list .btn.dropdown-toggle{width: 100%; text-align: left;}
.choice-location-list .dropdown-menu{width: 100%;}
+.choice-location-list .choice-text{max-width: calc(100% - 15px);overflow: hidden;float: left;white-space: nowrap;text-overflow: ellipsis;}
.choice-location-list .caret{float: right;margin-top: 8px;}
/**lable的覆盖样式*/
diff --git a/zyplayer-doc-swagger/src/main/resources/webjars/mg-ui/js/mg-ui.js b/zyplayer-doc-swagger/src/main/resources/webjars/mg-ui/js/mg-ui.js
index 3dbd98e0..1f07556c 100644
--- a/zyplayer-doc-swagger/src/main/resources/webjars/mg-ui/js/mg-ui.js
+++ b/zyplayer-doc-swagger/src/main/resources/webjars/mg-ui/js/mg-ui.js
@@ -96,6 +96,7 @@ function getDocumentListByService() {
var item = json.data[i];
$("#choiceLocationList .dropdown-menu").append('' + item.name + '');
}
+ $("#choiceLocationList .dropdown-menu").append('全部文档');
$("#choiceLocationList .choice-text").text(json.data[0].name);
addDocumentByLocationService(json.data[0].location);
} else {
@@ -412,7 +413,7 @@ $("#apiPathTree").on("click", ".show-doc", function(){
$("#simulationResultUrlTest").text(data.domain + docUrl + "?zyplayerApiTest=1");
$("#simulationResultUrlTest").attr("href", data.domain + docUrl + "?zyplayerApiTest=1");
$("#simulationResultText").val("");
- getStorage('p-simulation-response-' + docUrl, function(data){
+ getStorage(cacheKeys.pSimulationResponse + docUrl, function(data){
var resultText = getNotEmptyStr(data);
resultText = (typeof resultText == 'string') ? resultText : JSON.stringify(resultText, null, 4);
$("#simulationResultText").val(resultText);
diff --git a/zyplayer-doc-swagger/src/main/resources/webjars/open-doc/js/mg-ui-cache-keys.js b/zyplayer-doc-swagger/src/main/resources/webjars/open-doc/js/mg-ui-cache-keys.js
index fa666b89..037d8f4b 100644
--- a/zyplayer-doc-swagger/src/main/resources/webjars/open-doc/js/mg-ui-cache-keys.js
+++ b/zyplayer-doc-swagger/src/main/resources/webjars/open-doc/js/mg-ui-cache-keys.js
@@ -7,5 +7,5 @@ var cacheKeys = {
swaggerLocationList: 'swagger-location-list',
globalParamList: 'zyplayer-doc-global-param-list',
pRequestObjStart: 'p-request-obj-',
- pSimulationResponse: 'p-simulation-response',
-}
\ No newline at end of file
+ pSimulationResponse: 'p-simulation-response-',
+}
diff --git a/zyplayer-doc-swagger/src/main/resources/webjars/zpages/docUrlDetailConfig.html b/zyplayer-doc-swagger/src/main/resources/webjars/zpages/docUrlDetailConfig.html
index b9a66dc3..c7db9cd0 100644
--- a/zyplayer-doc-swagger/src/main/resources/webjars/zpages/docUrlDetailConfig.html
+++ b/zyplayer-doc-swagger/src/main/resources/webjars/zpages/docUrlDetailConfig.html
@@ -10,7 +10,7 @@
-
Tips:开放文档地址 可以不需要登录即可访问
+
Tips:开放文档地址 可以不需要登录即可访问,重写域名地址 填写后需开启:文档展示配置->强制重写域名 后才生效
@@ -26,10 +26,14 @@
| {{index+1}} |
{{item.location}} |
- {{item.uuid}} |
+
+
+ {{item.uuid}}
+ 暂未开放
+ |
{{item.rewriteDomainUrl}} |
-
+
|
@@ -146,20 +150,14 @@
}
});
},
- deleteDocUrl: function (event) {
+ deleteDocUrl: function (location) {
if (!confirm("确定要删除吗?")) {
return;
}
- var tr = $(event.currentTarget).parents("tr");
- var index = tr.data("index");
- var newDocList = [];
- for (var i = 0; i < app.swaggerLocationList.length; i++) {
- if (i !== index) {
- newDocList.push(app.swaggerLocationList[i]);
+ ajaxTemp(urlBase + "swagger-mg-ui/document/deleteSwaggerDoc", "post", "json", {location: location}, function (json) {
+ if (validateResult(json)) {
+ app.refreshList();
}
- }
- setStorage(cacheKeys.swaggerLocationList, newDocList, function () {
- app.swaggerLocationList = newDocList;
});
},
syncDocData: function (event) {