增加debug参数管理,代码优化
This commit is contained in:
@@ -1,106 +1,106 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 两个元素上下、左右拖动动态改变大小
|
* 两个元素上下、左右拖动动态改变大小
|
||||||
* @author 暮光:城中城
|
* @author 暮光:城中城
|
||||||
* @since 2017年5月7日
|
* @since 2017年5月7日
|
||||||
*/
|
*/
|
||||||
(function($){
|
(function($){
|
||||||
$.fn.mgResizebleHeight = function(options) {
|
$.fn.mgResizableHeight = function(options) {
|
||||||
var defaults = {prev:this,next:this, prevHtMin:0, prevHtMax:999, nextHtMin:0, nextHtMax:999};
|
var defaults = {prev:this,next:this, prevHtMin:0, prevHtMax:999, nextHtMin:0, nextHtMax:999};
|
||||||
var opts = $.extend(defaults, options);
|
var opts = $.extend(defaults, options);
|
||||||
var disY = 0, prevH = 0, nextH = 0, isStart = false;
|
var disY = 0, prevH = 0, nextH = 0, isStart = false;
|
||||||
var prev, next, thisObj = this;
|
var prev, next, thisObj = this;
|
||||||
$(document).mousemove(function(ev){
|
$(document).mousemove(function(ev){
|
||||||
if(!isStart){return;}
|
if(!isStart){return;}
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
var H = ev.clientY - disY;
|
var H = ev.clientY - disY;
|
||||||
var prevHNow = prevH+H, nextHNow = nextH-H;
|
var prevHNow = prevH+H, nextHNow = nextH-H;
|
||||||
if(opts.prevHtMin >= prevHNow) {
|
if(opts.prevHtMin >= prevHNow) {
|
||||||
prevHNow = opts.prevHtMin;
|
prevHNow = opts.prevHtMin;
|
||||||
nextHNow = next.outerHeight();
|
nextHNow = next.outerHeight();
|
||||||
}
|
}
|
||||||
if(opts.nextHtMin >= nextHNow) {
|
if(opts.nextHtMin >= nextHNow) {
|
||||||
nextHNow = opts.nextHtMin;
|
nextHNow = opts.nextHtMin;
|
||||||
prevHNow = prev.outerHeight();
|
prevHNow = prev.outerHeight();
|
||||||
}
|
}
|
||||||
if(opts.prevHtMax <= prevHNow) {
|
if(opts.prevHtMax <= prevHNow) {
|
||||||
prevHNow = opts.prevHtMax;
|
prevHNow = opts.prevHtMax;
|
||||||
nextHNow = next.outerHeight();
|
nextHNow = next.outerHeight();
|
||||||
}
|
}
|
||||||
if(opts.nextHtMax <= nextHNow) {
|
if(opts.nextHtMax <= nextHNow) {
|
||||||
nextHNow = opts.nextHtMax;
|
nextHNow = opts.nextHtMax;
|
||||||
prevHNow = prev.outerHeight();
|
prevHNow = prev.outerHeight();
|
||||||
}
|
}
|
||||||
//prev.css("height", prevHNow + 'px');
|
//prev.css("height", prevHNow + 'px');
|
||||||
//next.css("height", nextHNow + 'px');
|
//next.css("height", nextHNow + 'px');
|
||||||
if(typeof opts.onresize == 'function') {
|
if(typeof opts.onresize == 'function') {
|
||||||
opts.onresize(prevHNow, nextHNow);
|
opts.onresize(prevHNow, nextHNow);
|
||||||
}
|
}
|
||||||
}).mouseup(function(ev){
|
}).mouseup(function(ev){
|
||||||
isStart = false;
|
isStart = false;
|
||||||
});
|
});
|
||||||
$(this).mousedown(function(ev){
|
$(this).mousedown(function(ev){
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
disY = ev.clientY;
|
disY = ev.clientY;
|
||||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||||
prevH = prev.outerHeight();
|
prevH = prev.outerHeight();
|
||||||
nextH = next.outerHeight();
|
nextH = next.outerHeight();
|
||||||
isStart = true;
|
isStart = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 改变宽度的功能,只是实现各种消息的通知,实际改变大小需要在回调里面自己操作
|
* 改变宽度的功能,只是实现各种消息的通知,实际改变大小需要在回调里面自己操作
|
||||||
*/
|
*/
|
||||||
$.fn.mgResizebleWidth = function(options) {
|
$.fn.mgResizableWidth = function(options) {
|
||||||
var defaults = {prev:this,next:this, prevWtMin:0, prevWtMax:999, nextWtMin:0, nextWtMax:999};
|
var defaults = {prev:this,next:this, prevWtMin:0, prevWtMax:999, nextWtMin:0, nextWtMax:999};
|
||||||
var opts = $.extend(defaults, options);
|
var opts = $.extend(defaults, options);
|
||||||
var disX = 0, prevW = 0, nextW = 0, isStart = false;
|
var disX = 0, prevW = 0, nextW = 0, isStart = false;
|
||||||
var prev, next, thisObj = this;
|
var prev, next, thisObj = this;
|
||||||
$(document).mousemove(function(ev){
|
$(document).mousemove(function(ev){
|
||||||
if(!isStart){return;}
|
if(!isStart){return;}
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
var W = ev.clientX - disX;
|
var W = ev.clientX - disX;
|
||||||
var prevWNow = prevW+W, nextWNow = nextW-W;
|
var prevWNow = prevW+W, nextWNow = nextW-W;
|
||||||
if(opts.prevWtMin >= prevWNow) {
|
if(opts.prevWtMin >= prevWNow) {
|
||||||
prevWNow = opts.prevWtMin;
|
prevWNow = opts.prevWtMin;
|
||||||
nextWNow = next.outerWidth();
|
nextWNow = next.outerWidth();
|
||||||
}
|
}
|
||||||
if(opts.nextWtMin >= nextWNow) {
|
if(opts.nextWtMin >= nextWNow) {
|
||||||
nextWNow = opts.nextWtMin;
|
nextWNow = opts.nextWtMin;
|
||||||
prevWNow = prev.outerWidth();
|
prevWNow = prev.outerWidth();
|
||||||
}
|
}
|
||||||
if(opts.prevWtMax <= prevWNow) {
|
if(opts.prevWtMax <= prevWNow) {
|
||||||
prevWNow = opts.prevWtMax;
|
prevWNow = opts.prevWtMax;
|
||||||
nextWNow = next.outerWidth();
|
nextWNow = next.outerWidth();
|
||||||
}
|
}
|
||||||
if(opts.nextWtMax <= nextWNow) {
|
if(opts.nextWtMax <= nextWNow) {
|
||||||
nextWNow = opts.nextWtMax;
|
nextWNow = opts.nextWtMax;
|
||||||
prevWNow = prev.outerWidth();
|
prevWNow = prev.outerWidth();
|
||||||
}
|
}
|
||||||
//prev.css("width", prevWNow + 'px');
|
//prev.css("width", prevWNow + 'px');
|
||||||
//next.css("width", nextWNow + 'px');
|
//next.css("width", nextWNow + 'px');
|
||||||
if(typeof opts.onresize == 'function') {
|
if(typeof opts.onresize == 'function') {
|
||||||
opts.onresize(prevWNow, nextWNow);
|
opts.onresize(prevWNow, nextWNow);
|
||||||
}
|
}
|
||||||
}).mouseup(function(ev){
|
}).mouseup(function(ev){
|
||||||
if(!isStart){return;}
|
if(!isStart){return;}
|
||||||
isStart = false;
|
isStart = false;
|
||||||
if(typeof opts.onfinish == 'function') {
|
if(typeof opts.onfinish == 'function') {
|
||||||
opts.onfinish();
|
opts.onfinish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(this).mousedown(function(ev){
|
$(this).mousedown(function(ev){
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
disX = ev.clientX;
|
disX = ev.clientX;
|
||||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||||
prevW = prev.outerWidth();
|
prevW = prev.outerWidth();
|
||||||
nextW = next.outerWidth();
|
nextW = next.outerWidth();
|
||||||
isStart = true;
|
isStart = true;
|
||||||
if(typeof opts.onstart == 'function') {
|
if(typeof opts.onstart == 'function') {
|
||||||
opts.onstart();
|
opts.onstart();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
@@ -1,106 +1,106 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 两个元素上下、左右拖动动态改变大小
|
* 两个元素上下、左右拖动动态改变大小
|
||||||
* @author 暮光:城中城
|
* @author 暮光:城中城
|
||||||
* @since 2017年5月7日
|
* @since 2017年5月7日
|
||||||
*/
|
*/
|
||||||
(function($){
|
(function($){
|
||||||
$.fn.mgResizebleHeight = function(options) {
|
$.fn.mgResizableHeight = function(options) {
|
||||||
var defaults = {prev:this,next:this, prevHtMin:0, prevHtMax:999, nextHtMin:0, nextHtMax:999};
|
var defaults = {prev:this,next:this, prevHtMin:0, prevHtMax:999, nextHtMin:0, nextHtMax:999};
|
||||||
var opts = $.extend(defaults, options);
|
var opts = $.extend(defaults, options);
|
||||||
var disY = 0, prevH = 0, nextH = 0, isStart = false;
|
var disY = 0, prevH = 0, nextH = 0, isStart = false;
|
||||||
var prev, next, thisObj = this;
|
var prev, next, thisObj = this;
|
||||||
$(document).mousemove(function(ev){
|
$(document).mousemove(function(ev){
|
||||||
if(!isStart){return;}
|
if(!isStart){return;}
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
var H = ev.clientY - disY;
|
var H = ev.clientY - disY;
|
||||||
var prevHNow = prevH+H, nextHNow = nextH-H;
|
var prevHNow = prevH+H, nextHNow = nextH-H;
|
||||||
if(opts.prevHtMin >= prevHNow) {
|
if(opts.prevHtMin >= prevHNow) {
|
||||||
prevHNow = opts.prevHtMin;
|
prevHNow = opts.prevHtMin;
|
||||||
nextHNow = next.outerHeight();
|
nextHNow = next.outerHeight();
|
||||||
}
|
}
|
||||||
if(opts.nextHtMin >= nextHNow) {
|
if(opts.nextHtMin >= nextHNow) {
|
||||||
nextHNow = opts.nextHtMin;
|
nextHNow = opts.nextHtMin;
|
||||||
prevHNow = prev.outerHeight();
|
prevHNow = prev.outerHeight();
|
||||||
}
|
}
|
||||||
if(opts.prevHtMax <= prevHNow) {
|
if(opts.prevHtMax <= prevHNow) {
|
||||||
prevHNow = opts.prevHtMax;
|
prevHNow = opts.prevHtMax;
|
||||||
nextHNow = next.outerHeight();
|
nextHNow = next.outerHeight();
|
||||||
}
|
}
|
||||||
if(opts.nextHtMax <= nextHNow) {
|
if(opts.nextHtMax <= nextHNow) {
|
||||||
nextHNow = opts.nextHtMax;
|
nextHNow = opts.nextHtMax;
|
||||||
prevHNow = prev.outerHeight();
|
prevHNow = prev.outerHeight();
|
||||||
}
|
}
|
||||||
//prev.css("height", prevHNow + 'px');
|
//prev.css("height", prevHNow + 'px');
|
||||||
//next.css("height", nextHNow + 'px');
|
//next.css("height", nextHNow + 'px');
|
||||||
if(typeof opts.onresize == 'function') {
|
if(typeof opts.onresize == 'function') {
|
||||||
opts.onresize(prevHNow, nextHNow);
|
opts.onresize(prevHNow, nextHNow);
|
||||||
}
|
}
|
||||||
}).mouseup(function(ev){
|
}).mouseup(function(ev){
|
||||||
isStart = false;
|
isStart = false;
|
||||||
});
|
});
|
||||||
$(this).mousedown(function(ev){
|
$(this).mousedown(function(ev){
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
disY = ev.clientY;
|
disY = ev.clientY;
|
||||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||||
prevH = prev.outerHeight();
|
prevH = prev.outerHeight();
|
||||||
nextH = next.outerHeight();
|
nextH = next.outerHeight();
|
||||||
isStart = true;
|
isStart = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 改变宽度的功能,只是实现各种消息的通知,实际改变大小需要在回调里面自己操作
|
* 改变宽度的功能,只是实现各种消息的通知,实际改变大小需要在回调里面自己操作
|
||||||
*/
|
*/
|
||||||
$.fn.mgResizebleWidth = function(options) {
|
$.fn.mgResizableWidth = function(options) {
|
||||||
var defaults = {prev:this,next:this, prevWtMin:0, prevWtMax:999, nextWtMin:0, nextWtMax:999};
|
var defaults = {prev:this,next:this, prevWtMin:0, prevWtMax:999, nextWtMin:0, nextWtMax:999};
|
||||||
var opts = $.extend(defaults, options);
|
var opts = $.extend(defaults, options);
|
||||||
var disX = 0, prevW = 0, nextW = 0, isStart = false;
|
var disX = 0, prevW = 0, nextW = 0, isStart = false;
|
||||||
var prev, next, thisObj = this;
|
var prev, next, thisObj = this;
|
||||||
$(document).mousemove(function(ev){
|
$(document).mousemove(function(ev){
|
||||||
if(!isStart){return;}
|
if(!isStart){return;}
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
var W = ev.clientX - disX;
|
var W = ev.clientX - disX;
|
||||||
var prevWNow = prevW+W, nextWNow = nextW-W;
|
var prevWNow = prevW+W, nextWNow = nextW-W;
|
||||||
if(opts.prevWtMin >= prevWNow) {
|
if(opts.prevWtMin >= prevWNow) {
|
||||||
prevWNow = opts.prevWtMin;
|
prevWNow = opts.prevWtMin;
|
||||||
nextWNow = next.outerWidth();
|
nextWNow = next.outerWidth();
|
||||||
}
|
}
|
||||||
if(opts.nextWtMin >= nextWNow) {
|
if(opts.nextWtMin >= nextWNow) {
|
||||||
nextWNow = opts.nextWtMin;
|
nextWNow = opts.nextWtMin;
|
||||||
prevWNow = prev.outerWidth();
|
prevWNow = prev.outerWidth();
|
||||||
}
|
}
|
||||||
if(opts.prevWtMax <= prevWNow) {
|
if(opts.prevWtMax <= prevWNow) {
|
||||||
prevWNow = opts.prevWtMax;
|
prevWNow = opts.prevWtMax;
|
||||||
nextWNow = next.outerWidth();
|
nextWNow = next.outerWidth();
|
||||||
}
|
}
|
||||||
if(opts.nextWtMax <= nextWNow) {
|
if(opts.nextWtMax <= nextWNow) {
|
||||||
nextWNow = opts.nextWtMax;
|
nextWNow = opts.nextWtMax;
|
||||||
prevWNow = prev.outerWidth();
|
prevWNow = prev.outerWidth();
|
||||||
}
|
}
|
||||||
//prev.css("width", prevWNow + 'px');
|
//prev.css("width", prevWNow + 'px');
|
||||||
//next.css("width", nextWNow + 'px');
|
//next.css("width", nextWNow + 'px');
|
||||||
if(typeof opts.onresize == 'function') {
|
if(typeof opts.onresize == 'function') {
|
||||||
opts.onresize(prevWNow, nextWNow);
|
opts.onresize(prevWNow, nextWNow);
|
||||||
}
|
}
|
||||||
}).mouseup(function(ev){
|
}).mouseup(function(ev){
|
||||||
if(!isStart){return;}
|
if(!isStart){return;}
|
||||||
isStart = false;
|
isStart = false;
|
||||||
if(typeof opts.onfinish == 'function') {
|
if(typeof opts.onfinish == 'function') {
|
||||||
opts.onfinish();
|
opts.onfinish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(this).mousedown(function(ev){
|
$(this).mousedown(function(ev){
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
disX = ev.clientX;
|
disX = ev.clientX;
|
||||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||||
prevW = prev.outerWidth();
|
prevW = prev.outerWidth();
|
||||||
nextW = next.outerWidth();
|
nextW = next.outerWidth();
|
||||||
isStart = true;
|
isStart = true;
|
||||||
if(typeof opts.onstart == 'function') {
|
if(typeof opts.onstart == 'function') {
|
||||||
opts.onstart();
|
opts.onstart();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
@@ -1,138 +1,138 @@
|
|||||||
package com.zyplayer.doc.manage.framework.config.security;
|
package com.zyplayer.doc.manage.framework.config.security;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.core.annotation.Order;
|
import org.springframework.core.annotation.Order;
|
||||||
import org.springframework.security.authentication.AuthenticationManager;
|
import org.springframework.security.authentication.AuthenticationManager;
|
||||||
import org.springframework.security.authentication.RememberMeAuthenticationProvider;
|
import org.springframework.security.authentication.RememberMeAuthenticationProvider;
|
||||||
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
|
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
|
||||||
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
|
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
|
||||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||||
import org.springframework.security.config.annotation.web.builders.WebSecurity;
|
import org.springframework.security.config.annotation.web.builders.WebSecurity;
|
||||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||||
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
|
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
|
||||||
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
|
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
|
||||||
import org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint;
|
import org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint;
|
||||||
import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;
|
import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;
|
||||||
import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler;
|
import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler;
|
||||||
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
|
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
|
||||||
import org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter;
|
import org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter;
|
||||||
import org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices;
|
import org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices;
|
||||||
import org.springframework.util.DigestUtils;
|
import org.springframework.util.DigestUtils;
|
||||||
|
|
||||||
@Order(1)
|
@Order(1)
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableWebSecurity
|
@EnableWebSecurity
|
||||||
@EnableGlobalMethodSecurity(prePostEnabled = true)
|
@EnableGlobalMethodSecurity(prePostEnabled = true)
|
||||||
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@Override
|
@Override
|
||||||
public AuthenticationManager authenticationManagerBean() throws Exception {
|
public AuthenticationManager authenticationManagerBean() throws Exception {
|
||||||
return super.authenticationManagerBean();
|
return super.authenticationManagerBean();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 忽略静态文件
|
* 忽略静态文件
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void configure(WebSecurity web) throws Exception {
|
public void configure(WebSecurity web) throws Exception {
|
||||||
web.ignoring().antMatchers("/statics/lib/**", "/css/**", "/js/**", "/img/**", "/swagger-resources", "/v2/api-docs");
|
web.ignoring().antMatchers("/statics/lib/**", "/css/**", "/js/**", "/img/**", "/swagger-resources", "/v2/api-docs");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void configure(HttpSecurity http) throws Exception {
|
protected void configure(HttpSecurity http) throws Exception {
|
||||||
String loginPage = "/statics/manage/login.html";
|
String loginPage = "/statics/manage/login.html";
|
||||||
|
|
||||||
http.authorizeRequests().antMatchers("/login/**", "/document.html").permitAll()//为了测试其他功能,设置“ /** ”允许所有请求
|
http.authorizeRequests().antMatchers("/login/**").permitAll()//为了测试其他功能,设置“ /** ”允许所有请求
|
||||||
.antMatchers("/document.html").hasAuthority("DOC_ALL")
|
.antMatchers("/document.html").hasAuthority("DOC_ALL")
|
||||||
// 其他地址的访问均需登录
|
// 其他地址的访问均需登录
|
||||||
.anyRequest().authenticated().and()
|
.anyRequest().authenticated().and()
|
||||||
// 添加验证码验证
|
// 添加验证码验证
|
||||||
.addFilterAt(myUsernamePasswordAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class)
|
.addFilterAt(myUsernamePasswordAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class)
|
||||||
.exceptionHandling()
|
.exceptionHandling()
|
||||||
.authenticationEntryPoint(new LoginUrlAuthenticationEntryPoint(loginPage))
|
.authenticationEntryPoint(new LoginUrlAuthenticationEntryPoint(loginPage))
|
||||||
.and().addFilterAt(rememberMeAuthenticationFilter(), RememberMeAuthenticationFilter.class)
|
.and().addFilterAt(rememberMeAuthenticationFilter(), RememberMeAuthenticationFilter.class)
|
||||||
// 指定登录页面的请求路径
|
// 指定登录页面的请求路径
|
||||||
.formLogin().loginPage(loginPage)
|
.formLogin().loginPage(loginPage)
|
||||||
// 登陆处理路径
|
// 登陆处理路径
|
||||||
.loginProcessingUrl("/login").permitAll()
|
.loginProcessingUrl("/login").permitAll()
|
||||||
// 退出请求的默认路径为logout
|
// 退出请求的默认路径为logout
|
||||||
.and().logout().deleteCookies("remember-me")
|
.and().logout().deleteCookies("remember-me")
|
||||||
.logoutUrl("/logout").logoutSuccessUrl(loginPage)
|
.logoutUrl("/logout").logoutSuccessUrl(loginPage)
|
||||||
.permitAll()
|
.permitAll()
|
||||||
// 开启rememberMe,设置一个私钥专供testall项目使用,注意与下面TokenBasedRememberMeServices的key保持一致
|
// 开启rememberMe,设置一个私钥专供testall项目使用,注意与下面TokenBasedRememberMeServices的key保持一致
|
||||||
// .rememberMe().key("testallKey").and()
|
// .rememberMe().key("testallKey").and()
|
||||||
// 关闭csrf
|
// 关闭csrf
|
||||||
.and().csrf().disable()
|
.and().csrf().disable()
|
||||||
// X-Frame-Options: SAMEORIGIN 表示该页面可以在相同域名页面的 frame 中展示
|
// X-Frame-Options: SAMEORIGIN 表示该页面可以在相同域名页面的 frame 中展示
|
||||||
.headers().frameOptions().sameOrigin();
|
.headers().frameOptions().sameOrigin();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
|
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
|
||||||
auth.userDetailsService(userDetailsServiceImpl())
|
auth.userDetailsService(userDetailsServiceImpl())
|
||||||
.passwordEncoder(new PasswordEncoder() {
|
.passwordEncoder(new PasswordEncoder() {
|
||||||
@Override
|
@Override
|
||||||
public String encode(CharSequence charSequence) {
|
public String encode(CharSequence charSequence) {
|
||||||
return DigestUtils.md5DigestAsHex(charSequence.toString().getBytes());
|
return DigestUtils.md5DigestAsHex(charSequence.toString().getBytes());
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public boolean matches(CharSequence charSequence, String s) {
|
public boolean matches(CharSequence charSequence, String s) {
|
||||||
String digestAsHex = DigestUtils.md5DigestAsHex(charSequence.toString().getBytes());
|
String digestAsHex = DigestUtils.md5DigestAsHex(charSequence.toString().getBytes());
|
||||||
return s.equals(digestAsHex);
|
return s.equals(digestAsHex);
|
||||||
}
|
}
|
||||||
}).and().authenticationProvider(rememberMeAuthenticationProvider());
|
}).and().authenticationProvider(rememberMeAuthenticationProvider());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public DocDetailsServiceImpl userDetailsServiceImpl() {
|
public DocDetailsServiceImpl userDetailsServiceImpl() {
|
||||||
return new DocDetailsServiceImpl();
|
return new DocDetailsServiceImpl();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public DocUsernamePasswordAuthenticationFilter myUsernamePasswordAuthenticationFilter() throws Exception {
|
public DocUsernamePasswordAuthenticationFilter myUsernamePasswordAuthenticationFilter() throws Exception {
|
||||||
DocUsernamePasswordAuthenticationFilter myFilter = new DocUsernamePasswordAuthenticationFilter();
|
DocUsernamePasswordAuthenticationFilter myFilter = new DocUsernamePasswordAuthenticationFilter();
|
||||||
myFilter.setAuthenticationManager(authenticationManagerBean());
|
myFilter.setAuthenticationManager(authenticationManagerBean());
|
||||||
myFilter.setAuthenticationSuccessHandler(authenticationSuccessHandler());
|
myFilter.setAuthenticationSuccessHandler(authenticationSuccessHandler());
|
||||||
myFilter.setAuthenticationFailureHandler(authenticationFailureHandler());
|
myFilter.setAuthenticationFailureHandler(authenticationFailureHandler());
|
||||||
myFilter.setRememberMeServices(tokenBasedRememberMeServices());
|
myFilter.setRememberMeServices(tokenBasedRememberMeServices());
|
||||||
return myFilter;
|
return myFilter;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public AuthenticationSuccessHandler authenticationSuccessHandler() {
|
public AuthenticationSuccessHandler authenticationSuccessHandler() {
|
||||||
return new SimpleUrlAuthenticationSuccessHandler("/login/success");
|
return new SimpleUrlAuthenticationSuccessHandler("/login/success");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public AuthenticationFailureHandler authenticationFailureHandler() {
|
public AuthenticationFailureHandler authenticationFailureHandler() {
|
||||||
return new SimpleUrlAuthenticationFailureHandler("/login/failure");
|
return new SimpleUrlAuthenticationFailureHandler("/login/failure");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public TokenBasedRememberMeServices tokenBasedRememberMeServices() {
|
public TokenBasedRememberMeServices tokenBasedRememberMeServices() {
|
||||||
TokenBasedRememberMeServices tbrms = new TokenBasedRememberMeServices("testallKey", userDetailsServiceImpl());
|
TokenBasedRememberMeServices tbrms = new TokenBasedRememberMeServices("testallKey", userDetailsServiceImpl());
|
||||||
// 设置cookie过期时间为2天
|
// 设置cookie过期时间为2天
|
||||||
tbrms.setTokenValiditySeconds(60 * 60 * 24 * 2);
|
tbrms.setTokenValiditySeconds(60 * 60 * 24 * 2);
|
||||||
// 设置checkbox的参数名为rememberMe(默认为remember-me),注意如果是ajax请求,参数名不是checkbox的name而是在ajax的data里
|
// 设置checkbox的参数名为rememberMe(默认为remember-me),注意如果是ajax请求,参数名不是checkbox的name而是在ajax的data里
|
||||||
tbrms.setParameter("rememberMe");
|
tbrms.setParameter("rememberMe");
|
||||||
tbrms.setAlwaysRemember(false);
|
tbrms.setAlwaysRemember(false);
|
||||||
return tbrms;
|
return tbrms;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public RememberMeAuthenticationProvider rememberMeAuthenticationProvider() {
|
public RememberMeAuthenticationProvider rememberMeAuthenticationProvider() {
|
||||||
RememberMeAuthenticationProvider rmap = new RememberMeAuthenticationProvider("testallKey");
|
RememberMeAuthenticationProvider rmap = new RememberMeAuthenticationProvider("testallKey");
|
||||||
return rmap;
|
return rmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public RememberMeAuthenticationFilter rememberMeAuthenticationFilter() throws Exception {
|
public RememberMeAuthenticationFilter rememberMeAuthenticationFilter() throws Exception {
|
||||||
RememberMeAuthenticationFilter myFilter = new RememberMeAuthenticationFilter(authenticationManagerBean(), tokenBasedRememberMeServices());
|
RememberMeAuthenticationFilter myFilter = new RememberMeAuthenticationFilter(authenticationManagerBean(), tokenBasedRememberMeServices());
|
||||||
return myFilter;
|
return myFilter;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,106 +1,106 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 两个元素上下、左右拖动动态改变大小
|
* 两个元素上下、左右拖动动态改变大小
|
||||||
* @author 暮光:城中城
|
* @author 暮光:城中城
|
||||||
* @since 2017年5月7日
|
* @since 2017年5月7日
|
||||||
*/
|
*/
|
||||||
(function($){
|
(function($){
|
||||||
$.fn.mgResizebleHeight = function(options) {
|
$.fn.mgResizableHeight = function(options) {
|
||||||
var defaults = {prev:this,next:this, prevHtMin:0, prevHtMax:999, nextHtMin:0, nextHtMax:999};
|
var defaults = {prev:this,next:this, prevHtMin:0, prevHtMax:999, nextHtMin:0, nextHtMax:999};
|
||||||
var opts = $.extend(defaults, options);
|
var opts = $.extend(defaults, options);
|
||||||
var disY = 0, prevH = 0, nextH = 0, isStart = false;
|
var disY = 0, prevH = 0, nextH = 0, isStart = false;
|
||||||
var prev, next, thisObj = this;
|
var prev, next, thisObj = this;
|
||||||
$(document).mousemove(function(ev){
|
$(document).mousemove(function(ev){
|
||||||
if(!isStart){return;}
|
if(!isStart){return;}
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
var H = ev.clientY - disY;
|
var H = ev.clientY - disY;
|
||||||
var prevHNow = prevH+H, nextHNow = nextH-H;
|
var prevHNow = prevH+H, nextHNow = nextH-H;
|
||||||
if(opts.prevHtMin >= prevHNow) {
|
if(opts.prevHtMin >= prevHNow) {
|
||||||
prevHNow = opts.prevHtMin;
|
prevHNow = opts.prevHtMin;
|
||||||
nextHNow = next.outerHeight();
|
nextHNow = next.outerHeight();
|
||||||
}
|
}
|
||||||
if(opts.nextHtMin >= nextHNow) {
|
if(opts.nextHtMin >= nextHNow) {
|
||||||
nextHNow = opts.nextHtMin;
|
nextHNow = opts.nextHtMin;
|
||||||
prevHNow = prev.outerHeight();
|
prevHNow = prev.outerHeight();
|
||||||
}
|
}
|
||||||
if(opts.prevHtMax <= prevHNow) {
|
if(opts.prevHtMax <= prevHNow) {
|
||||||
prevHNow = opts.prevHtMax;
|
prevHNow = opts.prevHtMax;
|
||||||
nextHNow = next.outerHeight();
|
nextHNow = next.outerHeight();
|
||||||
}
|
}
|
||||||
if(opts.nextHtMax <= nextHNow) {
|
if(opts.nextHtMax <= nextHNow) {
|
||||||
nextHNow = opts.nextHtMax;
|
nextHNow = opts.nextHtMax;
|
||||||
prevHNow = prev.outerHeight();
|
prevHNow = prev.outerHeight();
|
||||||
}
|
}
|
||||||
//prev.css("height", prevHNow + 'px');
|
//prev.css("height", prevHNow + 'px');
|
||||||
//next.css("height", nextHNow + 'px');
|
//next.css("height", nextHNow + 'px');
|
||||||
if(typeof opts.onresize == 'function') {
|
if(typeof opts.onresize == 'function') {
|
||||||
opts.onresize(prevHNow, nextHNow);
|
opts.onresize(prevHNow, nextHNow);
|
||||||
}
|
}
|
||||||
}).mouseup(function(ev){
|
}).mouseup(function(ev){
|
||||||
isStart = false;
|
isStart = false;
|
||||||
});
|
});
|
||||||
$(this).mousedown(function(ev){
|
$(this).mousedown(function(ev){
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
disY = ev.clientY;
|
disY = ev.clientY;
|
||||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||||
prevH = prev.outerHeight();
|
prevH = prev.outerHeight();
|
||||||
nextH = next.outerHeight();
|
nextH = next.outerHeight();
|
||||||
isStart = true;
|
isStart = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 改变宽度的功能,只是实现各种消息的通知,实际改变大小需要在回调里面自己操作
|
* 改变宽度的功能,只是实现各种消息的通知,实际改变大小需要在回调里面自己操作
|
||||||
*/
|
*/
|
||||||
$.fn.mgResizebleWidth = function(options) {
|
$.fn.mgResizableWidth = function(options) {
|
||||||
var defaults = {prev:this,next:this, prevWtMin:0, prevWtMax:999, nextWtMin:0, nextWtMax:999};
|
var defaults = {prev:this,next:this, prevWtMin:0, prevWtMax:999, nextWtMin:0, nextWtMax:999};
|
||||||
var opts = $.extend(defaults, options);
|
var opts = $.extend(defaults, options);
|
||||||
var disX = 0, prevW = 0, nextW = 0, isStart = false;
|
var disX = 0, prevW = 0, nextW = 0, isStart = false;
|
||||||
var prev, next, thisObj = this;
|
var prev, next, thisObj = this;
|
||||||
$(document).mousemove(function(ev){
|
$(document).mousemove(function(ev){
|
||||||
if(!isStart){return;}
|
if(!isStart){return;}
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
var W = ev.clientX - disX;
|
var W = ev.clientX - disX;
|
||||||
var prevWNow = prevW+W, nextWNow = nextW-W;
|
var prevWNow = prevW+W, nextWNow = nextW-W;
|
||||||
if(opts.prevWtMin >= prevWNow) {
|
if(opts.prevWtMin >= prevWNow) {
|
||||||
prevWNow = opts.prevWtMin;
|
prevWNow = opts.prevWtMin;
|
||||||
nextWNow = next.outerWidth();
|
nextWNow = next.outerWidth();
|
||||||
}
|
}
|
||||||
if(opts.nextWtMin >= nextWNow) {
|
if(opts.nextWtMin >= nextWNow) {
|
||||||
nextWNow = opts.nextWtMin;
|
nextWNow = opts.nextWtMin;
|
||||||
prevWNow = prev.outerWidth();
|
prevWNow = prev.outerWidth();
|
||||||
}
|
}
|
||||||
if(opts.prevWtMax <= prevWNow) {
|
if(opts.prevWtMax <= prevWNow) {
|
||||||
prevWNow = opts.prevWtMax;
|
prevWNow = opts.prevWtMax;
|
||||||
nextWNow = next.outerWidth();
|
nextWNow = next.outerWidth();
|
||||||
}
|
}
|
||||||
if(opts.nextWtMax <= nextWNow) {
|
if(opts.nextWtMax <= nextWNow) {
|
||||||
nextWNow = opts.nextWtMax;
|
nextWNow = opts.nextWtMax;
|
||||||
prevWNow = prev.outerWidth();
|
prevWNow = prev.outerWidth();
|
||||||
}
|
}
|
||||||
//prev.css("width", prevWNow + 'px');
|
//prev.css("width", prevWNow + 'px');
|
||||||
//next.css("width", nextWNow + 'px');
|
//next.css("width", nextWNow + 'px');
|
||||||
if(typeof opts.onresize == 'function') {
|
if(typeof opts.onresize == 'function') {
|
||||||
opts.onresize(prevWNow, nextWNow);
|
opts.onresize(prevWNow, nextWNow);
|
||||||
}
|
}
|
||||||
}).mouseup(function(ev){
|
}).mouseup(function(ev){
|
||||||
if(!isStart){return;}
|
if(!isStart){return;}
|
||||||
isStart = false;
|
isStart = false;
|
||||||
if(typeof opts.onfinish == 'function') {
|
if(typeof opts.onfinish == 'function') {
|
||||||
opts.onfinish();
|
opts.onfinish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(this).mousedown(function(ev){
|
$(this).mousedown(function(ev){
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
disX = ev.clientX;
|
disX = ev.clientX;
|
||||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||||
prevW = prev.outerWidth();
|
prevW = prev.outerWidth();
|
||||||
nextW = next.outerWidth();
|
nextW = next.outerWidth();
|
||||||
isStart = true;
|
isStart = true;
|
||||||
if(typeof opts.onstart == 'function') {
|
if(typeof opts.onstart == 'function') {
|
||||||
opts.onstart();
|
opts.onstart();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
@@ -1,66 +1,66 @@
|
|||||||
package com.zyplayer.doc.swagger.controller;
|
package com.zyplayer.doc.swagger.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import com.zyplayer.doc.core.json.DocResponseJson;
|
import com.zyplayer.doc.core.json.DocResponseJson;
|
||||||
import com.zyplayer.doc.swagger.framework.service.MgStorage;
|
import com.zyplayer.doc.swagger.framework.service.MgStorage;
|
||||||
import com.zyplayer.doc.swagger.framework.service.MgStorageService;
|
import com.zyplayer.doc.swagger.framework.service.MgStorageService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 后台存储服务控制器
|
* 后台存储服务控制器
|
||||||
*
|
*
|
||||||
* @author 暮光:城中城
|
* @author 暮光:城中城
|
||||||
* @since 2018年8月21日
|
* @since 2018年8月21日
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/swagger-mg-ui/storage")
|
@RequestMapping("/swagger-mg-ui/storage")
|
||||||
public class MgStorageController {
|
public class MgStorageController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MgStorageService storageService;
|
private MgStorageService storageService;
|
||||||
|
|
||||||
@PostMapping(value = "/checkConfig")
|
@PostMapping(value = "/checkConfig")
|
||||||
public DocResponseJson<Object> checkConfig() {
|
public DocResponseJson<Object> checkConfig() {
|
||||||
return DocResponseJson.ok();
|
return DocResponseJson.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "/data")
|
@PostMapping(value = "/data")
|
||||||
public DocResponseJson<Object> setData(String key, String value) {
|
public DocResponseJson<Object> setData(String key, String value) {
|
||||||
if (key == null || value == null) {
|
if (key == null || value == null) {
|
||||||
return DocResponseJson.warn("参数名或值不能为空");
|
return DocResponseJson.warn("参数名或值不能为空");
|
||||||
}
|
}
|
||||||
storageService.put(key, value);
|
storageService.put(key, value);
|
||||||
return DocResponseJson.ok();
|
return DocResponseJson.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/data")
|
@GetMapping(value = "/data")
|
||||||
public DocResponseJson<String> getData(String key) {
|
public DocResponseJson<String> getData(String key) {
|
||||||
if (key == null) {
|
if (key == null) {
|
||||||
return DocResponseJson.warn("参数名不能为空");
|
return DocResponseJson.warn("参数名不能为空");
|
||||||
}
|
}
|
||||||
String value = storageService.get(key);
|
String value = storageService.get(key);
|
||||||
value = (value == null) ? "" : value;
|
value = (value == null) ? "" : value;
|
||||||
return DocResponseJson.ok(value);
|
return DocResponseJson.ok(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "/delete")
|
@PostMapping(value = "/delete")
|
||||||
public DocResponseJson<Object> delete(String key) {
|
public DocResponseJson<Object> delete(String key) {
|
||||||
if (key == null) {
|
if (key == null) {
|
||||||
return DocResponseJson.warn("参数名不能为空");
|
return DocResponseJson.warn("参数名不能为空");
|
||||||
}
|
}
|
||||||
storageService.remove(key);
|
storageService.remove(key);
|
||||||
return DocResponseJson.ok();
|
return DocResponseJson.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "/like")
|
@PostMapping(value = "/like")
|
||||||
public DocResponseJson<Object> like(String key, String value) {
|
public DocResponseJson<List<MgStorage>> like(String key, String value) {
|
||||||
List<MgStorage> likeList = storageService.like(key, value);
|
List<MgStorage> likeList = storageService.like(key, value);
|
||||||
return DocResponseJson.ok(likeList);
|
return DocResponseJson.ok(likeList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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="rightContent">
|
||||||
<div class="right-container" id="rightContentMask"></div>
|
<div class="right-container" id="rightContentMask"></div>
|
||||||
<div class="tab-page tab-home-page">
|
<div class="tab-page tab-home-page">
|
||||||
@@ -74,25 +74,6 @@
|
|||||||
<div class="tab-page tab-zpages hide">
|
<div class="tab-page tab-zpages hide">
|
||||||
<div class="tabs" id="rightZpages"></div>
|
<div class="tabs" id="rightZpages"></div>
|
||||||
</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">
|
<div class="tab-page tab-document hide">
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li class="active"><a data-tab href="#tabDocInfo">接口说明</a></li>
|
<li class="active"><a data-tab href="#tabDocInfo">接口说明</a></li>
|
||||||
|
|||||||
@@ -1,134 +1,134 @@
|
|||||||
body{width: 100%;height: 100%;margin: 0;padding: 0;}
|
body{width: 100%;height: 100%;margin: 0;padding: 0;}
|
||||||
a:focus{outline:none;}
|
a:focus{outline:none;}
|
||||||
ul{list-style: none;list-style-type: none;}
|
ul{list-style: none;list-style-type: none;}
|
||||||
.tree li a{white-space: nowrap;}
|
.tree li a{white-space: nowrap;}
|
||||||
.tree-menu li > ul{background-color: #f1f1f1;}
|
.tree-menu li > ul{background-color: #f1f1f1;}
|
||||||
.tree-menu li li li li a{padding-left: 68px;}
|
.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 a{padding-left: 88px;}
|
||||||
.tree-menu li li li li li li a{padding-left: 108px;}
|
.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 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 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 a{padding-left: 168px;}
|
||||||
.tree-menu li li li li li li li li li li a{padding-left: 188px;}
|
.tree-menu li li li li li li li li li li a{padding-left: 188px;}
|
||||||
.table td, .table th {vertical-align: middle;}
|
.table td, .table th {vertical-align: middle;}
|
||||||
#tabDocInfo{position: absolute; bottom: 0;top: 60px;overflow-y: auto; right: 0; left: 10px;}
|
#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;}
|
#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{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{padding-bottom: 10px;}
|
||||||
.tab-online-debug-page .title-info .btn{margin-right: 20px;}
|
.tab-online-debug-page .title-info .btn{margin-right: 20px;}
|
||||||
.tab-online-debug-page .title-info .text{padding-bottom: 10px;}
|
.tab-online-debug-page .title-info .text{padding-bottom: 10px;}
|
||||||
|
|
||||||
.local-storage{display: none;}
|
.local-storage{display: none;}
|
||||||
|
|
||||||
/**lable的覆盖样式*/
|
/**lable的覆盖样式*/
|
||||||
.label{font-size: 100%;}
|
.label{font-size: 100%;}
|
||||||
.label-warning {background-color: #f9f5ee; color: #f1a325;}
|
.label-warning {background-color: #f9f5ee; color: #f1a325;}
|
||||||
label{font-weight: normal;}
|
label{font-weight: normal;}
|
||||||
|
|
||||||
.nav.gray{background-color: #f1f1f1;margin-bottom: 10px;}
|
.nav.gray{background-color: #f1f1f1;margin-bottom: 10px;}
|
||||||
|
|
||||||
.doc-table tr .info{text-align: right; width: 100px;}
|
.doc-table tr .info{text-align: right; width: 100px;}
|
||||||
.setting-table tr .info{text-align: right; max-width: 150px;}
|
.setting-table tr .info{text-align: right; max-width: 150px;}
|
||||||
.show-doc span{color: #aaa;}
|
.show-doc span{color: #aaa;}
|
||||||
|
|
||||||
.mgresizebleW{z-index: 90;height: 100%; width: 10px; cursor: e-resize;}
|
.mgresizableW{z-index: 90;height: 100%; width: 10px; cursor: e-resize;}
|
||||||
.ui-resizable-handle {display: block;font-size: 0.1px;position: absolute;}
|
.ui-resizable-handle {display: block;font-size: 0.1px;position: absolute;}
|
||||||
#resizebleLeftRight{left: 360px;}
|
#resizableLeftRight{left: 360px;}
|
||||||
.unselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
.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{overflow-y: auto;bottom: 0;top: 0;right: 0;left: 0;position: absolute;overflow-x: hidden;padding: 10px;}
|
||||||
#homePageDashboard .panel-body{padding: 10px;}
|
#homePageDashboard .panel-body{padding: 10px;}
|
||||||
|
|
||||||
#homePageLi{margin-top: 5px;}
|
#homePageLi{margin-top: 5px;}
|
||||||
|
|
||||||
.left-body{
|
.left-body{
|
||||||
width: 360px; height:100%; position: fixed; top: 0; bottom: 0; left: 0;
|
width: 360px; height:100%; position: fixed; top: 0; bottom: 0; left: 0;
|
||||||
}
|
}
|
||||||
.left-header{
|
.left-header{
|
||||||
background: #3280fc;width: 100%; height:60px;line-height:60px;
|
background: #3280fc;width: 100%; height:60px;line-height:60px;
|
||||||
position: absolute; top: 0; bottom: 0; left: 0;text-align: center;
|
position: absolute; top: 0; bottom: 0; left: 0;text-align: center;
|
||||||
}
|
}
|
||||||
.left-header .logo{
|
.left-header .logo{
|
||||||
font-size: 30px;color: #fff;
|
font-size: 30px;color: #fff;
|
||||||
}
|
}
|
||||||
.left-header .icon-bars{
|
.left-header .icon-bars{
|
||||||
font-size: 24px;float: right;margin: 18px 18px 0 0;color: #fff;cursor: pointer;
|
font-size: 24px;float: right;margin: 18px 18px 0 0;color: #fff;cursor: pointer;
|
||||||
}
|
}
|
||||||
.left-container{
|
.left-container{
|
||||||
width: 100%;position: absolute;background: #f1f1f1;color: rgba(163, 175, 183, .9);
|
width: 100%;position: absolute;background: #f1f1f1;color: rgba(163, 175, 183, .9);
|
||||||
top: 60px; bottom: 0; left: 0; overflow-y: auto; padding: 10px;
|
top: 60px; bottom: 0; left: 0; overflow-y: auto; padding: 10px;
|
||||||
}
|
}
|
||||||
.left-container .projects{border: 0px; border-radius: 0px;}
|
.left-container .projects{border: 0px; border-radius: 0px;}
|
||||||
|
|
||||||
.right-container{
|
.right-container{
|
||||||
position: fixed;top: 0px; bottom: 0; left: 360px; right: 0;padding: 10px;
|
position: fixed;top: 0px; bottom: 0; left: 360px; right: 0;padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#docResponseModel td:first-child{width: 100px;}
|
#docResponseModel td:first-child{width: 100px;}
|
||||||
#docResponseExample 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{margin-top: 10px; max-height: 500px;overflow-y: auto;}
|
||||||
.modal-table-box{list-style: none;}
|
.modal-table-box{list-style: none;}
|
||||||
.modal-table-box ul{padding-left: 10px;}
|
.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{padding: 10px 15px; margin: 0 10px 10px 0; background-color: #f1f1f1;cursor: pointer;}
|
||||||
.modal-table-box li.checked{background-color: #8666b8;color:#fff;}
|
.modal-table-box li.checked{background-color: #8666b8;color:#fff;}
|
||||||
|
|
||||||
#exportDocumentText{height: 350px;}
|
#exportDocumentText{height: 350px;}
|
||||||
|
|
||||||
/* 在线调试框样式 */
|
/* 在线调试框样式 */
|
||||||
#tabParamBody .tab-content{padding-top: 10px;}
|
#tabParamBody .tab-content{padding-top: 10px;}
|
||||||
|
|
||||||
.post-url-box{padding: 10px 0;}
|
.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 .input-group-btn:nth-child(2) button{border-right: 0;border-radius: 0;}
|
||||||
.post-url-box .send-request .hide{display: none;}
|
.post-url-box .send-request .hide{display: none;}
|
||||||
|
|
||||||
.param-box{}
|
.param-box{}
|
||||||
.param-box .panel-collapse{padding: 10px;}
|
.param-box .panel-collapse{padding: 10px;}
|
||||||
.param-box .nav{background-color: #f1f1f1;}
|
.param-box .nav{background-color: #f1f1f1;}
|
||||||
/* .param-box .nav > li > *{padding: 8px 25px;} */
|
/* .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 > 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{position: relative; display: block;padding: 10px 0 0 25px;}
|
||||||
.param-box .nav > .form-to-url label{margin: 0;}
|
.param-box .nav > .form-to-url label{margin: 0;}
|
||||||
.param-box .nav > .form-to-url input{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 .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 .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 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(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){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{cursor: pointer;color: #ccc;}
|
||||||
.param-box .param-table tbody td:nth-child(3) i:hover{color: #888;}
|
.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{display: none;}
|
||||||
#bulkEditHeaderCheck{margin-left: 10px;}
|
#bulkEditHeaderCheck{margin-left: 10px;}
|
||||||
#bulkEditHeader,#bulkEditForm{display: none;}
|
#bulkEditHeader,#bulkEditForm{display: none;}
|
||||||
|
|
||||||
.response-box{margin-top: 20px;}
|
.response-box{margin-top: 20px;}
|
||||||
.response-box .nav > li > *{padding: 8px 25px;}
|
.response-box .nav > li > *{padding: 8px 25px;}
|
||||||
.response-box .nav > li span{position: relative; display: block;padding: 9px 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.info span{background-color: #ccc;}
|
||||||
.response-box .nav > li.right{float: right;}
|
.response-box .nav > li.right{float: right;}
|
||||||
.response-box .nav > li.right i{color: #3280fc;}
|
.response-box .nav > li.right i{color: #3280fc;}
|
||||||
.response-box .nav{background-color: #f1f1f1;}
|
.response-box .nav{background-color: #f1f1f1;}
|
||||||
.response-box .tab-content .tab-response-pane{padding: 10px;}
|
.response-box .tab-content .tab-response-pane{padding: 10px;}
|
||||||
|
|
||||||
#responseBodyJsonIframe{width: 100%;height: 300px;border: 0;}
|
#responseBodyJsonIframe{width: 100%;height: 300px;border: 0;}
|
||||||
|
|
||||||
/* S-模拟请求 */
|
/* S-模拟请求 */
|
||||||
#tabSimulationResult{padding: 10px 0;}
|
#tabSimulationResult{padding: 10px 0;}
|
||||||
/* E-模拟请求 */
|
/* E-模拟请求 */
|
||||||
|
|
||||||
/* S-JSON展示的样式 */
|
/* S-JSON展示的样式 */
|
||||||
pre.json{margin-top:0px;margin-bottom:0px;}
|
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 .canvas{font:10pt georgia;background-color:#ececec;color:#000000;border:1px solid #cecece;}
|
||||||
pre.json .object-brace{color:#00aa00;font-weight:bold;}
|
pre.json .object-brace{color:#00aa00;font-weight:bold;}
|
||||||
pre.json .array-brace{color:#0033ff;font-weight:bold;}
|
pre.json .array-brace{color:#0033ff;font-weight:bold;}
|
||||||
pre.json .property-name{color:#cc0000;font-weight:bold;}
|
pre.json .property-name{color:#cc0000;font-weight:bold;}
|
||||||
pre.json .string{color:#007777;}
|
pre.json .string{color:#007777;}
|
||||||
pre.json .number{color:#aa00aa;}
|
pre.json .number{color:#aa00aa;}
|
||||||
pre.json .boolean{color:#0000ff;}
|
pre.json .boolean{color:#0000ff;}
|
||||||
pre.json .function{color:#aa6633;text-decoration:italic;}
|
pre.json .function{color:#aa6633;text-decoration:italic;}
|
||||||
pre.json .null{color:#0000ff;}
|
pre.json .null{color:#0000ff;}
|
||||||
pre.json .comma{color:#000000;font-weight:bold;}
|
pre.json .comma{color:#000000;font-weight:bold;}
|
||||||
pre.json .annotation{color:#aaa;}
|
pre.json .annotation{color:#aaa;}
|
||||||
pre img{cursor: pointer;}
|
pre img{cursor: pointer;}
|
||||||
/* E-JSON展示的样式 */
|
/* E-JSON展示的样式 */
|
||||||
|
|
||||||
|
|||||||
@@ -1,204 +1,204 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
||||||
<title>swagger-mg-ui</title>
|
<title>swagger-mg-ui</title>
|
||||||
<link rel="shortcut icon" href="img/api.ico"/>
|
<link rel="shortcut icon" href="img/api.ico"/>
|
||||||
<link rel="stylesheet" href="css/zui.min.css" />
|
<link rel="stylesheet" href="css/zui.min.css" />
|
||||||
<link rel="stylesheet" href="css/zui.dashboard.min.css" />
|
<link rel="stylesheet" href="css/zui.dashboard.min.css" />
|
||||||
<link rel="stylesheet" href="css/mg-ui.css" />
|
<link rel="stylesheet" href="css/mg-ui.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="left-body" id="leftContent">
|
<div class="left-body" id="leftContent">
|
||||||
<div class="left-header">
|
<div class="left-header">
|
||||||
<span class="logo" id="logoText">swagger-mg-ui</span>
|
<span class="logo" id="logoText">swagger-mg-ui</span>
|
||||||
<i class="icon icon-bars" id="changeContentWidth"></i>
|
<i class="icon icon-bars" id="changeContentWidth"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="scrollbar-hover left-container">
|
<div class="scrollbar-hover left-container">
|
||||||
<!-- 样式类可选:tree-menu tree-folders tree-chevrons tree-angles -->
|
<!-- 样式类可选:tree-menu tree-folders tree-chevrons tree-angles -->
|
||||||
<ul class="tree tree-lines tree-menu projects">
|
<ul class="tree tree-lines tree-menu projects">
|
||||||
<li>
|
<li>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" class="form-control" id="searchDocInput">
|
<input type="text" class="form-control" id="searchDocInput">
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button class="btn btn-default" type="button" id="searchDocBt">搜索</button>
|
<button class="btn btn-default" type="button" id="searchDocBt">搜索</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li id="homePageLi"><a href="javascript:void(0)" path=""><i class="icon-home"></i> 控制台</a></li>
|
<li id="homePageLi"><a href="javascript:void(0)" path=""><i class="icon-home"></i> 控制台</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div id="apiPathTree">
|
<div id="apiPathTree">
|
||||||
<ul class="tree tree-lines projects"></ul>
|
<ul class="tree tree-lines projects"></ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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="rightContent">
|
||||||
<div class="tab-page tab-home-page">
|
<div class="tab-page tab-home-page">
|
||||||
<div id="homePageDashboard" class="dashboard dashboard-draggable" data-height="290">
|
<div id="homePageDashboard" class="dashboard dashboard-draggable" data-height="290">
|
||||||
<section class="row">
|
<section class="row">
|
||||||
<div class="col-md-6 col-sm-6">
|
<div class="col-md-6 col-sm-6">
|
||||||
<div class="panel" data-id="1">
|
<div class="panel" data-id="1">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<div class="title">配置中心</div>
|
<div class="title">配置中心</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<table class="table table-bordered setting-table">
|
<table class="table table-bordered setting-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="info">目录展示方式</td>
|
<td class="info">目录展示方式</td>
|
||||||
<td>
|
<td>
|
||||||
<label><input type="radio" name="catalogShowType" value="1">分路径展示</label>
|
<label><input type="radio" name="catalogShowType" value="1">分路径展示</label>
|
||||||
<label><input type="radio" name="catalogShowType" value="2">分标签展示</label>
|
<label><input type="radio" name="catalogShowType" value="2">分标签展示</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="info">树形菜单展示方式</td>
|
<td class="info">树形菜单展示方式</td>
|
||||||
<td>
|
<td>
|
||||||
<label><input type="radio" name="treeShowType" value="1">直角</label>
|
<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="2">导航</label>
|
||||||
<label><input type="radio" name="treeShowType" value="3">加减</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="4">文件夹</label>
|
||||||
<label><input type="radio" name="treeShowType" value="5">V型</label>
|
<label><input type="radio" name="treeShowType" value="5">V型</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="info">是否展示字段的类型</td>
|
<td class="info">是否展示字段的类型</td>
|
||||||
<td>
|
<td>
|
||||||
<label><input type="radio" name="showParamType" value="1">是</label>
|
<label><input type="radio" name="showParamType" value="1">是</label>
|
||||||
<label><input type="radio" name="showParamType" value="0">否</label>
|
<label><input type="radio" name="showParamType" value="0">否</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="info">自动填充请求参数</td>
|
<td class="info">自动填充请求参数</td>
|
||||||
<td>
|
<td>
|
||||||
<label><input type="radio" name="autoFillParam" value="0">否</label>
|
<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="1">智能填充</label>
|
||||||
<label><input type="radio" name="autoFillParam" value="2">全部填充</label>
|
<label><input type="radio" name="autoFillParam" value="2">全部填充</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<div align="center">简介</div>
|
<div align="center">简介</div>
|
||||||
swagger-mg-ui是swagger-ui的一个前端实现,使用简单、解析速度快、走心的设计,
|
swagger-mg-ui是swagger-ui的一个前端实现,使用简单、解析速度快、走心的设计,
|
||||||
支持多项目同时展示,多种文档目录的展示方案,多种自定义配置,满足各种使用习惯。
|
支持多项目同时展示,多种文档目录的展示方案,多种自定义配置,满足各种使用习惯。
|
||||||
本项目是完全从头写的,所以有任何属性未解析到、UI上有何建议都能及时处理得到。
|
本项目是完全从头写的,所以有任何属性未解析到、UI上有何建议都能及时处理得到。
|
||||||
使用中您有任何的意见和建议都可到源码地址处反馈哦!<br/>
|
使用中您有任何的意见和建议都可到源码地址处反馈哦!<br/>
|
||||||
源码地址:<a target="_blank" href="https://gitee.com/zyplayer/swagger-mg-ui">swagger-mg-ui</a>,
|
源码地址:<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://zui.sexy">zui</a>,
|
||||||
我的网站:<a target="_blank" href="http://kongjianzhou.com">空间轴</a>
|
我的网站:<a target="_blank" href="http://kongjianzhou.com">空间轴</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-page tab-document hide">
|
<div class="tab-page tab-document hide">
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
<li class="active"><a data-tab href="#tabDocInfo">接口说明</a></li>
|
<li class="active"><a data-tab href="#tabDocInfo">接口说明</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="tab-pane tab-document-pane active" id="tabDocInfo">
|
<div class="tab-pane tab-document-pane active" id="tabDocInfo">
|
||||||
<table class="table table-bordered doc-table">
|
<table class="table table-bordered doc-table">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="info">接口地址</td>
|
<td class="info">接口地址</td>
|
||||||
<td><span id="docUrl" class="label label-warning"></span></td>
|
<td><span id="docUrl" class="label label-warning"></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="info">说明</td>
|
<td class="info">说明</td>
|
||||||
<td id="docInfo"></td>
|
<td id="docInfo"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="info">请求方式</td>
|
<td class="info">请求方式</td>
|
||||||
<td><span id="docRequestMethod" class="label label-warning"></span></td>
|
<td><span id="docRequestMethod" class="label label-warning"></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="info">consumes</td>
|
<td class="info">consumes</td>
|
||||||
<td><span id="docConsumes" class="label label-warning"></span></td>
|
<td><span id="docConsumes" class="label label-warning"></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="info">produces</td>
|
<td class="info">produces</td>
|
||||||
<td><span id="docProduces" class="label label-warning"></span></td>
|
<td><span id="docProduces" class="label label-warning"></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="info">请求参数</td>
|
<td class="info">请求参数</td>
|
||||||
<td>
|
<td>
|
||||||
<ul class="nav nav-secondary gray">
|
<ul class="nav nav-secondary gray">
|
||||||
<li class="active"><a data-tab href="#docRequestParam">说明</a></li>
|
<li class="active"><a data-tab href="#docRequestParam">说明</a></li>
|
||||||
<li><a data-tab href="#docRequestExample">例子</a></li>
|
<li><a data-tab href="#docRequestExample">例子</a></li>
|
||||||
<!-- <i class="icon icon-info-sign" title='例:@ApiModelProperty(value="用户ID", example = "9527"),将example填入对象值里面'></i> -->
|
<!-- <i class="icon icon-info-sign" title='例:@ApiModelProperty(value="用户ID", example = "9527"),将example填入对象值里面'></i> -->
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="tab-pane tab-param-type-pane active" id="docRequestParam">
|
<div class="tab-pane tab-param-type-pane active" id="docRequestParam">
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<tr><th>参数名</th><th>说明</th><th>类型</th><th>参数位置</th><th>是否必填</th></tr>
|
<tr><th>参数名</th><th>说明</th><th>类型</th><th>参数位置</th><th>是否必填</th></tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody></tbody>
|
<tbody></tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane tab-param-type-pane" id="docRequestExample">
|
<div class="tab-pane tab-param-type-pane" id="docRequestExample">
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<tr><th>参数名</th><th>说明</th><th>类型</th><th>参数位置</th><th>是否必填</th></tr>
|
<tr><th>参数名</th><th>说明</th><th>类型</th><th>参数位置</th><th>是否必填</th></tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody></tbody>
|
<tbody></tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="info">响应Model</td>
|
<td class="info">响应Model</td>
|
||||||
<td>
|
<td>
|
||||||
<ul class="nav nav-secondary gray">
|
<ul class="nav nav-secondary gray">
|
||||||
<li class="active"><a data-tab href="#docResponseModel">说明</a></li>
|
<li class="active"><a data-tab href="#docResponseModel">说明</a></li>
|
||||||
<li><a data-tab href="#docResponseExample">例子</a></li>
|
<li><a data-tab href="#docResponseExample">例子</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="tab-pane tab-param-type-pane active" id="docResponseModel">
|
<div class="tab-pane tab-param-type-pane active" id="docResponseModel">
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<tr><th>状态码</th><th>说明</th></tr>
|
<tr><th>状态码</th><th>说明</th></tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody></tbody>
|
<tbody></tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane tab-param-type-pane" id="docResponseExample">
|
<div class="tab-pane tab-param-type-pane" id="docResponseExample">
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<tr><th>状态码</th><th>说明</th></tr>
|
<tr><th>状态码</th><th>说明</th></tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody></tbody>
|
<tbody></tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<script type="text/javascript" src="js/jquery-3.1.0.min.js"></script>
|
<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.min.js"></script>
|
||||||
<script type="text/javascript" src="js/zui.dashboard.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/mg-ui-data.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="js/formatjson.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/toast.js"></script>
|
||||||
<script type="text/javascript" src="js/common.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/mgResizable.js"></script>
|
||||||
<script type="text/javascript" src="js/mg-ui-tree.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-tag.js"></script>
|
||||||
<script type="text/javascript" src="js/mg-ui-debug.js"></script>
|
<script type="text/javascript" src="js/mg-ui-debug.js"></script>
|
||||||
<script type="text/javascript" src="js/mg-ui.js"></script>
|
<script type="text/javascript" src="js/mg-ui.js"></script>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,106 +1,106 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 两个元素上下、左右拖动动态改变大小
|
* 两个元素上下、左右拖动动态改变大小
|
||||||
* @author 暮光:城中城
|
* @author 暮光:城中城
|
||||||
* @since 2017年5月7日
|
* @since 2017年5月7日
|
||||||
*/
|
*/
|
||||||
(function($){
|
(function($){
|
||||||
$.fn.mgResizebleHeight = function(options) {
|
$.fn.mgResizableHeight = function(options) {
|
||||||
var defaults = {prev:this,next:this, prevHtMin:0, prevHtMax:999, nextHtMin:0, nextHtMax:999};
|
var defaults = {prev:this,next:this, prevHtMin:0, prevHtMax:999, nextHtMin:0, nextHtMax:999};
|
||||||
var opts = $.extend(defaults, options);
|
var opts = $.extend(defaults, options);
|
||||||
var disY = 0, prevH = 0, nextH = 0, isStart = false;
|
var disY = 0, prevH = 0, nextH = 0, isStart = false;
|
||||||
var prev, next, thisObj = this;
|
var prev, next, thisObj = this;
|
||||||
$(document).mousemove(function(ev){
|
$(document).mousemove(function(ev){
|
||||||
if(!isStart){return;}
|
if(!isStart){return;}
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
var H = ev.clientY - disY;
|
var H = ev.clientY - disY;
|
||||||
var prevHNow = prevH+H, nextHNow = nextH-H;
|
var prevHNow = prevH+H, nextHNow = nextH-H;
|
||||||
if(opts.prevHtMin >= prevHNow) {
|
if(opts.prevHtMin >= prevHNow) {
|
||||||
prevHNow = opts.prevHtMin;
|
prevHNow = opts.prevHtMin;
|
||||||
nextHNow = next.outerHeight();
|
nextHNow = next.outerHeight();
|
||||||
}
|
}
|
||||||
if(opts.nextHtMin >= nextHNow) {
|
if(opts.nextHtMin >= nextHNow) {
|
||||||
nextHNow = opts.nextHtMin;
|
nextHNow = opts.nextHtMin;
|
||||||
prevHNow = prev.outerHeight();
|
prevHNow = prev.outerHeight();
|
||||||
}
|
}
|
||||||
if(opts.prevHtMax <= prevHNow) {
|
if(opts.prevHtMax <= prevHNow) {
|
||||||
prevHNow = opts.prevHtMax;
|
prevHNow = opts.prevHtMax;
|
||||||
nextHNow = next.outerHeight();
|
nextHNow = next.outerHeight();
|
||||||
}
|
}
|
||||||
if(opts.nextHtMax <= nextHNow) {
|
if(opts.nextHtMax <= nextHNow) {
|
||||||
nextHNow = opts.nextHtMax;
|
nextHNow = opts.nextHtMax;
|
||||||
prevHNow = prev.outerHeight();
|
prevHNow = prev.outerHeight();
|
||||||
}
|
}
|
||||||
//prev.css("height", prevHNow + 'px');
|
//prev.css("height", prevHNow + 'px');
|
||||||
//next.css("height", nextHNow + 'px');
|
//next.css("height", nextHNow + 'px');
|
||||||
if(typeof opts.onresize == 'function') {
|
if(typeof opts.onresize == 'function') {
|
||||||
opts.onresize(prevHNow, nextHNow);
|
opts.onresize(prevHNow, nextHNow);
|
||||||
}
|
}
|
||||||
}).mouseup(function(ev){
|
}).mouseup(function(ev){
|
||||||
isStart = false;
|
isStart = false;
|
||||||
});
|
});
|
||||||
$(this).mousedown(function(ev){
|
$(this).mousedown(function(ev){
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
disY = ev.clientY;
|
disY = ev.clientY;
|
||||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||||
prevH = prev.outerHeight();
|
prevH = prev.outerHeight();
|
||||||
nextH = next.outerHeight();
|
nextH = next.outerHeight();
|
||||||
isStart = true;
|
isStart = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 改变宽度的功能,只是实现各种消息的通知,实际改变大小需要在回调里面自己操作
|
* 改变宽度的功能,只是实现各种消息的通知,实际改变大小需要在回调里面自己操作
|
||||||
*/
|
*/
|
||||||
$.fn.mgResizebleWidth = function(options) {
|
$.fn.mgResizableWidth = function(options) {
|
||||||
var defaults = {prev:this,next:this, prevWtMin:0, prevWtMax:999, nextWtMin:0, nextWtMax:999};
|
var defaults = {prev:this,next:this, prevWtMin:0, prevWtMax:999, nextWtMin:0, nextWtMax:999};
|
||||||
var opts = $.extend(defaults, options);
|
var opts = $.extend(defaults, options);
|
||||||
var disX = 0, prevW = 0, nextW = 0, isStart = false;
|
var disX = 0, prevW = 0, nextW = 0, isStart = false;
|
||||||
var prev, next, thisObj = this;
|
var prev, next, thisObj = this;
|
||||||
$(document).mousemove(function(ev){
|
$(document).mousemove(function(ev){
|
||||||
if(!isStart){return;}
|
if(!isStart){return;}
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
var W = ev.clientX - disX;
|
var W = ev.clientX - disX;
|
||||||
var prevWNow = prevW+W, nextWNow = nextW-W;
|
var prevWNow = prevW+W, nextWNow = nextW-W;
|
||||||
if(opts.prevWtMin >= prevWNow) {
|
if(opts.prevWtMin >= prevWNow) {
|
||||||
prevWNow = opts.prevWtMin;
|
prevWNow = opts.prevWtMin;
|
||||||
nextWNow = next.outerWidth();
|
nextWNow = next.outerWidth();
|
||||||
}
|
}
|
||||||
if(opts.nextWtMin >= nextWNow) {
|
if(opts.nextWtMin >= nextWNow) {
|
||||||
nextWNow = opts.nextWtMin;
|
nextWNow = opts.nextWtMin;
|
||||||
prevWNow = prev.outerWidth();
|
prevWNow = prev.outerWidth();
|
||||||
}
|
}
|
||||||
if(opts.prevWtMax <= prevWNow) {
|
if(opts.prevWtMax <= prevWNow) {
|
||||||
prevWNow = opts.prevWtMax;
|
prevWNow = opts.prevWtMax;
|
||||||
nextWNow = next.outerWidth();
|
nextWNow = next.outerWidth();
|
||||||
}
|
}
|
||||||
if(opts.nextWtMax <= nextWNow) {
|
if(opts.nextWtMax <= nextWNow) {
|
||||||
nextWNow = opts.nextWtMax;
|
nextWNow = opts.nextWtMax;
|
||||||
prevWNow = prev.outerWidth();
|
prevWNow = prev.outerWidth();
|
||||||
}
|
}
|
||||||
//prev.css("width", prevWNow + 'px');
|
//prev.css("width", prevWNow + 'px');
|
||||||
//next.css("width", nextWNow + 'px');
|
//next.css("width", nextWNow + 'px');
|
||||||
if(typeof opts.onresize == 'function') {
|
if(typeof opts.onresize == 'function') {
|
||||||
opts.onresize(prevWNow, nextWNow);
|
opts.onresize(prevWNow, nextWNow);
|
||||||
}
|
}
|
||||||
}).mouseup(function(ev){
|
}).mouseup(function(ev){
|
||||||
if(!isStart){return;}
|
if(!isStart){return;}
|
||||||
isStart = false;
|
isStart = false;
|
||||||
if(typeof opts.onfinish == 'function') {
|
if(typeof opts.onfinish == 'function') {
|
||||||
opts.onfinish();
|
opts.onfinish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(this).mousedown(function(ev){
|
$(this).mousedown(function(ev){
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
disX = ev.clientX;
|
disX = ev.clientX;
|
||||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||||
prevW = prev.outerWidth();
|
prevW = prev.outerWidth();
|
||||||
nextW = next.outerWidth();
|
nextW = next.outerWidth();
|
||||||
isStart = true;
|
isStart = true;
|
||||||
if(typeof opts.onstart == 'function') {
|
if(typeof opts.onstart == 'function') {
|
||||||
opts.onstart();
|
opts.onstart();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
@@ -1,138 +1,134 @@
|
|||||||
body{width: 100%;height: 100%;margin: 0;padding: 0;}
|
body{width: 100%;height: 100%;margin: 0;padding: 0;}
|
||||||
a:focus{outline:none;}
|
a:focus{outline:none;}
|
||||||
ul{list-style: none;list-style-type: none;}
|
ul{list-style: none;list-style-type: none;}
|
||||||
.tree li a{white-space: nowrap;}
|
.tree li a{white-space: nowrap;}
|
||||||
.tree-menu li > ul{background-color: #f1f1f1;}
|
.tree-menu li > ul{background-color: #f1f1f1;}
|
||||||
.tree-menu li li li li a{padding-left: 68px;}
|
.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 a{padding-left: 88px;}
|
||||||
.tree-menu li li li li li li a{padding-left: 108px;}
|
.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 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 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 a{padding-left: 168px;}
|
||||||
.tree-menu li li li li li li li li li li a{padding-left: 188px;}
|
.tree-menu li li li li li li li li li li a{padding-left: 188px;}
|
||||||
.table td, .table th {vertical-align: middle;}
|
.table td, .table th {vertical-align: middle;}
|
||||||
#tabDocInfo{position: absolute; bottom: 0;top: 60px;overflow-y: auto; right: 0; left: 10px;}
|
#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;}
|
#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;}
|
.local-storage{display: none;}
|
||||||
.tab-online-debug-page .title-info .btn{margin-right: 20px;}
|
|
||||||
.tab-online-debug-page .title-info .text{padding-bottom: 10px;}
|
/**lable的覆盖样式*/
|
||||||
|
.label{font-size: 100%;}
|
||||||
.local-storage{display: none;}
|
.label-warning {background-color: #f9f5ee; color: #f1a325;}
|
||||||
|
label{font-weight: normal;}
|
||||||
/**lable的覆盖样式*/
|
|
||||||
.label{font-size: 100%;}
|
.nav.gray{background-color: #f1f1f1;margin-bottom: 10px;}
|
||||||
.label-warning {background-color: #f9f5ee; color: #f1a325;}
|
|
||||||
label{font-weight: normal;}
|
.doc-table tr .info{text-align: right; width: 100px;}
|
||||||
|
.setting-table tr .info{text-align: right; max-width: 150px;}
|
||||||
.nav.gray{background-color: #f1f1f1;margin-bottom: 10px;}
|
.show-doc span{color: #aaa;}
|
||||||
|
|
||||||
.doc-table tr .info{text-align: right; width: 100px;}
|
.mgresizableW{z-index: 90;height: 100%; width: 10px; cursor: e-resize;}
|
||||||
.setting-table tr .info{text-align: right; max-width: 150px;}
|
.ui-resizable-handle {display: block;font-size: 0.1px;position: absolute;}
|
||||||
.show-doc span{color: #aaa;}
|
#resizableLeftRight{left: 360px;}
|
||||||
|
.unselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
||||||
.mgresizebleW{z-index: 90;height: 100%; width: 10px; cursor: e-resize;}
|
|
||||||
.ui-resizable-handle {display: block;font-size: 0.1px;position: absolute;}
|
#homePageDashboard{overflow-y: auto;bottom: 0;top: 0;right: 0;left: 0;position: absolute;overflow-x: hidden;padding: 10px;}
|
||||||
#resizebleLeftRight{left: 360px;}
|
#homePageDashboard .panel-body{padding: 10px;}
|
||||||
.unselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
.content.about{line-height: 30px;}
|
||||||
|
|
||||||
#homePageDashboard{overflow-y: auto;bottom: 0;top: 0;right: 0;left: 0;position: absolute;overflow-x: hidden;padding: 10px;}
|
#homePageLi{margin-top: 5px;}
|
||||||
#homePageDashboard .panel-body{padding: 10px;}
|
|
||||||
.content.about{line-height: 30px;}
|
.left-body{
|
||||||
|
width: 360px; height:100%; position: fixed; top: 0; bottom: 0; left: 0;
|
||||||
#homePageLi{margin-top: 5px;}
|
}
|
||||||
|
.left-header{
|
||||||
.left-body{
|
background: #3280fc;width: 100%; height:60px;line-height:60px;
|
||||||
width: 360px; height:100%; position: fixed; top: 0; bottom: 0; left: 0;
|
position: absolute; top: 0; bottom: 0; left: 0;text-align: center;
|
||||||
}
|
}
|
||||||
.left-header{
|
.left-header .logo{
|
||||||
background: #3280fc;width: 100%; height:60px;line-height:60px;
|
font-size: 30px;color: #fff;
|
||||||
position: absolute; top: 0; bottom: 0; left: 0;text-align: center;
|
}
|
||||||
}
|
.left-header .icon-bars{
|
||||||
.left-header .logo{
|
font-size: 24px;float: right;margin: 18px 18px 0 0;color: #fff;cursor: pointer;
|
||||||
font-size: 30px;color: #fff;
|
}
|
||||||
}
|
.left-container{
|
||||||
.left-header .icon-bars{
|
width: 100%;position: absolute;background: #f1f1f1;color: rgba(163, 175, 183, .9);
|
||||||
font-size: 24px;float: right;margin: 18px 18px 0 0;color: #fff;cursor: pointer;
|
top: 60px; bottom: 0; left: 0; overflow-y: auto; padding: 10px;
|
||||||
}
|
}
|
||||||
.left-container{
|
.left-container .projects{border: 0px; border-radius: 0px;}
|
||||||
width: 100%;position: absolute;background: #f1f1f1;color: rgba(163, 175, 183, .9);
|
|
||||||
top: 60px; bottom: 0; left: 0; overflow-y: auto; padding: 10px;
|
.right-container{
|
||||||
}
|
position: fixed;top: 0px; bottom: 0; left: 360px; right: 0;padding: 10px;
|
||||||
.left-container .projects{border: 0px; border-radius: 0px;}
|
}
|
||||||
|
|
||||||
.right-container{
|
#docResponseModel td:first-child{width: 100px;}
|
||||||
position: fixed;top: 0px; bottom: 0; left: 360px; right: 0;padding: 10px;
|
#docResponseExample td:first-child{width: 100px;}
|
||||||
}
|
|
||||||
|
.modal-table-box{margin-top: 10px; max-height: 500px;overflow-y: auto;}
|
||||||
#docResponseModel td:first-child{width: 100px;}
|
.modal-table-box{list-style: none;}
|
||||||
#docResponseExample td:first-child{width: 100px;}
|
.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{margin-top: 10px; max-height: 500px;overflow-y: auto;}
|
.modal-table-box li.checked{background-color: #8666b8;color:#fff;}
|
||||||
.modal-table-box{list-style: none;}
|
|
||||||
.modal-table-box ul{padding-left: 10px;}
|
#exportDocumentText{height: 350px;}
|
||||||
.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;}
|
#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;}
|
||||||
#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;}
|
#tabParamBody .tab-content{padding-top: 10px;}
|
||||||
#rightZpages{height: 100%;position: relative;top: 0;bottom: 0;left:0;right: 0;}
|
|
||||||
|
.post-url-box{padding: 10px 0;}
|
||||||
/* 在线调试框样式 */
|
.post-url-box .input-group-btn:nth-child(2) button{border-right: 0;border-radius: 0;}
|
||||||
#tabParamBody .tab-content{padding-top: 10px;}
|
.post-url-box .send-request .hide{display: none;}
|
||||||
|
|
||||||
.post-url-box{padding: 10px 0;}
|
.param-box{}
|
||||||
.post-url-box .input-group-btn:nth-child(2) button{border-right: 0;border-radius: 0;}
|
.param-box .panel-collapse{padding: 10px;}
|
||||||
.post-url-box .send-request .hide{display: none;}
|
.param-box .nav{background-color: #f1f1f1;}
|
||||||
|
/* .param-box .nav > li > *{padding: 8px 25px;} */
|
||||||
.param-box{}
|
.param-box .nav > li > span{position: relative; display: block;background-color: #ccc;padding: 9px 25px;}
|
||||||
.param-box .panel-collapse{padding: 10px;}
|
.param-box .nav > .form-to-url{position: relative; display: block;padding: 10px 0 0 25px;}
|
||||||
.param-box .nav{background-color: #f1f1f1;}
|
.param-box .nav > .form-to-url label{margin: 0;}
|
||||||
/* .param-box .nav > li > *{padding: 8px 25px;} */
|
.param-box .nav > .form-to-url input{margin: 0;}
|
||||||
.param-box .nav > li > span{position: relative; display: block;background-color: #ccc;padding: 9px 25px;}
|
.param-box .tab-content .tab-param-pane{padding: 10px 10px 0 10px;}
|
||||||
.param-box .nav > .form-to-url{position: relative; display: block;padding: 10px 0 0 25px;}
|
.param-box .table.param-table td, .param-box .table.param-table th{padding: 4px 5px;}
|
||||||
.param-box .nav > .form-to-url label{margin: 0;}
|
.param-box .param-table td:first-child{width: 250px;}
|
||||||
.param-box .nav > .form-to-url input{margin: 0;}
|
.param-box .param-table tbody td:nth-child(2){border-right: 0;}
|
||||||
.param-box .tab-content .tab-param-pane{padding: 10px 10px 0 10px;}
|
.param-box .param-table tbody td:nth-child(3){border-left: 0;padding: 0 10px 0 0;width: 10px;}
|
||||||
.param-box .table.param-table td, .param-box .table.param-table th{padding: 4px 5px;}
|
.param-box .param-table tbody td:nth-child(3) i{cursor: pointer;color: #ccc;}
|
||||||
.param-box .param-table td:first-child{width: 250px;}
|
.param-box .param-table tbody td:nth-child(3) i:hover{color: #888;}
|
||||||
.param-box .param-table tbody td:nth-child(2){border-right: 0;}
|
.param-box .param-table tbody tr.base td:last-child i{display: none;}
|
||||||
.param-box .param-table tbody td:nth-child(3){border-left: 0;padding: 0 10px 0 0;width: 10px;}
|
#bulkEditHeaderCheck{margin-left: 10px;}
|
||||||
.param-box .param-table tbody td:nth-child(3) i{cursor: pointer;color: #ccc;}
|
#bulkEditHeader,#bulkEditForm{display: none;}
|
||||||
.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;}
|
.response-box{margin-top: 20px;}
|
||||||
#bulkEditHeaderCheck{margin-left: 10px;}
|
.response-box .nav > li > *{padding: 8px 25px;}
|
||||||
#bulkEditHeader,#bulkEditForm{display: none;}
|
.response-box .nav > li span{position: relative; display: block;padding: 9px 25px;}
|
||||||
|
.response-box .nav > li.info span{background-color: #ccc;}
|
||||||
.response-box{margin-top: 20px;}
|
.response-box .nav > li.right{float: right;}
|
||||||
.response-box .nav > li > *{padding: 8px 25px;}
|
.response-box .nav > li.right i{color: #3280fc;}
|
||||||
.response-box .nav > li span{position: relative; display: block;padding: 9px 25px;}
|
.response-box .nav{background-color: #f1f1f1;}
|
||||||
.response-box .nav > li.info span{background-color: #ccc;}
|
.response-box .tab-content .tab-response-pane{padding: 10px;}
|
||||||
.response-box .nav > li.right{float: right;}
|
|
||||||
.response-box .nav > li.right i{color: #3280fc;}
|
#responseBodyJsonIframe{width: 100%;height: 300px;border: 0;}
|
||||||
.response-box .nav{background-color: #f1f1f1;}
|
|
||||||
.response-box .tab-content .tab-response-pane{padding: 10px;}
|
/* S-模拟请求 */
|
||||||
|
#tabSimulationResult{padding: 10px 0;}
|
||||||
#responseBodyJsonIframe{width: 100%;height: 300px;border: 0;}
|
/* E-模拟请求 */
|
||||||
|
|
||||||
/* S-模拟请求 */
|
/* S-JSON展示的样式 */
|
||||||
#tabSimulationResult{padding: 10px 0;}
|
pre.json{margin-top:0px;margin-bottom:0px;}
|
||||||
/* E-模拟请求 */
|
pre.json .canvas{font:10pt georgia;background-color:#ececec;color:#000000;border:1px solid #cecece;}
|
||||||
|
pre.json .object-brace{color:#00aa00;font-weight:bold;}
|
||||||
/* S-JSON展示的样式 */
|
pre.json .array-brace{color:#0033ff;font-weight:bold;}
|
||||||
pre.json{margin-top:0px;margin-bottom:0px;}
|
pre.json .property-name{color:#cc0000;font-weight:bold;}
|
||||||
pre.json .canvas{font:10pt georgia;background-color:#ececec;color:#000000;border:1px solid #cecece;}
|
pre.json .string{color:#007777;}
|
||||||
pre.json .object-brace{color:#00aa00;font-weight:bold;}
|
pre.json .number{color:#aa00aa;}
|
||||||
pre.json .array-brace{color:#0033ff;font-weight:bold;}
|
pre.json .boolean{color:#0000ff;}
|
||||||
pre.json .property-name{color:#cc0000;font-weight:bold;}
|
pre.json .function{color:#aa6633;text-decoration:italic;}
|
||||||
pre.json .string{color:#007777;}
|
pre.json .null{color:#0000ff;}
|
||||||
pre.json .number{color:#aa00aa;}
|
pre.json .comma{color:#000000;font-weight:bold;}
|
||||||
pre.json .boolean{color:#0000ff;}
|
pre.json .annotation{color:#aaa;}
|
||||||
pre.json .function{color:#aa6633;text-decoration:italic;}
|
pre img{cursor: pointer;}
|
||||||
pre.json .null{color:#0000ff;}
|
/* E-JSON展示的样式 */
|
||||||
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) {
|
function deserialize(value) {
|
||||||
if (typeof value !== 'string' || isEmpty(value)) {
|
if (typeof value !== 'string' || isEmpty(value)) {
|
||||||
return undefined;
|
return value;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
return JSON.parse(value);
|
return JSON.parse(value);
|
||||||
@@ -266,6 +266,29 @@ String.prototype.startWith = function(str) {
|
|||||||
return (this.substr(0, str.length) == 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
|
* 获取父窗口的exports
|
||||||
* @returns
|
* @returns
|
||||||
|
|||||||
@@ -2,4 +2,5 @@ var cacheKeys = {
|
|||||||
userSettings: 'userSettings',
|
userSettings: 'userSettings',
|
||||||
swaggerResourcesList: 'swagger-resources-list',
|
swaggerResourcesList: 'swagger-resources-list',
|
||||||
globalParamList: 'zyplayer-doc-global-param-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 暮光:城中城
|
* @author 暮光:城中城
|
||||||
* @since 2017年5月7日
|
* @since 2017年5月7日
|
||||||
*/
|
*/
|
||||||
(function($){
|
(function($){
|
||||||
$.fn.mgResizebleHeight = function(options) {
|
$.fn.mgResizableHeight = function(options) {
|
||||||
var defaults = {prev:this,next:this, prevHtMin:0, prevHtMax:999, nextHtMin:0, nextHtMax:999};
|
var defaults = {prev:this,next:this, prevHtMin:0, prevHtMax:999, nextHtMin:0, nextHtMax:999};
|
||||||
var opts = $.extend(defaults, options);
|
var opts = $.extend(defaults, options);
|
||||||
var disY = 0, prevH = 0, nextH = 0, isStart = false;
|
var disY = 0, prevH = 0, nextH = 0, isStart = false;
|
||||||
var prev, next, thisObj = this;
|
var prev, next, thisObj = this;
|
||||||
$(document).mousemove(function(ev){
|
$(document).mousemove(function(ev){
|
||||||
if(!isStart){return;}
|
if(!isStart){return;}
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
var H = ev.clientY - disY;
|
var H = ev.clientY - disY;
|
||||||
var prevHNow = prevH+H, nextHNow = nextH-H;
|
var prevHNow = prevH+H, nextHNow = nextH-H;
|
||||||
if(opts.prevHtMin >= prevHNow) {
|
if(opts.prevHtMin >= prevHNow) {
|
||||||
prevHNow = opts.prevHtMin;
|
prevHNow = opts.prevHtMin;
|
||||||
nextHNow = next.outerHeight();
|
nextHNow = next.outerHeight();
|
||||||
}
|
}
|
||||||
if(opts.nextHtMin >= nextHNow) {
|
if(opts.nextHtMin >= nextHNow) {
|
||||||
nextHNow = opts.nextHtMin;
|
nextHNow = opts.nextHtMin;
|
||||||
prevHNow = prev.outerHeight();
|
prevHNow = prev.outerHeight();
|
||||||
}
|
}
|
||||||
if(opts.prevHtMax <= prevHNow) {
|
if(opts.prevHtMax <= prevHNow) {
|
||||||
prevHNow = opts.prevHtMax;
|
prevHNow = opts.prevHtMax;
|
||||||
nextHNow = next.outerHeight();
|
nextHNow = next.outerHeight();
|
||||||
}
|
}
|
||||||
if(opts.nextHtMax <= nextHNow) {
|
if(opts.nextHtMax <= nextHNow) {
|
||||||
nextHNow = opts.nextHtMax;
|
nextHNow = opts.nextHtMax;
|
||||||
prevHNow = prev.outerHeight();
|
prevHNow = prev.outerHeight();
|
||||||
}
|
}
|
||||||
//prev.css("height", prevHNow + 'px');
|
//prev.css("height", prevHNow + 'px');
|
||||||
//next.css("height", nextHNow + 'px');
|
//next.css("height", nextHNow + 'px');
|
||||||
if(typeof opts.onresize == 'function') {
|
if(typeof opts.onresize == 'function') {
|
||||||
opts.onresize(prevHNow, nextHNow);
|
opts.onresize(prevHNow, nextHNow);
|
||||||
}
|
}
|
||||||
}).mouseup(function(ev){
|
}).mouseup(function(ev){
|
||||||
isStart = false;
|
isStart = false;
|
||||||
});
|
});
|
||||||
$(this).mousedown(function(ev){
|
$(this).mousedown(function(ev){
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
disY = ev.clientY;
|
disY = ev.clientY;
|
||||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||||
prevH = prev.outerHeight();
|
prevH = prev.outerHeight();
|
||||||
nextH = next.outerHeight();
|
nextH = next.outerHeight();
|
||||||
isStart = true;
|
isStart = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 改变宽度的功能,只是实现各种消息的通知,实际改变大小需要在回调里面自己操作
|
* 改变宽度的功能,只是实现各种消息的通知,实际改变大小需要在回调里面自己操作
|
||||||
*/
|
*/
|
||||||
$.fn.mgResizebleWidth = function(options) {
|
$.fn.mgResizableWidth = function(options) {
|
||||||
var defaults = {prev:this,next:this, prevWtMin:0, prevWtMax:999, nextWtMin:0, nextWtMax:999};
|
var defaults = {prev:this,next:this, prevWtMin:0, prevWtMax:999, nextWtMin:0, nextWtMax:999};
|
||||||
var opts = $.extend(defaults, options);
|
var opts = $.extend(defaults, options);
|
||||||
var disX = 0, prevW = 0, nextW = 0, isStart = false;
|
var disX = 0, prevW = 0, nextW = 0, isStart = false;
|
||||||
var prev, next, thisObj = this;
|
var prev, next, thisObj = this;
|
||||||
$(document).mousemove(function(ev){
|
$(document).mousemove(function(ev){
|
||||||
if(!isStart){return;}
|
if(!isStart){return;}
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
var W = ev.clientX - disX;
|
var W = ev.clientX - disX;
|
||||||
var prevWNow = prevW+W, nextWNow = nextW-W;
|
var prevWNow = prevW+W, nextWNow = nextW-W;
|
||||||
if(opts.prevWtMin >= prevWNow) {
|
if(opts.prevWtMin >= prevWNow) {
|
||||||
prevWNow = opts.prevWtMin;
|
prevWNow = opts.prevWtMin;
|
||||||
nextWNow = next.outerWidth();
|
nextWNow = next.outerWidth();
|
||||||
}
|
}
|
||||||
if(opts.nextWtMin >= nextWNow) {
|
if(opts.nextWtMin >= nextWNow) {
|
||||||
nextWNow = opts.nextWtMin;
|
nextWNow = opts.nextWtMin;
|
||||||
prevWNow = prev.outerWidth();
|
prevWNow = prev.outerWidth();
|
||||||
}
|
}
|
||||||
if(opts.prevWtMax <= prevWNow) {
|
if(opts.prevWtMax <= prevWNow) {
|
||||||
prevWNow = opts.prevWtMax;
|
prevWNow = opts.prevWtMax;
|
||||||
nextWNow = next.outerWidth();
|
nextWNow = next.outerWidth();
|
||||||
}
|
}
|
||||||
if(opts.nextWtMax <= nextWNow) {
|
if(opts.nextWtMax <= nextWNow) {
|
||||||
nextWNow = opts.nextWtMax;
|
nextWNow = opts.nextWtMax;
|
||||||
prevWNow = prev.outerWidth();
|
prevWNow = prev.outerWidth();
|
||||||
}
|
}
|
||||||
//prev.css("width", prevWNow + 'px');
|
//prev.css("width", prevWNow + 'px');
|
||||||
//next.css("width", nextWNow + 'px');
|
//next.css("width", nextWNow + 'px');
|
||||||
if(typeof opts.onresize == 'function') {
|
if(typeof opts.onresize == 'function') {
|
||||||
opts.onresize(prevWNow, nextWNow);
|
opts.onresize(prevWNow, nextWNow);
|
||||||
}
|
}
|
||||||
}).mouseup(function(ev){
|
}).mouseup(function(ev){
|
||||||
if(!isStart){return;}
|
if(!isStart){return;}
|
||||||
isStart = false;
|
isStart = false;
|
||||||
if(typeof opts.onfinish == 'function') {
|
if(typeof opts.onfinish == 'function') {
|
||||||
opts.onfinish();
|
opts.onfinish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$(this).mousedown(function(ev){
|
$(this).mousedown(function(ev){
|
||||||
var ev = ev || window.event;
|
var ev = ev || window.event;
|
||||||
disX = ev.clientX;
|
disX = ev.clientX;
|
||||||
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
prev = (opts.prev == thisObj)?$(opts.prev).prev():$(opts.prev);
|
||||||
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
next = (opts.next == thisObj)?$(opts.next).next():$(opts.next);
|
||||||
prevW = prev.outerWidth();
|
prevW = prev.outerWidth();
|
||||||
nextW = next.outerWidth();
|
nextW = next.outerWidth();
|
||||||
isStart = true;
|
isStart = true;
|
||||||
if(typeof opts.onstart == 'function') {
|
if(typeof opts.onstart == 'function') {
|
||||||
opts.onstart();
|
opts.onstart();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
@@ -1,37 +1,94 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html xmlns:v-on="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>调试数据管理</title>
|
<title>调试数据管理</title>
|
||||||
<link rel="stylesheet" type="text/css" href="../zui/css/zui.min.css">
|
<link rel="stylesheet" type="text/css" href="../zui/css/zui.min.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
调试数据管理
|
<div class="title-info">
|
||||||
</div>
|
<div class="alert alert-primary">
|
||||||
</body>
|
<div class="content">Tips:每次点击在线调试的发送请求后,都会默认保存一次请求的form、header、body数据,以备下次使用,在此页面可以管理这些数据</div>
|
||||||
<script src="../zui/js/zui.min.js"></script>
|
</div>
|
||||||
<script src="../mg-ui/js/jquery-3.1.0.min.js"></script>
|
</div>
|
||||||
<script src="../vue/vue.js"></script>
|
<table class="table table-bordered" id="onlineDebugParamTable">
|
||||||
|
<thead>
|
||||||
<script>
|
<tr><th>接口地址</th><th>参数配置</th><th>操作</th></tr>
|
||||||
var app = new Vue({
|
</thead>
|
||||||
el: '#app',
|
<tbody>
|
||||||
data: {
|
<tr v-for="(item,index) in debugDataList" :key="item.id" :data-id="item.id" :data-index="index" >
|
||||||
userId: "",
|
<td>{{item.key}}</td>
|
||||||
},
|
<td>{{item.value}}</td>
|
||||||
methods: {
|
<td>
|
||||||
|
<button class="btn btn-danger" type="button" v-on:click="deleteDebugData($event)">删除</button>
|
||||||
}
|
</td>
|
||||||
});
|
</tr>
|
||||||
</script>
|
<tr>
|
||||||
|
<td colspan="3" align="center">
|
||||||
<style>
|
<button class="btn" type="button" v-on:click="btnRefreshList"> 刷新 </button>
|
||||||
|
</td>
|
||||||
</style>
|
</tr>
|
||||||
</html>
|
</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