优化代码

This commit is contained in:
RuoYi
2018-04-25 22:16:41 +08:00
parent e384582504
commit 4bb10357f6
15 changed files with 50 additions and 72 deletions

View File

@ -65,10 +65,7 @@ _ajax_save = function(url, data) {
};
//对jquery的ajax方法再次封装
_ajax = function(url, data, type, r) {
if (!r) {
return;
}
_ajax = function(url, data, type) {
var config = {
url: url,
type: type,
@ -102,20 +99,6 @@ function handleSuccess(result) {
}
}
$(document).ready(function() {
$(".onoffswitch-checkbox").on('click', function(){
clickSwitch()
});
var clickSwitch = function() {
if ($(".onoffswitch-checkbox").is(':checked')) {
alert("在ON的状态下");
} else {
alert("在OFF的状态下");
}
};
});
/** 时间格式化 */
function formatDate(_date, _pattern) {
var date = new Date(_date);