作者 朱振飞

合并分支 'Branch_zhu' 到 'master'

Branch zhu



查看合并请求 !12
@@ -241,3 +241,5 @@ @@ -241,3 +241,5 @@
241 241
242 .icon-Fill:before { content: "\e630"; } 242 .icon-Fill:before { content: "\e630"; }
243 243
  244 +
  245 +
@@ -97,8 +97,11 @@ function toastMsg(msg) { @@ -97,8 +97,11 @@ function toastMsg(msg) {
97 if (msg) { 97 if (msg) {
98 weui.toast(msg, '') 98 weui.toast(msg, '')
99 } else { 99 } else {
100 - weui.toast('') 100 + // weui.toast('')
101 } 101 }
  102 + setTimeout(function(){
  103 +
  104 + })
102 } 105 }
103 106
104 // 双击退出 107 // 双击退出
@@ -63,6 +63,7 @@ @@ -63,6 +63,7 @@
63 <script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script> 63 <script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script>
64 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script> 64 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
65 <script type="text/javascript" src="../../assets/js/axios.min.js"></script> 65 <script type="text/javascript" src="../../assets/js/axios.min.js"></script>
  66 +<script src="http(s)://cdn.ronghub.com/RongIMLib-2.3.3.min.js"></script>
66 <!--<script type="text/javascript" src="http://at.alicdn.com/t/font_641470_jg64l6ijsg4lsor.js"></script>--> 67 <!--<script type="text/javascript" src="http://at.alicdn.com/t/font_641470_jg64l6ijsg4lsor.js"></script>-->
67 <script> 68 <script>
68 var app = new Vue({ 69 var app = new Vue({
@@ -114,6 +115,7 @@ @@ -114,6 +115,7 @@
114 }) 115 })
115 }, 116 },
116 openSever: function () { 117 openSever: function () {
  118 + var app = this;
117 app.img_active = false; 119 app.img_active = false;
118 app.getRongYunToken(); 120 app.getRongYunToken();
119 function callBack(ret, err) { 121 function callBack(ret, err) {
@@ -153,7 +155,6 @@ @@ -153,7 +155,6 @@
153 zhichi.startZhiChiSobot(param, callBack); 155 zhichi.startZhiChiSobot(param, callBack);
154 }, 156 },
155 rongyunInit: function () { 157 rongyunInit: function () {
156 - var rong = api.require('rongCloud2');  
157 rong.init(function (ret, err) { 158 rong.init(function (ret, err) {
158 if (ret.status == 'error') { 159 if (ret.status == 'error') {
159 } else { 160 } else {
@@ -172,7 +172,7 @@ @@ -172,7 +172,7 @@
172 post_title: '', 172 post_title: '',
173 problems: '', 173 problems: '',
174 rongYunToken: '', 174 rongYunToken: '',
175 - userId: '', 175 + userId: ''
176 }, 176 },
177 created: function () { 177 created: function () {
178 // alert('预约' + api.pageParam.id) 178 // alert('预约' + api.pageParam.id)
@@ -186,7 +186,7 @@ @@ -186,7 +186,7 @@
186 methods: { 186 methods: {
187 // 去预约 187 // 去预约
188 appointment: function () { 188 appointment: function () {
189 - var app = this 189 + var app = this;
190 if (app.cid == 5 || app.cid == 7 || app.cid == 8 || app.cid == 10) { 190 if (app.cid == 5 || app.cid == 7 || app.cid == 8 || app.cid == 10) {
191 openView('doc_package_f', '../index/doc_package_f', app.care_name, 'doc_package_f', false, { 191 openView('doc_package_f', '../index/doc_package_f', app.care_name, 'doc_package_f', false, {
192 id: app.id, 192 id: app.id,
@@ -110,7 +110,7 @@ @@ -110,7 +110,7 @@
110 this.cid = localStorage.getItem('cid'); 110 this.cid = localStorage.getItem('cid');
111 this.cityname = localStorage.getItem('cityName'); 111 this.cityname = localStorage.getItem('cityName');
112 this.winTitle = localStorage.getItem('winTitle'); 112 this.winTitle = localStorage.getItem('winTitle');
113 - document.getElementsByTagName("title")[0].innerText = this.winTitle; 113 + document.title = this.winTitle;
114 this.getCatInfo2(); 114 this.getCatInfo2();
115 }, 115 },
116 methods: { 116 methods: {
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 <title>家庭医生</title> 9 <title>家庭医生</title>
10 <script src="../../assets/js/fontsize.js"></script> 10 <script src="../../assets/js/fontsize.js"></script>
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/weui.min.css">
12 <link rel="stylesheet" href="../../assets/css/index.css"> 13 <link rel="stylesheet" href="../../assets/css/index.css">
13 <link rel="stylesheet" href="../../assets/icon/iconfont.css"> 14 <link rel="stylesheet" href="../../assets/icon/iconfont.css">
14 <link rel="stylesheet" href="../../assets/css/doc.css"> 15 <link rel="stylesheet" href="../../assets/css/doc.css">
@@ -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 {
@@ -451,13 +451,14 @@ @@ -451,13 +451,14 @@
451 if (res.data.code == 1) { 451 if (res.data.code == 1) {
452 app.rongYunToken = res.data.data.token; 452 app.rongYunToken = res.data.data.token;
453 app.userId = res.data.data.userId; 453 app.userId = res.data.data.userId;
454 - // app.rongyunInit(); 454 + app.rongyunInit();
455 } else {} 455 } else {}
456 }) 456 })
457 }, 457 },
458 // 轮播图跳转详情 458 // 轮播图跳转详情
459 care: function (id, care_name) { 459 care: function (id, care_name) {
460 window.location.href = 'care_f.html'; 460 window.location.href = 'care_f.html';
  461 + localStorage.removeItem('cid');
461 localStorage.setItem('id',id); 462 localStorage.setItem('id',id);
462 localStorage.setItem('care_name',care_name); 463 localStorage.setItem('care_name',care_name);
463 // api.openWin({ 464 // api.openWin({
@@ -571,9 +572,9 @@ @@ -571,9 +572,9 @@
571 // openView('nursing_f', 'index/nursing_f', name, 'nursing_f', false, {cid: id}); 572 // openView('nursing_f', 'index/nursing_f', name, 'nursing_f', false, {cid: id});
572 // return; 573 // return;
573 } 574 }
574 - localStorage.setItem('cid', id)  
575 - localStorage.setItem('cityName', app.cityname)  
576 - localStorage.setItem('winTitle', name) 575 + localStorage.setItem('cid', id);
  576 + localStorage.setItem('cityName', app.cityname);
  577 + localStorage.setItem('winTitle', name);
577 window.location.href = url + '.html' 578 window.location.href = url + '.html'
578 }, 579 },
579 // 获取第三栏列表 580 // 获取第三栏列表
@@ -1067,7 +1067,7 @@ @@ -1067,7 +1067,7 @@
1067 <script type="text/javascript" src="../../assets/js/axios.min.js"></script> 1067 <script type="text/javascript" src="../../assets/js/axios.min.js"></script>
1068 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script> 1068 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
1069 <script type="text/javascript" src="../../assets/js/datePicker.js"></script> 1069 <script type="text/javascript" src="../../assets/js/datePicker.js"></script>
1070 -<script type="text/javascript" src = 'https://webapi.amap.com/maps?v=1.4.4&test=true&key=ef53760bd959a4df08b7d4587280e642&&plugin=AMap.ToolBar,AMap.IndoorMap'></script> 1070 +<script type="text/javascript" src = 'https://webapi.amap.com/maps?v=1.4.4&key=ef53760bd959a4df08b7d4587280e642&&plugin=AMap.ToolBar,AMap.IndoorMap'></script>
1071 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js"></script> 1071 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
1072 <script> 1072 <script>
1073 var app = new Vue({ 1073 var app = new Vue({
@@ -1152,7 +1152,7 @@ @@ -1152,7 +1152,7 @@
1152 sever_list: [], 1152 sever_list: [],
1153 priceList: [], 1153 priceList: [],
1154 // 图片上传 1154 // 图片上传
1155 - photoUpload: true, 1155 + photoUpload: false,
1156 img1: '', 1156 img1: '',
1157 img2: '', 1157 img2: '',
1158 img3: '', 1158 img3: '',
@@ -1295,8 +1295,10 @@ @@ -1295,8 +1295,10 @@
1295 }, 1295 },
1296 // 上传证明 1296 // 上传证明
1297 openProve: function () { 1297 openProve: function () {
1298 - openView('prove', '../index/prove', '上传就医证明','prove',false,false,false) 1298 + // openView('prove', '../index/prove', '上传就医证明','prove',false,false,false)
  1299 + this.photoUpload = true
1299 }, 1300 },
  1301 +
1300 // 获取订单详情 1302 // 获取订单详情
1301 applyInfo: function () { 1303 applyInfo: function () {
1302 var app = this; 1304 var app = this;
@@ -1318,6 +1320,7 @@ @@ -1318,6 +1320,7 @@
1318 app.real_price = res.data.data.real_price; 1320 app.real_price = res.data.data.real_price;
1319 app.price = res.data.data.price; 1321 app.price = res.data.data.price;
1320 app.goods = res.data.data.goods; 1322 app.goods = res.data.data.goods;
  1323 + document.title = app.goods.post_title
1321 app.attribute_type = res.data.data.attribute_type; 1324 app.attribute_type = res.data.data.attribute_type;
1322 loadEnd(); 1325 loadEnd();
1323 } else { 1326 } else {
@@ -1657,8 +1660,8 @@ @@ -1657,8 +1660,8 @@
1657 // api.closeWin({ 1660 // api.closeWin({
1658 // name: 'choose_meal_w' 1661 // name: 'choose_meal_w'
1659 // }); 1662 // });
1660 - this.taocan = false  
1661 - this.room = false 1663 + this.taocan = false;
  1664 + this.room = false;
1662 }, 1665 },
1663 t_choose_sever: function (attr, index) { 1666 t_choose_sever: function (attr, index) {
1664 var app = this; 1667 var app = this;
@@ -1714,21 +1717,51 @@ @@ -1714,21 +1717,51 @@
1714 //证明上传 1717 //证明上传
1715 addPic(event){ 1718 addPic(event){
1716 var file = event.target.files[0]; 1719 var file = event.target.files[0];
1717 - console.log(file) 1720 + console.log(file);
1718 var formData = new FormData(); 1721 var formData = new FormData();
  1722 + var data = {
  1723 + type_id: 1,
  1724 + file: file
  1725 + };
1719 formData.append('file', file); 1726 formData.append('file', file);
  1727 + formData.append('type_id', '1');
1720 var header = { 1728 var header = {
1721 "XX-Device-Type": getDevice(), 1729 "XX-Device-Type": getDevice(),
1722 - 'XX-Token': getToken() 1730 + 'XX-Token': getToken(),
  1731 + 'Content-Type': 'multipart/form-data'
1723 }; 1732 };
1724 - getRequest('post', 'portal/Goods/uploadProve', formData, header).then(function (res) {  
1725 - alert(JSON.stringify(res))  
1726 - if (res.data.code == 1) {  
1727 - app.priceList = res.data.data;  
1728 - } else { 1733 + api.ajax({
  1734 + url: baseurl + 'portal/Goods/uploadProve',
  1735 + method: 'post',
  1736 + data: {
  1737 + values: {
  1738 + type_id: 1
  1739 + },
  1740 + files: {
  1741 + file: ret.data
  1742 + }
  1743 + },
  1744 + headers: {
  1745 + "XX-Device-Type": api.deviceModel,
  1746 + 'XX-Token': getToken()
  1747 + }
  1748 + }, function (res, erro) {
  1749 + // alert(JSON.stringify(res));
  1750 + if (res.code == 1) {
1729 toastMsg(res.msg) 1751 toastMsg(res.msg)
  1752 + app.img1 = res.data.url;
  1753 + $api.setStorage('img1', res.data.url);
  1754 + } else {
  1755 + toastMsg(res.data.msg)
1730 } 1756 }
1731 }); 1757 });
  1758 + // getRequest('post', 'portal/Goods/uploadProve', data, header).then(function (res) {
  1759 + // if (res.data.code == 1) {
  1760 + // app.priceList = res.data.data;
  1761 + // } else {
  1762 + // toastMsg(res.msg)
  1763 + // }
  1764 + // });
1732 }, 1765 },
1733 //诊断证明/医疗处置单 1766 //诊断证明/医疗处置单
1734 1767
@@ -485,7 +485,7 @@ @@ -485,7 +485,7 @@
485 methods: { 485 methods: {
486 appointment: function () { 486 appointment: function () {
487 var app = this; 487 var app = this;
488 - openView('doc_package_f', 'index/doc_package_f', '旅游套餐', 'doc_package_f', false, { 488 + openView('doc_package_f', '../index/doc_package_f', '旅游套餐', 'doc_package_f', false, {
489 cid: app.cid, 489 cid: app.cid,
490 id: app.id 490 id: app.id
491 }) 491 })
@@ -346,7 +346,6 @@ @@ -346,7 +346,6 @@
346 }, 346 },
347 created: function () { 347 created: function () {
348 this.crowd(); //第三栏 348 this.crowd(); //第三栏
349 - alert(1)  
350 }, 349 },
351 mounted: function() { 350 mounted: function() {
352 window.addEventListener('scroll', this.handleScroll) 351 window.addEventListener('scroll', this.handleScroll)
@@ -422,7 +421,7 @@ @@ -422,7 +421,7 @@
422 'XX-Token': getToken() 421 'XX-Token': getToken()
423 }; 422 };
424 getRequest('post', 'portal/Goods/crowd', null, header).then(function(res) { 423 getRequest('post', 'portal/Goods/crowd', null, header).then(function(res) {
425 - alert(JSON.stringify(res)); 424 + // alert(JSON.stringify(res));
426 if(res.data.code == 1) { 425 if(res.data.code == 1) {
427 app.banner = res.data.data.banner; 426 app.banner = res.data.data.banner;
428 app.state = res.data.data.state; 427 app.state = res.data.data.state;