Commit 0fe52011 authored by Huang's avatar Huang
Browse files

no commit message

parent e2a64d42
$(document).ready(function(){
getCount();
});
$(function () {
App.setbasePath("../");
App.setGlobalImgPath("dist/img/");
addTabs({
id: '10008',
title: '<i class="fa fa-home"></i>首页',
close: false,
url: '/admin/home',//
urlType: "http"
});
/*addTabs({
id: '10009',
title: '论坛社区',
close: false,
url: 'https://jeespring.kf5.com/hc/community/topic/',
urlType: "http"
});*/
/*addTabs({
id: '10010',
title: '网站首页',
close: false,
url: '/cms',
urlType: "http"
});*/
activeTabByPageId(10008);
})
function getCount(){
$.ajax({
type: "GET",
url: "/rest/redis/getCount",
success: function(data){
data=eval(data);
$("#cancleRedis").html("清除缓存("+data.RESULT+")");
}
});
$.ajax({
type: "GET",
url: "/rest/redis/getCountShiro",
success: function(data){
data=eval(data);
$("#cancleShiroRedis").html("清除单点登录缓存("+data.RESULT+")");
}
});
$.ajax({
type: "GET",
url: "/rest/redis/getExpire",
success: function(data){
data=eval(data);
$("#getExpire").html("缓存有效时间("+data.RESULT+")");
}
});
$.ajax({
type: "GET",
url: "/rest/redis/getExpireShiro",
success: function(data){
data=eval(data);
$("#getExpireShiro").html("单点登录缓存有效时间("+data.RESULT+")");
}
});
$.ajax({
type: "GET",
url: "/rest/oauth/getApiTimeLimi",
success: function(data){
data=eval(data);
$("#getApiTimeLimi").html("访问次数("+data.MESSAGE+")");
}
});
$.ajax({
type: "GET",
url: "/rest/oauth/getApiTime",
success: function(data){
data=eval(data);
$("#getApiTime").html("调用次数("+data.MESSAGE+")");
}
});
$.ajax({
type: "GET",
url: "/rest/oauth/userOnlineAmount",
success: function(data){
data=eval(data);
$("#userOnlineAmount").html("在线人数("+data.MESSAGE+")");
}
});
}
// 清除缓存
function cancleRedis() {
$.ajax({url:"/rest/redis/removePattern",async:false});
getCount()
}
function cancleShiroRedis() {
$.ajax({url:"/rest/redis/removePatternShiroRedis",async:false});
getCount()
}
function search_menu() {
//要搜索的值
var text = $('input[name=q]').val();
if(text=="") return;
var $ul = $('.sidebar-menu');
$ul.find("a.nav-link").each(function () {
var $a = $(this).css("border", "");
//判断是否含有要搜索的字符串
if ($a.children("span.nav-label").text().indexOf(text) >= 0) {
//如果a标签的父级是隐藏的就展开
$ul = $a.parents("ul");
if ($ul.is(":hidden")) {
$a.parents("ul").prev().click();
}
//点击该菜单
$a.click().css("border", "1px solid #777");
// return false;
}
});
}
\ No newline at end of file
/* Validation */
label.error {
color: #cc5965;
display: inline-block;
margin-left: 5px;
}
.login-page {
overflow: hidden;
padding: 0px;
background-position: center;
}
#logo{
width: 150px;height: 150px;
}
#vid {
display: none;
background-color: white;
opacity: 1;
visibility: visible;
position: absolute;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
height: 100%;
width: 100%;
object-fit: cover;
object-position: center center;
}
#menu {
z-index: 10000;
position: absolute;
top: 0px;
left: 0px;
border-radius: 3px;
padding: 10px;
width: 100%;
margin: auto 50px;
}
#loginForm{
background: rgba(255,255,255,.2);border: 1px solid rgba(255,255,255,.3);border-radius: 3px;padding: 30px;
}
#hplaT{
position: absolute;bottom: 0px;right: 0px;/* background: rgba(255,255,255,.2); */border: 1px solid rgba(255,255,255,.3);border-radius: 3px;padding: 10px;width: 30%;
}
if (window.top !== window.self) {
window.top.location = window.location;
}
$(document).ready(function () {
readyInfo();
$("#loginForm").validate({
rules: {
validateCode: {remote: "/servlet/validateCodeServlet"}
},
messages: {
username: {required: "请填写用户名!"}, password: {required: "请填写密码!"},
validateCode: {remote: "验证码不正确!", required: "请填写验证码!"}
},
//errorLabelContainer: "#messageBox",
errorPlacement: function (error, element) {
error.insertAfter(element);
}
});
});
// 如果在框架或在对话框中,则弹出提示并跳转到首页
if (self.frameElement && self.frameElement.tagName == "IFRAME" || $('#left').length > 0 || $('.jbox').length > 0) {
alert('未登录或登录超时。请重新登录,谢谢!');
top.location = "/admin";
}
function readyInfo() {
$('#vid').hide();
//$('#loginPage').hide();
var hplaTtl = [
"侏罗纪海岸<br>英国南部英吉利海峡"
, "短耳朵的大兔子<br>肯尼亚,马拉北部保护区"
, "超质感流线型身躯<br>美国,克里斯特尔里弗"
, "跃动的蒙德里安<br>美国,纽约"
, "纯净之地<br>美国,苏必利尔湖"
, "历史积淀雄厚的城市<br>挪威,特隆赫姆"
, "牦牛<br>西藏"
, "金毛<br>昆虫"
, "岩洞<br>美国岩洞"
, "彩蛋农场<br>法国农场"
, "温顺可人的大家伙 <br>美国,林恩运河"
, "我愿迷失在这阑珊灯火中<br>葡萄牙,辛特拉市"
, "舒缓湖景<br>中国"
, "足球界的最高表彰<br>挪威,亨宁斯韦尔"
, "圣洁之地<br>德国,赖兴瑙岛"
, "终极旅行目的地<br>南极洲,佩诺拉海峡"
];
var random = Math.floor(Math.random() * (16 - 1 + 1) + 1);
var loginImgUrl = "../staticViews/index/images/loginImg" + random + ".jpg";
$(".login-page").css("background-image", "url(" + loginImgUrl + ")");
$(".login-page").css("background-size", "cover");
if (hplaTtl.length >= random) {
$("#hplaTtl").html(hplaTtl[random - 1]);
$(".search").attr("href", "https://cn.bing.com/search?q=" + hplaTtl[random - 1].replace("<br>", " "));
}
//$("#logo").attr("src", "../static/common/login/images/flat-avatar" + Math.floor(Math.random() * (1 - 1 + 1) + 1) + ".png");
random = Math.floor(Math.random() * (1 - 1 + 1) + 1);
$("#vid").attr("src", "../staticViews/index/images/flat-avatar" + random + ".mp4");
//$('#loginPage').show(1000);
}
setTimeout(function () {
$('#vid').show(888);
}, 3000);
\ No newline at end of file
var validateForm;
function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
if(validateForm.form()){
$("#inputForm").submit();
return true;
}
return false;
}
$(document).ready(function() {
validateForm = $("#inputForm").validate({
submitHandler: function(form){
loading('正在提交,请稍等...');
form.submit();
/*top.closeSelectTabs()*/
/*$.ajax({
url:$("#inputForm").attr("action"),type:"POST",data:$("#inputForm").serialize(),async:false,
success:function(data){},
error:function(data){}
});*/
},
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
}
}
});
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment