|
@@ -11,6 +11,7 @@ |
|
@@ -11,6 +11,7 @@ |
11
|
<link rel="stylesheet" href="../../assets/css/api.css"/>
|
11
|
<link rel="stylesheet" href="../../assets/css/api.css"/>
|
12
|
<link rel="stylesheet" href="../../assets/css/index.css">
|
12
|
<link rel="stylesheet" href="../../assets/css/index.css">
|
13
|
<link rel="stylesheet" href="../../assets/css/doc.css">
|
13
|
<link rel="stylesheet" href="../../assets/css/doc.css">
|
|
|
14
|
+ <link rel="stylesheet" href="../../assets/css/weui.min.css">
|
14
|
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
|
15
|
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
|
15
|
<style>
|
16
|
<style>
|
16
|
|
17
|
|
|
@@ -350,6 +351,150 @@ |
|
@@ -350,6 +351,150 @@ |
350
|
font-size: 0;
|
351
|
font-size: 0;
|
351
|
margin: 0;
|
352
|
margin: 0;
|
352
|
}
|
353
|
}
|
|
|
354
|
+ .weui-dialog__hd{
|
|
|
355
|
+ line-height: 1;
|
|
|
356
|
+ padding: 0 0.5em .3em;
|
|
|
357
|
+ }
|
|
|
358
|
+ /*住房选择*/
|
|
|
359
|
+ .meal {
|
|
|
360
|
+ display: flex;
|
|
|
361
|
+ flex-direction: column;
|
|
|
362
|
+ justify-content: flex-end;
|
|
|
363
|
+ position: fixed;
|
|
|
364
|
+ top: 0;
|
|
|
365
|
+ left: 0;
|
|
|
366
|
+ width: 100%;
|
|
|
367
|
+ height: 100%;
|
|
|
368
|
+ }
|
|
|
369
|
+
|
|
|
370
|
+ .meal_title {
|
|
|
371
|
+ text-align: center;
|
|
|
372
|
+ color: #424242;
|
|
|
373
|
+ font-size: 15px;
|
|
|
374
|
+ font-weight: bold;
|
|
|
375
|
+ border-bottom: 1px solid #ccc;
|
|
|
376
|
+ display: flex;
|
|
|
377
|
+ align-items: center;
|
|
|
378
|
+ justify-content: space-between;
|
|
|
379
|
+ padding: 0.25rem;
|
|
|
380
|
+ }
|
|
|
381
|
+
|
|
|
382
|
+ .meal_item {
|
|
|
383
|
+ background-color: #fff;
|
|
|
384
|
+ }
|
|
|
385
|
+
|
|
|
386
|
+ .pay_box {
|
|
|
387
|
+ display: flex;
|
|
|
388
|
+ align-items: center;
|
|
|
389
|
+ justify-content: space-between;
|
|
|
390
|
+ padding: 0 10% 0.25rem 10%;
|
|
|
391
|
+ }
|
|
|
392
|
+
|
|
|
393
|
+ .pay_num {
|
|
|
394
|
+ font-size: 12px;
|
|
|
395
|
+ color: #424242;
|
|
|
396
|
+ }
|
|
|
397
|
+
|
|
|
398
|
+ .pay_btn_box {
|
|
|
399
|
+ display: flex;
|
|
|
400
|
+ align-items: center;
|
|
|
401
|
+ }
|
|
|
402
|
+
|
|
|
403
|
+ .pay_btn_box .iconfont {
|
|
|
404
|
+ font-size: 20px;
|
|
|
405
|
+ color: #ccc;
|
|
|
406
|
+ }
|
|
|
407
|
+
|
|
|
408
|
+ .pay_btn_box input {
|
|
|
409
|
+ width: 0.5rem;
|
|
|
410
|
+ text-align: center;
|
|
|
411
|
+ border: 0;
|
|
|
412
|
+ outline: none;
|
|
|
413
|
+ font-size: 15px;
|
|
|
414
|
+ }
|
|
|
415
|
+
|
|
|
416
|
+ .pay_num .limit {
|
|
|
417
|
+ padding: 0;
|
|
|
418
|
+ font-size: 12px;
|
|
|
419
|
+ color: #ccc;
|
|
|
420
|
+ }
|
|
|
421
|
+
|
|
|
422
|
+ .pay_btn {
|
|
|
423
|
+ font-size: 15px;
|
|
|
424
|
+ color: #fff;
|
|
|
425
|
+ background-color: #dbb25f;
|
|
|
426
|
+ text-align: center;
|
|
|
427
|
+ padding: 0.2rem 0;
|
|
|
428
|
+ }
|
|
|
429
|
+
|
|
|
430
|
+ .room_box, .price_box {
|
|
|
431
|
+ display: flex;
|
|
|
432
|
+ /*align-items: center;*/
|
|
|
433
|
+ justify-content: space-between;
|
|
|
434
|
+ padding: 0.2rem 0.4rem 0 0.4rem;
|
|
|
435
|
+
|
|
|
436
|
+ }
|
|
|
437
|
+
|
|
|
438
|
+ .room_left {
|
|
|
439
|
+ font-size: 15px;
|
|
|
440
|
+ color: #424242;
|
|
|
441
|
+ }
|
|
|
442
|
+
|
|
|
443
|
+ .youhui {
|
|
|
444
|
+ color: #d8b25f;
|
|
|
445
|
+ font-size: 12px;
|
|
|
446
|
+ margin-left: 0.1rem;
|
|
|
447
|
+ }
|
|
|
448
|
+
|
|
|
449
|
+ .room_right {
|
|
|
450
|
+ color: #dbb25f;
|
|
|
451
|
+ font-size: 15px;
|
|
|
452
|
+ }
|
|
|
453
|
+
|
|
|
454
|
+ .old_price {
|
|
|
455
|
+ text-decoration: line-through;
|
|
|
456
|
+ color: #ccc;
|
|
|
457
|
+ margin-left: 0.1rem;
|
|
|
458
|
+ }
|
|
|
459
|
+
|
|
|
460
|
+ .room_tips {
|
|
|
461
|
+ color: #ccc;
|
|
|
462
|
+ font-size: 12px;
|
|
|
463
|
+ padding: 0 0.4rem;
|
|
|
464
|
+ }
|
|
|
465
|
+
|
|
|
466
|
+ .price_left, .price_right {
|
|
|
467
|
+ display: flex;
|
|
|
468
|
+ /*align-items: center;*/
|
|
|
469
|
+ flex-wrap: wrap;
|
|
|
470
|
+ flex: 1;
|
|
|
471
|
+ }
|
|
|
472
|
+
|
|
|
473
|
+ .price_left span, .price_right span {
|
|
|
474
|
+ background-color: #f2f2f2;
|
|
|
475
|
+ color: #424242;
|
|
|
476
|
+ padding: 0 0.2rem;
|
|
|
477
|
+ font-size: 14px;
|
|
|
478
|
+ margin: 0 0.2rem 0.2rem 0;
|
|
|
479
|
+ border-radius: 0.05rem;
|
|
|
480
|
+ cursor: pointer;
|
|
|
481
|
+ min-width: 0.88rem;
|
|
|
482
|
+ text-align: center;
|
|
|
483
|
+ height: 0.48rem;
|
|
|
484
|
+ display: flex;
|
|
|
485
|
+ align-items: center;
|
|
|
486
|
+ justify-content: center;
|
|
|
487
|
+ }
|
|
|
488
|
+
|
|
|
489
|
+ .icon-cuohao {
|
|
|
490
|
+ font-size: 15px;
|
|
|
491
|
+ color: #424242;
|
|
|
492
|
+ }
|
|
|
493
|
+
|
|
|
494
|
+ .price_box .span_active {
|
|
|
495
|
+ background-color: #dbb25f;
|
|
|
496
|
+ color: #fff;
|
|
|
497
|
+ }
|
353
|
</style>
|
498
|
</style>
|
354
|
</head>
|
499
|
</head>
|
355
|
<body>
|
500
|
<body>
|
|
@@ -377,7 +522,7 @@ |
|
@@ -377,7 +522,7 @@ |
377
|
<div class="doc_right">{{meal?meal:'选择套餐>'}}</div>
|
522
|
<div class="doc_right">{{meal?meal:'选择套餐>'}}</div>
|
378
|
</div>
|
523
|
</div>
|
379
|
<div v-else>
|
524
|
<div v-else>
|
380
|
- <div class="doc_item" @click="dateSelect">
|
525
|
+ <div class="doc_item" @click="dateSelect" id="sever">
|
381
|
<div class="doc_room"><span class="iconfont icon-taocan"></span><span>预约参观</span></div>
|
526
|
<div class="doc_room"><span class="iconfont icon-taocan"></span><span>预约参观</span></div>
|
382
|
<div class="doc_right" v-if="date_info">{{date_info}}</div>
|
527
|
<div class="doc_right" v-if="date_info">{{date_info}}</div>
|
383
|
<span v-else class="doc_right">请选择时间 <span class="iconfont icon-xiangyou"></span></span>
|
528
|
<span v-else class="doc_right">请选择时间 <span class="iconfont icon-xiangyou"></span></span>
|
|
@@ -414,7 +559,7 @@ |
|
@@ -414,7 +559,7 @@ |
414
|
</div>
|
559
|
</div>
|
415
|
</footer>
|
560
|
</footer>
|
416
|
<!--预约-->
|
561
|
<!--预约-->
|
417
|
- <div @click="close" class="meal" v-if="room">
|
562
|
+ <div @click="close" class="meal" v-if="c_room">
|
418
|
<div class="meal_item" @click.stop>
|
563
|
<div class="meal_item" @click.stop>
|
419
|
<div class="meal_title">
|
564
|
<div class="meal_title">
|
420
|
<span></span>
|
565
|
<span></span>
|
|
@@ -488,6 +633,7 @@ |
|
@@ -488,6 +633,7 @@ |
488
|
<script type="text/javascript" src="../../assets/js/weui.min.js"></script>
|
633
|
<script type="text/javascript" src="../../assets/js/weui.min.js"></script>
|
489
|
<script type="text/javascript" src="../../assets/js/public.js"></script>
|
634
|
<script type="text/javascript" src="../../assets/js/public.js"></script>
|
490
|
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
|
635
|
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
|
|
|
636
|
+<script type="text/javascript" src="../../assets/js/datePicker.js"></script>
|
491
|
<script>
|
637
|
<script>
|
492
|
new FastClick(document.body);
|
638
|
new FastClick(document.body);
|
493
|
</script>
|
639
|
</script>
|
|
@@ -519,13 +665,16 @@ |
|
@@ -519,13 +665,16 @@ |
519
|
pos: 'fixed',
|
665
|
pos: 'fixed',
|
520
|
num: 1,
|
666
|
num: 1,
|
521
|
sever_list: [],
|
667
|
sever_list: [],
|
522
|
- active_index: -1,
|
|
|
523
|
active_name: '',
|
668
|
active_name: '',
|
524
|
priceList: [],
|
669
|
priceList: [],
|
525
|
attribute: [],
|
670
|
attribute: [],
|
526
|
id: '',
|
671
|
id: '',
|
527
|
unit: '',
|
672
|
unit: '',
|
528
|
- taocan: false
|
673
|
+ price_info: [],
|
|
|
674
|
+ active_index: -1,
|
|
|
675
|
+ active_index2: -1,
|
|
|
676
|
+ taocan: false,
|
|
|
677
|
+ c_room: false
|
529
|
},
|
678
|
},
|
530
|
created: function () {
|
679
|
created: function () {
|
531
|
this.id = localStorage.getItem('id');
|
680
|
this.id = localStorage.getItem('id');
|
|
@@ -578,117 +727,164 @@ |
|
@@ -578,117 +727,164 @@ |
578
|
set_rank: function () {
|
727
|
set_rank: function () {
|
579
|
var app = this;
|
728
|
var app = this;
|
580
|
if (app.date_info) {
|
729
|
if (app.date_info) {
|
581
|
- api.confirm({
|
730
|
+ // api.confirm({
|
|
|
731
|
+ // title: '选择套餐',
|
|
|
732
|
+ // msg: '预约参观和选择入住只能选择其中一类',
|
|
|
733
|
+ // buttons: ['确定', '取消']
|
|
|
734
|
+ // }, function (ret, err) {
|
|
|
735
|
+ // var index = ret.buttonIndex;
|
|
|
736
|
+ // if (index == 2) {
|
|
|
737
|
+ //
|
|
|
738
|
+ // }
|
|
|
739
|
+ // });
|
|
|
740
|
+ weui.confirm('预约参观和选择入住只能选择其中一类', {
|
582
|
title: '选择套餐',
|
741
|
title: '选择套餐',
|
583
|
- msg: '预约参观和选择入住只能选择其中一类',
|
|
|
584
|
- buttons: ['确定', '取消']
|
|
|
585
|
- }, function (ret, err) {
|
|
|
586
|
- var index = ret.buttonIndex;
|
|
|
587
|
- if (index == 2) {
|
|
|
588
|
- app.date_info = '';
|
|
|
589
|
- app.room = '';
|
|
|
590
|
- app.total = app.goods.good_price
|
|
|
591
|
- }
|
742
|
+ buttons: [{
|
|
|
743
|
+ label: '取消',
|
|
|
744
|
+ type: 'default',
|
|
|
745
|
+ onClick: function(){ console.log('no') }
|
|
|
746
|
+ }, {
|
|
|
747
|
+ label: '确定',
|
|
|
748
|
+ type: 'primary',
|
|
|
749
|
+ onClick: function(){
|
|
|
750
|
+ app.date_info = '';
|
|
|
751
|
+ app.room = '';
|
|
|
752
|
+ app.total = app.goods.good_price
|
|
|
753
|
+ app.c_room = true
|
|
|
754
|
+ }
|
|
|
755
|
+ }]
|
592
|
});
|
756
|
});
|
593
|
} else {
|
757
|
} else {
|
594
|
- api.openFrame({
|
|
|
595
|
- bgColor: 'rgba(0,0,0,0.05)',
|
|
|
596
|
- name: 'choose_room_f',
|
|
|
597
|
- url: './choose_room_f.html',
|
|
|
598
|
- bounces: false,
|
|
|
599
|
- animation: {
|
|
|
600
|
- type: "push",
|
|
|
601
|
- subType: "from_bottom",
|
|
|
602
|
- duration: 300
|
|
|
603
|
- },
|
|
|
604
|
- rect: {
|
|
|
605
|
- x: 0,
|
|
|
606
|
- y: 0,
|
|
|
607
|
- w: 'auto',
|
|
|
608
|
- h: 'auto'
|
|
|
609
|
- },
|
|
|
610
|
- pageParam: {
|
|
|
611
|
- id: app.id,
|
|
|
612
|
- attribute: app.attribute,
|
|
|
613
|
- unit: app.unit
|
|
|
614
|
- }
|
|
|
615
|
- });
|
758
|
+ // api.openFrame({
|
|
|
759
|
+ // bgColor: 'rgba(0,0,0,0.05)',
|
|
|
760
|
+ // name: 'choose_room_f',
|
|
|
761
|
+ // url: './choose_room_f.html',
|
|
|
762
|
+ // bounces: false,
|
|
|
763
|
+ // animation: {
|
|
|
764
|
+ // type: "push",
|
|
|
765
|
+ // subType: "from_bottom",
|
|
|
766
|
+ // duration: 300
|
|
|
767
|
+ // },
|
|
|
768
|
+ // rect: {
|
|
|
769
|
+ // x: 0,
|
|
|
770
|
+ // y: 0,
|
|
|
771
|
+ // w: 'auto',
|
|
|
772
|
+ // h: 'auto'
|
|
|
773
|
+ // },
|
|
|
774
|
+ // pageParam: {
|
|
|
775
|
+ // id: app.id,
|
|
|
776
|
+ // attribute: app.attribute,
|
|
|
777
|
+ // unit: app.unit
|
|
|
778
|
+ // }
|
|
|
779
|
+ // });
|
|
|
780
|
+ app.c_room = true
|
616
|
}
|
781
|
}
|
617
|
},
|
782
|
},
|
618
|
// 选择日期
|
783
|
// 选择日期
|
619
|
dateSelect: function () {
|
784
|
dateSelect: function () {
|
620
|
var app = this;
|
785
|
var app = this;
|
621
|
if (app.room) {
|
786
|
if (app.room) {
|
622
|
- api.confirm({
|
787
|
+ weui.confirm('预约参观和选择入住只能选择其中一类', {
|
623
|
title: '选择套餐',
|
788
|
title: '选择套餐',
|
624
|
- msg: '预约参观和选择入住只能选择其中一类',
|
|
|
625
|
- buttons: ['取消', '确定']
|
|
|
626
|
- }, function (ret, err) {
|
|
|
627
|
- var index = ret.buttonIndex;
|
|
|
628
|
- if (index == 1) {
|
|
|
629
|
- app.date_info = '';
|
|
|
630
|
- app.room = ''
|
|
|
631
|
- }
|
789
|
+ buttons: [{
|
|
|
790
|
+ label: '取消',
|
|
|
791
|
+ type: 'default',
|
|
|
792
|
+ onClick: function(){ console.log('no') }
|
|
|
793
|
+ }, {
|
|
|
794
|
+ label: '确定',
|
|
|
795
|
+ type: 'primary',
|
|
|
796
|
+ onClick: function(){ console.log('yes') }
|
|
|
797
|
+ }]
|
632
|
});
|
798
|
});
|
|
|
799
|
+ // api.confirm({
|
|
|
800
|
+ // title: '选择套餐',
|
|
|
801
|
+ // msg: '',
|
|
|
802
|
+ // buttons: ['取消', '确定']
|
|
|
803
|
+ // }, function (ret, err) {
|
|
|
804
|
+ // var index = ret.buttonIndex;
|
|
|
805
|
+ // if (index == 1) {
|
|
|
806
|
+ // app.date_info = '';
|
|
|
807
|
+ // app.room = ''
|
|
|
808
|
+ // }
|
|
|
809
|
+ // });
|
633
|
} else {
|
810
|
} else {
|
634
|
-// alert(getTimeDetil(72))
|
|
|
635
|
- if (api.systemType == 'ios') {
|
|
|
636
|
- api.openPicker({
|
|
|
637
|
- type: 'date_time',
|
|
|
638
|
- date: new Date(),
|
|
|
639
|
- minDate: getTimeDetil(72),
|
|
|
640
|
- title: '服务时间'
|
|
|
641
|
- }, function (ret, err) {
|
|
|
642
|
- if (ret) {
|
|
|
643
|
- app.year = ret.year;
|
|
|
644
|
- app.month = ret.month;
|
|
|
645
|
- app.day = ret.day;
|
|
|
646
|
- app.hour = ret.hour;
|
|
|
647
|
- app.minute = ret.minute;
|
|
|
648
|
- app.date_info = app.year + '-' + add0(app.month) + '-' + add0(app.day) + ' ' + add0(app.hour) + ':' + add0(app.minute);
|
|
|
649
|
- if (checkDate(app.date_info, 3)) {
|
|
|
650
|
- return app.date_info
|
|
|
651
|
- } else {
|
|
|
652
|
- toastMsg('服务时间请选择在3天以后');
|
|
|
653
|
- return app.date_info = app.default_date
|
|
|
654
|
- }
|
811
|
+ var calendar = new datePicker();
|
|
|
812
|
+ calendar.init({
|
|
|
813
|
+ 'trigger': '#sever', /*按钮选择器,用于触发弹出插件*/
|
|
|
814
|
+ 'type': 'datetime', /*模式:date日期;datetime日期时间;time时间;ym年月;*/
|
|
|
815
|
+ // 'minDate':getTimeDetil(3), /*最小日期*/
|
|
|
816
|
+ 'minDate': formatDate(new Date(getTimeDetil(72)), 1), /*最小日期*/
|
|
|
817
|
+ 'maxDate': '', /*最大日期*/
|
|
|
818
|
+ 'onSubmit': function () {/*确认时触发事件*/
|
|
|
819
|
+ console.log(calendar.value);
|
|
|
820
|
+ if (calendar.value) {
|
|
|
821
|
+ app.date_info = calendar.value;
|
|
|
822
|
+ calendar.onClose()
|
655
|
} else {
|
823
|
} else {
|
656
|
- console.log(err)
|
824
|
+ toastMsg('服务时间请选择在3天以后');
|
657
|
}
|
825
|
}
|
658
|
- });
|
|
|
659
|
- }
|
|
|
660
|
- else {
|
|
|
661
|
- api.openPicker({
|
|
|
662
|
- type: 'date',
|
|
|
663
|
- title: '服务日期',
|
|
|
664
|
- }, function (ret, err) {
|
|
|
665
|
- if (ret) {
|
|
|
666
|
- app.year = ret.year;
|
|
|
667
|
- app.month = ret.month;
|
|
|
668
|
- app.day = ret.day;
|
|
|
669
|
- api.openPicker({
|
|
|
670
|
- type: 'time',
|
|
|
671
|
- title: '服务时间'
|
|
|
672
|
- }, function (rets, errs) {
|
|
|
673
|
- if (rets) {
|
|
|
674
|
- app.hour = rets.hour;
|
|
|
675
|
- app.minute = rets.minute;
|
|
|
676
|
- app.date_info = app.year + '-' + add0(app.month) + '-' + add0(app.day) + ' ' + add0(app.hour) + ':' + add0(app.minute);
|
|
|
677
|
- if (checkDate(app.date_info, 1)) {
|
|
|
678
|
- return app.date_info
|
|
|
679
|
- } else {
|
|
|
680
|
- toastMsg('选择生日不能小于当前时间');
|
|
|
681
|
- return app.date_info = app.default_date
|
|
|
682
|
- }
|
|
|
683
|
- } else {
|
|
|
684
|
- console.log(errs)
|
|
|
685
|
- }
|
|
|
686
|
- });
|
|
|
687
|
- } else {
|
|
|
688
|
- console.log(err)
|
|
|
689
|
- }
|
|
|
690
|
- });
|
|
|
691
|
- }
|
826
|
+ },
|
|
|
827
|
+ 'onClose': function () {/*取消时触发事件*/
|
|
|
828
|
+ // api.closeWin();
|
|
|
829
|
+ }
|
|
|
830
|
+ });
|
|
|
831
|
+// // alert(getTimeDetil(72))
|
|
|
832
|
+// api.openPicker({
|
|
|
833
|
+// type: 'date_time',
|
|
|
834
|
+// date: new Date(),
|
|
|
835
|
+// minDate: getTimeDetil(72),
|
|
|
836
|
+// title: '服务时间'
|
|
|
837
|
+// }, function (ret, err) {
|
|
|
838
|
+// if (ret) {
|
|
|
839
|
+// app.year = ret.year;
|
|
|
840
|
+// app.month = ret.month;
|
|
|
841
|
+// app.day = ret.day;
|
|
|
842
|
+// app.hour = ret.hour;
|
|
|
843
|
+// app.minute = ret.minute;
|
|
|
844
|
+// app.date_info = app.year + '-' + add0(app.month) + '-' + add0(app.day) + ' ' + add0(app.hour) + ':' + add0(app.minute);
|
|
|
845
|
+// if (checkDate(app.date_info, 3)) {
|
|
|
846
|
+// return app.date_info
|
|
|
847
|
+// } else {
|
|
|
848
|
+// toastMsg('服务时间请选择在3天以后');
|
|
|
849
|
+// return app.date_info = app.default_date
|
|
|
850
|
+// }
|
|
|
851
|
+// } else {
|
|
|
852
|
+// console.log(err)
|
|
|
853
|
+// }
|
|
|
854
|
+// });
|
|
|
855
|
+ // }
|
|
|
856
|
+ // else {
|
|
|
857
|
+ // api.openPicker({
|
|
|
858
|
+ // type: 'date',
|
|
|
859
|
+ // title: '服务日期',
|
|
|
860
|
+ // }, function (ret, err) {
|
|
|
861
|
+ // if (ret) {
|
|
|
862
|
+ // app.year = ret.year;
|
|
|
863
|
+ // app.month = ret.month;
|
|
|
864
|
+ // app.day = ret.day;
|
|
|
865
|
+ // api.openPicker({
|
|
|
866
|
+ // type: 'time',
|
|
|
867
|
+ // title: '服务时间'
|
|
|
868
|
+ // }, function (rets, errs) {
|
|
|
869
|
+ // if (rets) {
|
|
|
870
|
+ // app.hour = rets.hour;
|
|
|
871
|
+ // app.minute = rets.minute;
|
|
|
872
|
+ // app.date_info = app.year + '-' + add0(app.month) + '-' + add0(app.day) + ' ' + add0(app.hour) + ':' + add0(app.minute);
|
|
|
873
|
+ // if (checkDate(app.date_info, 1)) {
|
|
|
874
|
+ // return app.date_info
|
|
|
875
|
+ // } else {
|
|
|
876
|
+ // toastMsg('选择生日不能小于当前时间');
|
|
|
877
|
+ // return app.date_info = app.default_date
|
|
|
878
|
+ // }
|
|
|
879
|
+ // } else {
|
|
|
880
|
+ // console.log(errs)
|
|
|
881
|
+ // }
|
|
|
882
|
+ // });
|
|
|
883
|
+ // } else {
|
|
|
884
|
+ // console.log(err)
|
|
|
885
|
+ // }
|
|
|
886
|
+ // });
|
|
|
887
|
+ // }
|
692
|
}
|
888
|
}
|
693
|
},
|
889
|
},
|
694
|
// 预约时间
|
890
|
// 预约时间
|
|
@@ -737,6 +933,7 @@ |
|
@@ -737,6 +933,7 @@ |
737
|
app.real_price = res.data.data.real_price;
|
933
|
app.real_price = res.data.data.real_price;
|
738
|
app.price = res.data.data.price;
|
934
|
app.price = res.data.data.price;
|
739
|
app.goods = res.data.data.goods;
|
935
|
app.goods = res.data.data.goods;
|
|
|
936
|
+ document.title = app.goods.post_title;
|
740
|
app.attribute_type = res.data.data.attribute_type;
|
937
|
app.attribute_type = res.data.data.attribute_type;
|
741
|
app.unit = res.data.data.unit;
|
938
|
app.unit = res.data.data.unit;
|
742
|
loadEnd();
|
939
|
loadEnd();
|
|
@@ -873,7 +1070,7 @@ |
|
@@ -873,7 +1070,7 @@ |
873
|
// name: 'choose_meal_w'
|
1070
|
// name: 'choose_meal_w'
|
874
|
// });
|
1071
|
// });
|
875
|
this.taocan = false
|
1072
|
this.taocan = false
|
876
|
- this.room = false
|
1073
|
+ this.c_room = false
|
877
|
},
|
1074
|
},
|
878
|
t_choose_sever: function (attr, index) {
|
1075
|
t_choose_sever: function (attr, index) {
|
879
|
var app = this;
|
1076
|
var app = this;
|
|
@@ -928,18 +1125,21 @@ |
|
@@ -928,18 +1125,21 @@ |
928
|
|
1125
|
|
929
|
},
|
1126
|
},
|
930
|
choose_left: function (index) {
|
1127
|
choose_left: function (index) {
|
|
|
1128
|
+ var app = this;
|
931
|
app.active_index = index;
|
1129
|
app.active_index = index;
|
932
|
app.active_left = app.attribute[0][index];
|
1130
|
app.active_left = app.attribute[0][index];
|
933
|
app.num = app.price_info.limit_num;
|
1131
|
app.num = app.price_info.limit_num;
|
934
|
app.getPrice();
|
1132
|
app.getPrice();
|
935
|
},
|
1133
|
},
|
936
|
choose_right: function (index) {
|
1134
|
choose_right: function (index) {
|
|
|
1135
|
+ var app = this;
|
937
|
app.active_index2 = index;
|
1136
|
app.active_index2 = index;
|
938
|
app.active_right = app.attribute[1][index];
|
1137
|
app.active_right = app.attribute[1][index];
|
939
|
app.getPrice();
|
1138
|
app.getPrice();
|
940
|
app.num = app.price_info.limit_num;
|
1139
|
app.num = app.price_info.limit_num;
|
941
|
},
|
1140
|
},
|
942
|
reduce: function () {
|
1141
|
reduce: function () {
|
|
|
1142
|
+ var app = this;
|
943
|
if (app.price_info.limit_num) {
|
1143
|
if (app.price_info.limit_num) {
|
944
|
if (app.num > app.price_info.limit_num) {
|
1144
|
if (app.num > app.price_info.limit_num) {
|
945
|
app.num--
|
1145
|
app.num--
|
|
@@ -949,14 +1149,18 @@ |
|
@@ -949,14 +1149,18 @@ |
949
|
}else {
|
1149
|
}else {
|
950
|
toastMsg('请选择入住类型')
|
1150
|
toastMsg('请选择入住类型')
|
951
|
}
|
1151
|
}
|
|
|
1152
|
+ app.total = parseFloat(app.price_info.price) * (app.num);
|
952
|
},
|
1153
|
},
|
953
|
plus: function () {
|
1154
|
plus: function () {
|
|
|
1155
|
+ var app = this;
|
954
|
if (app.num < app.price_info.limit_num) {
|
1156
|
if (app.num < app.price_info.limit_num) {
|
955
|
} else {
|
1157
|
} else {
|
956
|
app.num++
|
1158
|
app.num++
|
957
|
}
|
1159
|
}
|
|
|
1160
|
+ app.total = parseFloat(app.price_info.price) * (app.num);
|
958
|
},
|
1161
|
},
|
959
|
getPrice: function () {
|
1162
|
getPrice: function () {
|
|
|
1163
|
+ var app = this;
|
960
|
if (app.active_left && app.active_right) {
|
1164
|
if (app.active_left && app.active_right) {
|
961
|
var post = {
|
1165
|
var post = {
|
962
|
attribute: app.active_left + '_' + app.active_right,
|
1166
|
attribute: app.active_left + '_' + app.active_right,
|
|
@@ -975,17 +1179,23 @@ |
|
@@ -975,17 +1179,23 @@ |
975
|
|
1179
|
|
976
|
},
|
1180
|
},
|
977
|
pay_go: function () {
|
1181
|
pay_go: function () {
|
|
|
1182
|
+ var app = this;
|
978
|
if (app.active_left && app.active_right) {
|
1183
|
if (app.active_left && app.active_right) {
|
979
|
- api.sendEvent({
|
|
|
980
|
- name: 'room',
|
|
|
981
|
- extra: {
|
|
|
982
|
- name_left: app.active_left,
|
|
|
983
|
- name_right: app.active_right,
|
|
|
984
|
- num: app.num,
|
|
|
985
|
- price: app.price_info.price,
|
|
|
986
|
- attribute_id: app.attribute_id
|
|
|
987
|
- }
|
|
|
988
|
- });
|
1184
|
+ // api.sendEvent({
|
|
|
1185
|
+ // name: 'room',
|
|
|
1186
|
+ // extra: {
|
|
|
1187
|
+ // name_left: app.active_left,
|
|
|
1188
|
+ // name_right: app.active_right,
|
|
|
1189
|
+ // num: app.num,
|
|
|
1190
|
+ // price: app.price_info.price,
|
|
|
1191
|
+ // attribute_id: app.attribute_id
|
|
|
1192
|
+ // }
|
|
|
1193
|
+ // });
|
|
|
1194
|
+ app.room = app.active_left + ',' + app.active_right + ',' + app.num + app.unit;
|
|
|
1195
|
+ // // alert(JSON.stringify(ret.value));
|
|
|
1196
|
+ // app.num = ret.value.num;
|
|
|
1197
|
+ // app.attribute_id = ret.value.attribute_id;
|
|
|
1198
|
+ app.total = parseFloat(app.price_info.price) * (app.num);
|
989
|
app.close()
|
1199
|
app.close()
|
990
|
}
|
1200
|
}
|
991
|
else {
|
1201
|
else {
|