正在显示
1 个修改的文件
包含
22 行增加
和
23 行删除
@@ -251,15 +251,11 @@ | @@ -251,15 +251,11 @@ | ||
251 | } | 251 | } |
252 | }); | 252 | }); |
253 | $('.time-box').on('click', '.acv', function () { | 253 | $('.time-box').on('click', '.acv', function () { |
254 | - for (var i = 0; i < $(".time-box .acv").length; i++) { | ||
255 | - $(".time-box .acv")[i].setAttribute("class", "acv"); | 254 | + if($(this).attr("class") == "acv"){ |
255 | + $(this).attr("class", "acv bg-colo"); | ||
256 | + }else{ | ||
257 | + $(this).attr("class", "acv"); | ||
256 | } | 258 | } |
257 | - $(this).attr("class", "acv bg-colo"); | ||
258 | -// if ($(this).attr('class') == 'acv bg-colo') { | ||
259 | -// $(this).attr('class', 'acv'); | ||
260 | -// } else { | ||
261 | -// $(this).attr('class', 'acv bg-colo'); | ||
262 | -// } | ||
263 | }); | 259 | }); |
264 | $('.save').click(function () { | 260 | $('.save').click(function () { |
265 | var list = $('.bg-colo'); | 261 | var list = $('.bg-colo'); |
@@ -274,22 +270,25 @@ | @@ -274,22 +270,25 @@ | ||
274 | } else { | 270 | } else { |
275 | var teacher_id = $('#teacher').val(); | 271 | var teacher_id = $('#teacher').val(); |
276 | var time_id = $('#time').val().split('-').join(''); | 272 | var time_id = $('#time').val().split('-').join(''); |
277 | - $.ajax({ | ||
278 | - url: "{:url('seting_do')}", | ||
279 | - data: { | ||
280 | - teach_id: teacher_id, | ||
281 | - day: time_id.replace(/(\d{4})(\d{2})(\d{2})/, "$1-$2-$3"), | ||
282 | - begin: parseInt(put_list[0].innerHTML.split("-")[0]), | ||
283 | - end: parseInt(put_list[0].innerHTML.split("-")[1]) | ||
284 | - }, | ||
285 | - success: function (res) { | ||
286 | - console.log(res); | ||
287 | - if (res.code == "1") { | ||
288 | - layer.msg(res.msg); | ||
289 | - window.location.reload(); | 273 | + for(var q = 0;q<put_list.length;q++){ |
274 | + $.ajax({ | ||
275 | + url: "{:url('seting_do')}", | ||
276 | + data: { | ||
277 | + teach_id: teacher_id, | ||
278 | + day: time_id.replace(/(\d{4})(\d{2})(\d{2})/, "$1-$2-$3"), | ||
279 | + begin: parseInt(put_list[q].innerHTML.split("-")[0]), | ||
280 | + end: parseInt(put_list[q].innerHTML.split("-")[1]) | ||
281 | + }, | ||
282 | + success: function (res) { | ||
283 | + console.log(res); | ||
284 | + if (res.code == "1") { | ||
285 | + layer.msg(res.msg); | ||
286 | + window.location.reload(); | ||
287 | + } | ||
290 | } | 288 | } |
291 | - } | ||
292 | - }); | 289 | + }); |
290 | + } | ||
291 | + | ||
293 | } | 292 | } |
294 | }); | 293 | }); |
295 | setCookie("refersh_time", 0); | 294 | setCookie("refersh_time", 0); |
-
请 注册 或 登录 后发表评论