|
@@ -204,7 +204,7 @@ |
|
@@ -204,7 +204,7 @@ |
204
|
|
204
|
|
205
|
<!--弹跳框-->
|
205
|
<!--弹跳框-->
|
206
|
<div class="full_bg"></div>
|
206
|
<div class="full_bg"></div>
|
207
|
-<div class="yu_tan">
|
207
|
+<div class="yu_tan" data-qr="1">
|
208
|
<div class="yu_tan_box">
|
208
|
<div class="yu_tan_box">
|
209
|
<img src="/static/image/tan_car1.png" class="tan_car"/>
|
209
|
<img src="/static/image/tan_car1.png" class="tan_car"/>
|
210
|
<h1 class="tan_text">您确定要预约08:00~09:00张教练的课程吗</h1>
|
210
|
<h1 class="tan_text">您确定要预约08:00~09:00张教练的课程吗</h1>
|
|
@@ -354,30 +354,36 @@ |
|
@@ -354,30 +354,36 @@ |
354
|
}
|
354
|
}
|
355
|
});
|
355
|
});
|
356
|
$("#btn_yuyue").click(function () {
|
356
|
$("#btn_yuyue").click(function () {
|
357
|
- var list = $('.time_bg_icon');
|
|
|
358
|
- var day1 = $('.day_bg i').text();
|
|
|
359
|
- var week = $('.day_bg b').text();
|
|
|
360
|
- var hour1 = $('.time_bg_icon b').text();
|
|
|
361
|
- var data_day = $('.day_bg i').attr("data-day").replace(/(\d{4})(\d{2})(\d{2})/, "$1-$2-$3");
|
|
|
362
|
- var data_index = $('.time_bg_icon').length == 0 ? true : false;
|
|
|
363
|
- if (data_index) {
|
|
|
364
|
- layer.msg("请选择时间段!");
|
|
|
365
|
- } else {
|
|
|
366
|
- $.ajax({
|
|
|
367
|
- url: "/user/yuyue/yueyue_do",
|
|
|
368
|
- type: "post",
|
|
|
369
|
- data: {
|
|
|
370
|
- day: data_day,
|
|
|
371
|
- week: week,
|
|
|
372
|
- begin: parseInt(list[0].getElementsByTagName('b')[0].innerHTML.split("-")[0]),
|
|
|
373
|
- end: parseInt(list[list.length - 1].getElementsByTagName('b')[0].innerHTML.split('-')[1])
|
|
|
374
|
- }, success: function (res) {
|
|
|
375
|
- console.log(res);
|
|
|
376
|
- if (res.code == "1") {
|
|
|
377
|
- window.location.href = "/user/yuyue/coach_list";
|
357
|
+
|
|
|
358
|
+ var data_qr = $('.yu_tan').attr("data-qr");
|
|
|
359
|
+ if (data_qr == 1) {
|
|
|
360
|
+ var list = $('.time_bg_icon');
|
|
|
361
|
+ var day1 = $('.day_bg i').text();
|
|
|
362
|
+ var week = $('.day_bg b').text();
|
|
|
363
|
+ var hour1 = $('.time_bg_icon b').text();
|
|
|
364
|
+ var data_day = $('.day_bg i').attr("data-day").replace(/(\d{4})(\d{2})(\d{2})/, "$1-$2-$3");
|
|
|
365
|
+ var data_index = $('.time_bg_icon').length == 0 ? true : false;
|
|
|
366
|
+ if (data_index) {
|
|
|
367
|
+ layer.msg("请选择时间段!");
|
|
|
368
|
+ } else {
|
|
|
369
|
+ $.ajax({
|
|
|
370
|
+ url: "/user/yuyue/yueyue_do",
|
|
|
371
|
+ type: "post",
|
|
|
372
|
+ data: {
|
|
|
373
|
+ day: data_day,
|
|
|
374
|
+ week: week,
|
|
|
375
|
+ begin: parseInt(list[0].getElementsByTagName('b')[0].innerHTML.split("-")[0]),
|
|
|
376
|
+ end: parseInt(list[list.length - 1].getElementsByTagName('b')[0].innerHTML.split('-')[1])
|
|
|
377
|
+ }, success: function (res) {
|
|
|
378
|
+ console.log(res);
|
|
|
379
|
+ if (res.code == "1") {
|
|
|
380
|
+ $('.yu_tan').attr("data-qr", "2");
|
|
|
381
|
+ tankuang();
|
|
|
382
|
+ window.location.href = "/user/yuyue/coach_list";
|
|
|
383
|
+ }
|
378
|
}
|
384
|
}
|
379
|
- }
|
|
|
380
|
- })
|
385
|
+ })
|
|
|
386
|
+ }
|
381
|
}
|
387
|
}
|
382
|
});
|
388
|
});
|
383
|
});
|
389
|
});
|