作者 lianghiu

多选功能添加

... ... @@ -251,15 +251,11 @@
}
});
$('.time-box').on('click', '.acv', function () {
for (var i = 0; i < $(".time-box .acv").length; i++) {
$(".time-box .acv")[i].setAttribute("class", "acv");
if($(this).attr("class") == "acv"){
$(this).attr("class", "acv bg-colo");
}else{
$(this).attr("class", "acv");
}
$(this).attr("class", "acv bg-colo");
// if ($(this).attr('class') == 'acv bg-colo') {
// $(this).attr('class', 'acv');
// } else {
// $(this).attr('class', 'acv bg-colo');
// }
});
$('.save').click(function () {
var list = $('.bg-colo');
... ... @@ -274,22 +270,25 @@
} else {
var teacher_id = $('#teacher').val();
var time_id = $('#time').val().split('-').join('');
$.ajax({
url: "{:url('seting_do')}",
data: {
teach_id: teacher_id,
day: time_id.replace(/(\d{4})(\d{2})(\d{2})/, "$1-$2-$3"),
begin: parseInt(put_list[0].innerHTML.split("-")[0]),
end: parseInt(put_list[0].innerHTML.split("-")[1])
},
success: function (res) {
console.log(res);
if (res.code == "1") {
layer.msg(res.msg);
window.location.reload();
for(var q = 0;q<put_list.length;q++){
$.ajax({
url: "{:url('seting_do')}",
data: {
teach_id: teacher_id,
day: time_id.replace(/(\d{4})(\d{2})(\d{2})/, "$1-$2-$3"),
begin: parseInt(put_list[q].innerHTML.split("-")[0]),
end: parseInt(put_list[q].innerHTML.split("-")[1])
},
success: function (res) {
console.log(res);
if (res.code == "1") {
layer.msg(res.msg);
window.location.reload();
}
}
}
});
});
}
}
});
setCookie("refersh_time", 0);
... ...