格式化前端代码
This commit is contained in:
@ -1,22 +1,22 @@
|
||||
|
||||
$(function() {
|
||||
validateKickout();
|
||||
validateKickout();
|
||||
validateRule();
|
||||
$('.imgcode').click(function() {
|
||||
var url = ctx + "captcha/captchaImage?type=" + captchaType + "&s=" + Math.random();
|
||||
$(".imgcode").attr("src", url);
|
||||
});
|
||||
$('.imgcode').click(function() {
|
||||
var url = ctx + "captcha/captchaImage?type=" + captchaType + "&s=" + Math.random();
|
||||
$(".imgcode").attr("src", url);
|
||||
});
|
||||
});
|
||||
|
||||
$.validator.setDefaults({
|
||||
submitHandler: function() {
|
||||
login();
|
||||
login();
|
||||
}
|
||||
});
|
||||
|
||||
function login() {
|
||||
$.modal.loading($("#btnSubmit").data("loading"));
|
||||
var username = $.common.trim($("input[name='username']").val());
|
||||
$.modal.loading($("#btnSubmit").data("loading"));
|
||||
var username = $.common.trim($("input[name='username']").val());
|
||||
var password = $.common.trim($("input[name='password']").val());
|
||||
var validateCode = $("input[name='validateCode']").val();
|
||||
var rememberMe = $("input[name='rememberme']").is(':checked');
|
||||
@ -65,26 +65,26 @@ function validateRule() {
|
||||
}
|
||||
|
||||
function validateKickout() {
|
||||
if (getParam("kickout") == 1) {
|
||||
layer.alert("<font color='red'>您已在别处登录,请您修改密码或重新登录</font>", {
|
||||
icon: 0,
|
||||
title: "系统提示"
|
||||
},
|
||||
function(index) {
|
||||
//关闭弹窗
|
||||
layer.close(index);
|
||||
if (top != self) {
|
||||
top.location = self.location;
|
||||
} else {
|
||||
var url = location.search;
|
||||
if (url) {
|
||||
var oldUrl = window.location.href;
|
||||
var newUrl = oldUrl.substring(0, oldUrl.indexOf('?'));
|
||||
self.location = newUrl;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (getParam("kickout") == 1) {
|
||||
layer.alert("<font color='red'>您已在别处登录,请您修改密码或重新登录</font>", {
|
||||
icon: 0,
|
||||
title: "系统提示"
|
||||
},
|
||||
function(index) {
|
||||
//关闭弹窗
|
||||
layer.close(index);
|
||||
if (top != self) {
|
||||
top.location = self.location;
|
||||
} else {
|
||||
var url = location.search;
|
||||
if (url) {
|
||||
var oldUrl = window.location.href;
|
||||
var newUrl = oldUrl.substring(0, oldUrl.indexOf('?'));
|
||||
self.location = newUrl;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getParam(paramName) {
|
||||
|
Reference in New Issue
Block a user