开放文档逻辑修改
This commit is contained in:
@@ -46,7 +46,12 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
String loginPage = "/static/manage/login.html";
|
||||
|
||||
http.authorizeRequests().antMatchers("/login/**").permitAll()//为了测试其他功能,设置“ /** ”允许所有请求
|
||||
http.authorizeRequests()
|
||||
.antMatchers(
|
||||
"/login/**", "/open-doc.html",
|
||||
"/webjars/open-doc/**", "/swagger-mg-ui/open-doc/**",
|
||||
"/webjars/zui/**", "/webjars/vue/**"
|
||||
).permitAll()//为了测试其他功能,设置“ /** ”允许所有请求
|
||||
.antMatchers("/document.html", "/doc.html").hasAuthority("DOC_ALL")
|
||||
// 其他地址的访问均需登录
|
||||
.anyRequest().authenticated().and()
|
||||
|
||||
@@ -34,6 +34,11 @@ public class MgOpenDocController {
|
||||
@Resource
|
||||
private MgStorageService storageService;
|
||||
|
||||
@PostMapping(value = "/checkConfig")
|
||||
public DocResponseJson<Object> checkConfig() {
|
||||
return DocResponseJson.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* @author 暮光:城中城
|
||||
* @since 2019年1月27日
|
||||
|
||||
@@ -26,7 +26,7 @@ var Formatjson = {
|
||||
if (obj.length == 0) {
|
||||
html += this.getRow(indent, "<span class='array-brace'>[ ]</span>" + comma, isPropertyContent);
|
||||
} else {
|
||||
var clpsHtml = '<span><img class="option-img" src="webjars/mg-ui/img/expanded.png" onClick="Formatjson.expImgClicked(this);" /></span><span class="collapsible">';
|
||||
var clpsHtml = '<span><img class="option-img" src="webjars/open-doc/img/expanded.png" onClick="Formatjson.expImgClicked(this);" /></span><span class="collapsible">';
|
||||
var annotation = '';
|
||||
if(showAnnotation && isNotEmpty(keyName) && isNotEmpty(this.annotationObject[keyName])) {
|
||||
annotation = '<span class="annotation">// '+this.annotationObject[keyName]+'</span>';
|
||||
@@ -48,7 +48,7 @@ var Formatjson = {
|
||||
if (numProps == 0) {
|
||||
html += this.getRow(indent, "<span class='object-brace'>{ }</span>" + comma, isPropertyContent);
|
||||
} else {
|
||||
var clpsHtml = '<span><img class="option-img" src="webjars/mg-ui/img/expanded.png" onClick="Formatjson.expImgClicked(this);" /></span><span class="collapsible">';
|
||||
var clpsHtml = '<span><img class="option-img" src="webjars/open-doc/img/expanded.png" onClick="Formatjson.expImgClicked(this);" /></span><span class="collapsible">';
|
||||
var annotation = '';
|
||||
if(showAnnotation && isNotEmpty(keyName) && isNotEmpty(this.annotationObject[keyName])) {
|
||||
annotation = '<span class="annotation">// '+this.annotationObject[keyName]+'</span>';
|
||||
@@ -80,10 +80,10 @@ var Formatjson = {
|
||||
var container = img.parentNode.nextSibling;
|
||||
if(!container) return;
|
||||
var disp = "none";
|
||||
var src = "webjars/mg-ui/img/collapsed.png";
|
||||
var src = "webjars/open-doc/img/collapsed.png";
|
||||
if(container.style.display == "none"){
|
||||
disp = "inline";
|
||||
src = "webjars/mg-ui/img/expanded.png";
|
||||
src = "webjars/open-doc/img/expanded.png";
|
||||
}
|
||||
container.style.display = disp;
|
||||
img.src = src;
|
||||
|
||||
@@ -46,7 +46,8 @@ var rightContentTabs;
|
||||
$(document).ready(function(){
|
||||
globalLoadingMessager = new $.zui.Messager({type: 'primary', close: false, time: 0}).show();
|
||||
showGlobalLoadingMessage('检查服务中,请稍候...', true);
|
||||
ajaxTemp("swagger-mg-ui/storage/checkConfig", "post", "json", {
|
||||
// open-doc:请求地址不同
|
||||
ajaxTemp("swagger-mg-ui/open-doc/checkConfig", "post", "json", {
|
||||
}, function(json){
|
||||
}, function(msg){
|
||||
}, function (xhr) {
|
||||
|
||||
Reference in New Issue
Block a user