若依 4.2

This commit is contained in:
RuoYi
2020-03-23 09:02:04 +08:00
parent 5c736e96c9
commit d066539616
60 changed files with 745 additions and 121 deletions

View File

@ -644,7 +644,7 @@ label {
margin: 5px 15px 5px 0px;
}
.select-list li p, .select-list li label{
.select-list li p, .select-list li label:not(.radio-box){
float: left;
width: 65px;
margin: 5px 5px 5px 0px;

View File

@ -13,10 +13,10 @@ $(function() {
// MetsiMenu
$('#side-menu').metisMenu();
//固定菜单栏
// 固定菜单栏
$(function() {
$('.sidebar-collapse').slimScroll({
height: '100%',
height: '96%',
railOpacity: 0.9,
alwaysVisible: false
});

View File

@ -359,7 +359,6 @@ var table = {
} else{
$("#" + table.options.id).bootstrapTable('refresh', params);
}
data = {};
},
// 导出数据
exportExcel: function(formId) {

View File

@ -26,7 +26,7 @@ function login() {
data: {
"username": username,
"password": password,
"validateCode" : validateCode,
"validateCode": validateCode,
"rememberMe": rememberMe
},
success: function(r) {

View File

@ -0,0 +1,82 @@
$(function() {
validateRule();
$('.imgcode').click(function() {
var url = ctx + "captcha/captchaImage?type=" + captchaType + "&s=" + Math.random();
$(".imgcode").attr("src", url);
});
});
$.validator.setDefaults({
submitHandler: function() {
register();
}
});
function register() {
$.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();
$.ajax({
type: "post",
url: ctx + "register",
data: {
"loginName": username,
"password": password,
"validateCode": validateCode
},
success: function(r) {
if (r.code == 0) {
layer.alert("<font color='red'>恭喜你,您的账号 " + username + " 注册成功!</font>", {
icon: 1,
title: "系统提示"
},
function(index) {
//关闭弹窗
layer.close(index);
location.href = ctx + 'login';
});
} else {
$.modal.closeLoading();
$('.imgcode').click();
$(".code").val("");
$.modal.msg(r.msg);
}
}
});
}
function validateRule() {
var icon = "<i class='fa fa-times-circle'></i> ";
$("#registerForm").validate({
rules: {
username: {
required: true,
minlength: 2
},
password: {
required: true,
minlength: 5
},
confirmPassword: {
required: true,
equalTo: "[name='password']"
}
},
messages: {
username: {
required: icon + "请输入您的用户名",
minlength: icon + "用户名不能小于2个字符"
},
password: {
required: icon + "请输入您的密码",
minlength: icon + "密码不能小于5个字符",
},
confirmPassword: {
required: icon + "请再次输入您的密码",
equalTo: icon + "两次密码输入不一致"
}
}
})
}