作者 朱振飞

合并分支 'Branch_zhu' 到 'master'

Branch zhu



查看合并请求 !13
@@ -622,14 +622,14 @@ html,body{ @@ -622,14 +622,14 @@ html,body{
622 height: 100%; 622 height: 100%;
623 } 623 }
624 #app { 624 #app {
625 - /*height: 100%;*/  
626 - /*display: flex;*/  
627 - /*display: -webkit-flex;*/  
628 - /*display: -webkit-box;*/  
629 - /*flex-flow: column;*/  
630 - /*-webkit-flex-flow: column;*/  
631 - /*-webkit-box-orient: vertical;*/  
632 - /*overflow-x: hidden;*/ 625 + height: 100%;
  626 + display: flex;
  627 + display: -webkit-flex;
  628 + display: -webkit-box;
  629 + flex-flow: column;
  630 + -webkit-flex-flow: column;
  631 + -webkit-box-orient: vertical;
  632 + overflow-x: hidden;
633 } 633 }
634 634
635 .warp { 635 .warp {
@@ -51,13 +51,12 @@ @@ -51,13 +51,12 @@
51 agreement_data: '' 51 agreement_data: ''
52 }, 52 },
53 created: function () { 53 created: function () {
54 - apiready = function () {  
55 - app.id = api.pageParam.id;  
56 - app.getAgreement();  
57 - } 54 + this.id = localStorage.getItem('id');
  55 + this.getAgreement();
58 }, 56 },
59 methods: { 57 methods: {
60 getAgreement: function () { 58 getAgreement: function () {
  59 + var app = this;
61 var post = { 60 var post = {
62 id: app.id 61 id: app.id
63 }; 62 };
@@ -151,7 +151,6 @@ @@ -151,7 +151,6 @@
151 <script type="text/javascript" src="../../assets/js/axios.min.js"></script> 151 <script type="text/javascript" src="../../assets/js/axios.min.js"></script>
152 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script> 152 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
153 <script> 153 <script>
154 - var title = document.getElementsByTagName("title")[0]  
155 154
156 var app = new Vue({ 155 var app = new Vue({
157 el: '#app', 156 el: '#app',
@@ -225,7 +224,12 @@ @@ -225,7 +224,12 @@
225 app.advantage = res.data.data.advantage; 224 app.advantage = res.data.data.advantage;
226 app.service_step = res.data.data.service_step; 225 app.service_step = res.data.data.service_step;
227 app.price = res.data.data.price ? res.data.data.price : 0; 226 app.price = res.data.data.price ? res.data.data.price : 0;
228 - loadEnd(); 227 + app.url = app.url = escape2Html(res.data.data.url);
  228 + if(app.url){
  229 + window.location.href = app.url;
  230 + }else{
  231 + loadEnd();
  232 + }
229 // app.banner = app.proCareInfoInfo_data.banner 233 // app.banner = app.proCareInfoInfo_data.banner
230 } 234 }
231 }) 235 })
@@ -233,7 +237,7 @@ @@ -233,7 +237,7 @@
233 }, 237 },
234 // 获取个人的基本信息 238 // 获取个人的基本信息
235 getUserIndexInfo: function () { 239 getUserIndexInfo: function () {
236 - var app = this 240 + var app = this;
237 var header = { 241 var header = {
238 "XX-Device-Type": getDevice(), 242 "XX-Device-Type": getDevice(),
239 'XX-Token': getToken() 243 'XX-Token': getToken()
@@ -248,7 +252,7 @@ @@ -248,7 +252,7 @@
248 }, 252 },
249 // 打开客服 253 // 打开客服
250 openSever: function () { 254 openSever: function () {
251 - var app = this 255 + var app = this;
252 api.openWin({ 256 api.openWin({
253 name: 'cs_win', 257 name: 'cs_win',
254 url: '../common/cs_win.html' 258 url: '../common/cs_win.html'
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <meta charset="UTF-8"> 4 <meta charset="UTF-8">
5 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 5 <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 <meta name="viewport" content="width=device-width, initial-scale=1"> 6 <meta name="viewport" content="width=device-width, initial-scale=1">
7 - <title></title> 7 + <title>选择城市</title>
8 <link rel="stylesheet" href="../../assets/css/reset.css"> 8 <link rel="stylesheet" href="../../assets/css/reset.css">
9 <link rel="stylesheet" type="text/css" href="../../assets/css/city.css"> 9 <link rel="stylesheet" type="text/css" href="../../assets/css/city.css">
10 <style> 10 <style>
@@ -39,13 +39,6 @@ @@ -39,13 +39,6 @@
39 </head> 39 </head>
40 40
41 <body> 41 <body>
42 -<header>  
43 - <div class="index_header">  
44 - <div class="close_left" @click.stop="close"><span class="iconfont icon-fanhui"></span></div>  
45 - <div>选择城市</div>  
46 - <div></div>  
47 - </div>  
48 -</header>  
49 <div class="city"> 42 <div class="city">
50 <div class="city-wrapper city-wrapper-hook"> 43 <div class="city-wrapper city-wrapper-hook">
51 <div class="scroller-hook"> 44 <div class="scroller-hook">
@@ -57,6 +50,7 @@ @@ -57,6 +50,7 @@
57 50
58 <script src="../../assets/js/bscroll.min.js"></script> 51 <script src="../../assets/js/bscroll.min.js"></script>
59 <script src="../../assets/js/city.js"></script> 52 <script src="../../assets/js/city.js"></script>
  53 +<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
60 <script> 54 <script>
61 var cityWrapper = document.querySelector('.city-wrapper-hook'); 55 var cityWrapper = document.querySelector('.city-wrapper-hook');
62 var cityScroller = document.querySelector('.scroller-hook'); 56 var cityScroller = document.querySelector('.scroller-hook');
@@ -77,7 +71,7 @@ @@ -77,7 +71,7 @@
77 lists += '<div class="title">'+name+'</div>'; 71 lists += '<div class="title">'+name+'</div>';
78 lists += '<ul>'; 72 lists += '<ul>';
79 group.cities.forEach(function(g) { 73 group.cities.forEach(function(g) {
80 - lists += '<li class="item" data-name="'+ g.name +'" data-id="'+ g.cityid +'"><span class="border-1px name">'+ g.name +'</span></li>'; 74 + lists += '<li class="item" data-name="'+ g.name +'" data-id="'+ g.cityid +'" onclick="getCityName(event)"><span class="border-1px name">'+ g.name +'</span></li>';
81 }); 75 });
82 lists += '</ul>'; 76 lists += '</ul>';
83 var name = group.name.substr(0, 1); 77 var name = group.name.substr(0, 1);
@@ -94,7 +88,8 @@ @@ -94,7 +88,8 @@
94 shortcut.style.top = (cityWrapper.clientHeight - shortcut.clientHeight) / 2 + 'px'; 88 shortcut.style.top = (cityWrapper.clientHeight - shortcut.clientHeight) / 2 + 'px';
95 89
96 scroll = new window.BScroll(cityWrapper, { 90 scroll = new window.BScroll(cityWrapper, {
97 - probeType: 3 91 + probeType: 3,
  92 + click: true
98 }); 93 });
99 94
100 // scroll.on('scroll', function (pos) { 95 // scroll.on('scroll', function (pos) {
@@ -139,6 +134,11 @@ @@ -139,6 +134,11 @@
139 } 134 }
140 } 135 }
141 } 136 }
  137 + function getCityName(event){
  138 + var cityName = event.target.innerText;
  139 + localStorage.setItem('cityName',cityName)
  140 + window.history.back()
  141 + }
142 initCities(); 142 initCities();
143 bindEvent(); 143 bindEvent();
144 144
@@ -214,18 +214,7 @@ @@ -214,18 +214,7 @@
214 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script> 214 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
215 <script type="text/javascript" src="../../assets/js/axios.min.js"></script> 215 <script type="text/javascript" src="../../assets/js/axios.min.js"></script>
216 <script> 216 <script>
217 - new Swiper('.swiper-container', {  
218 - observer: true,  
219 - observeParents: true,  
220 - slidesPerView: 1,  
221 - // autoplayDisableOnInteraction: false,  
222 - loop: true,  
223 - navigation: {  
224 - nextEl: '.change_slide',  
225 - },  
226 - autoHeight: false,  
227 - speed: 1500,  
228 - }); 217 +
229 var app = new Vue({ 218 var app = new Vue({
230 el: "#app", 219 el: "#app",
231 data: { 220 data: {
@@ -265,11 +254,35 @@ @@ -265,11 +254,35 @@
265 }, 254 },
266 mounted: function () { 255 mounted: function () {
267 window.addEventListener('scroll', this.handleScroll) 256 window.addEventListener('scroll', this.handleScroll)
  257 + // new Swiper('.swiper-container', {
  258 + // autoplay: true,
  259 + // observer: true,
  260 + // observeParents: true,
  261 + // slidesPerView: 1,
  262 + // autoplayDisableOnInteraction: false,
  263 + // loop: true,
  264 + // autoHeight: false,
  265 + // speed: 1500
  266 + // });
  267 + new Swiper('.swiper-container', {
  268 + initialSlide :0,
  269 + autoplay: 2000,
  270 + observer: true,
  271 + observeParents: true,
  272 + slidesPerView: 1,
  273 + autoplayDisableOnInteraction: false,
  274 + loop: true,
  275 + navigation: {
  276 + nextEl: '.change_slide',
  277 + },
  278 + autoHeight: false,
  279 + speed: 1500
  280 + });
268 }, 281 },
269 methods: { 282 methods: {
270 // 我的消息 283 // 我的消息
271 my_news: function () { 284 my_news: function () {
272 - openView('my_news', 'my/my_news', '消息通知', 'my_news', false, { 285 + openView('my_news', '../my/my_news', '消息通知', 'my_news', false, {
273 new_type: 0 286 new_type: 0
274 }) 287 })
275 }, 288 },
@@ -339,9 +352,7 @@ @@ -339,9 +352,7 @@
339 // }); 352 // });
340 // }); 353 // });
341 } 354 }
342 -  
343 function onError(erro) { 355 function onError(erro) {
344 - console.log(erro)  
345 // 定位出错 356 // 定位出错
346 toastMsg('请开启定位功能') 357 toastMsg('请开启定位功能')
347 } 358 }
@@ -456,10 +467,7 @@ @@ -456,10 +467,7 @@
456 }, 467 },
457 // 轮播图跳转详情 468 // 轮播图跳转详情
458 care: function (id, care_name) { 469 care: function (id, care_name) {
459 - window.location.href = 'care_f.html';  
460 - localStorage.removeItem('cid');  
461 - localStorage.setItem('id',id);  
462 - localStorage.setItem('care_name',care_name); 470 + var app = this ;
463 // api.openWin({ 471 // api.openWin({
464 // name: 'care_w', 472 // name: 'care_w',
465 // url: './care_w.html', 473 // url: './care_w.html',
@@ -468,6 +476,22 @@ @@ -468,6 +476,22 @@
468 // care_name: care_name 476 // care_name: care_name
469 // } 477 // }
470 // }) 478 // })
  479 + if(care_name.indexOf('旅游') == -1){
  480 + localStorage.removeItem('cid');
  481 + openWin({
  482 + name: 'care_w',
  483 + url: './care_f.html',
  484 + pageParam: {
  485 + id: id,
  486 + care_name: care_name
  487 + }
  488 + })
  489 + }else{
  490 + localStorage.setItem('cid',id);
  491 + localStorage.setItem('cityName',app.cityname);
  492 + window.location.href = 'tral_f.html';
  493 +
  494 + }
471 }, 495 },
472 getUserIndexInfo: function () { 496 getUserIndexInfo: function () {
473 var header = { 497 var header = {
@@ -494,59 +518,59 @@ @@ -494,59 +518,59 @@
494 openItem: function (id, name) { 518 openItem: function (id, name) {
495 switch (id) { 519 switch (id) {
496 case 1: 520 case 1:
497 - url = 'nursing_f' 521 + url = 'nursing_f';
498 // openView('nursing_f', 'index/nursing_f', name, 'nursing_f', false, { 522 // openView('nursing_f', 'index/nursing_f', name, 'nursing_f', false, {
499 // cid: id, 523 // cid: id,
500 // cityname: app.cityname 524 // cityname: app.cityname
501 // }); 525 // });
502 break; 526 break;
503 case 2: 527 case 2:
504 - url = 'disease_f' 528 + url = 'disease_f';
505 // openView('disease_f', 'index/disease_f', name, 'disease_f', false, { 529 // openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
506 // cid: id, 530 // cid: id,
507 // cityname: app.cityname 531 // cityname: app.cityname
508 // }); 532 // });
509 break; 533 break;
510 case 3: 534 case 3:
511 - url = 'disease_f' 535 + url = 'disease_f';
512 // openView('disease_f', 'index/disease_f', name, 'disease_f', false, { 536 // openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
513 // cid: id, 537 // cid: id,
514 // cityname: app.cityname 538 // cityname: app.cityname
515 // }); 539 // });
516 break; 540 break;
517 case 4: 541 case 4:
518 - url = 'examination_f' 542 + url = 'examination_f';
519 // openView('examination_f', 'index/examination_f', name, 'examination_f', false, { 543 // openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
520 // cid: id, 544 // cid: id,
521 // cityname: app.cityname 545 // cityname: app.cityname
522 // }); 546 // });
523 break; 547 break;
524 case 5: 548 case 5:
525 - url = 'doc_home_f' 549 + url = 'doc_home_f';
526 break; 550 break;
527 case 6: 551 case 6:
528 - url = 'disease_f' 552 + url = 'disease_f';
529 // openView('disease_f', 'index/disease_f', name, 'disease_f', false, { 553 // openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
530 // cid: id, 554 // cid: id,
531 // cityname: app.cityname 555 // cityname: app.cityname
532 // }); 556 // });
533 break; 557 break;
534 case 7: 558 case 7:
535 - url = 'examination_f' 559 + url = 'examination_f';
536 // openView('examination_f', 'index/examination_f', name, 'examination_f', false, { 560 // openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
537 // cid: id, 561 // cid: id,
538 // cityname: app.cityname 562 // cityname: app.cityname
539 // }); 563 // });
540 break; 564 break;
541 case 8: 565 case 8:
542 - url = 'examination_f' 566 + url = 'examination_f';
543 // openView('examination_f', 'index/examination_f', name, 'examination_f', false, { 567 // openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
544 // cid: id, 568 // cid: id,
545 // cityname: app.cityname 569 // cityname: app.cityname
546 // }); 570 // });
547 break; 571 break;
548 case 9: 572 case 9:
549 - url = 'Insurance' 573 + url = 'Insurance';
550 // api.openWin({ 574 // api.openWin({
551 // name: 'Insurance_w', 575 // name: 'Insurance_w',
552 // url: './Insurance_w.html', 576 // url: './Insurance_w.html',
@@ -557,7 +581,7 @@ @@ -557,7 +581,7 @@
557 // }); 581 // });
558 break; 582 break;
559 case 10: 583 case 10:
560 - url = 'tral_f' 584 + url = 'tral_f';
561 // api.openWin({ 585 // api.openWin({
562 // name: 'tral_w', 586 // name: 'tral_w',
563 // url: './tral_w.html', 587 // url: './tral_w.html',
@@ -587,18 +611,35 @@ @@ -587,18 +611,35 @@
587 }, 611 },
588 // 获取严选推荐列表 612 // 获取严选推荐列表
589 show: function () { 613 show: function () {
  614 + var app = this;
590 getRequest('POST', 'portal/index/show', null, null).then(function (res) { 615 getRequest('POST', 'portal/index/show', null, null).then(function (res) {
591 // alert(JSON.stringify(res)); 616 // alert(JSON.stringify(res));
592 if (res.data.code == 1) { 617 if (res.data.code == 1) {
593 - app.show_data = res.data.data  
594 - } else {} 618 + app.show_data = res.data.data;
  619 + } else {}
595 }) 620 })
596 }, 621 },
597 //底部菜单跳转 622 //底部菜单跳转
598 changeTab(index) { 623 changeTab(index) {
599 var url = index == 0 ? 'index_f.html' : index == 1 ? '../strict/strict_f.html' : '../my/my_f.html' 624 var url = index == 0 ? 'index_f.html' : index == 1 ? '../strict/strict_f.html' : '../my/my_f.html'
600 window.location.href = url 625 window.location.href = url
601 - } 626 + },
  627 + // 初始化轮播
  628 + initSwiper() {
  629 + new Swiper('.swiper-container', {
  630 + autoplay: true,
  631 + observer: true,
  632 + observeParents: true,
  633 + autoplayDisableOnInteraction: true,
  634 + loop: true,
  635 + nextButton: '.change_slide',
  636 + autoHeight: true,
  637 + speed: 1500,
  638 + lazyLoading: true
  639 + });
  640 + }
  641 +
  642 +
602 643
603 } 644 }
604 }) 645 })
@@ -90,7 +90,7 @@ @@ -90,7 +90,7 @@
90 .city_top { 90 .city_top {
91 position: fixed; 91 position: fixed;
92 left: 0; 92 left: 0;
93 - top: 0; 93 + top: 0.68rem;
94 width: 100%; 94 width: 100%;
95 display: flex; 95 display: flex;
96 align-items: center; 96 align-items: center;
@@ -739,10 +739,24 @@ @@ -739,10 +739,24 @@
739 margin: 0.21rem 0.24rem 0.8rem 0.24rem; 739 margin: 0.21rem 0.24rem 0.8rem 0.24rem;
740 overflow: hidden; 740 overflow: hidden;
741 } 741 }
  742 + .close_top{
  743 + display: flex;
  744 + height: 0.68rem;
  745 + align-items: center;
  746 + justify-content: flex-end;
  747 + padding: 0 15px;
  748 + }
  749 + #warp{
  750 + -webkit-overflow-scrolling:touch;
  751 + }
  752 + .over_hidden{
  753 + height: 100%;
  754 + overflow: hidden;
  755 + }
742 </style> 756 </style>
743 <body> 757 <body>
744 <div id="loadStart"></div> 758 <div id="loadStart"></div>
745 -<div id="app" v-cloak> 759 +<div id="warp" :class="{over_hidden:city}" v-cloak>
746 <div class="swiper_item margin0"> 760 <div class="swiper_item margin0">
747 <div class="swiper_item_img"><img :src="goods.icon" alt=""></div> 761 <div class="swiper_item_img"><img :src="goods.icon" alt=""></div>
748 <div class="swiper_item_right"> 762 <div class="swiper_item_right">
@@ -911,6 +925,11 @@ @@ -911,6 +925,11 @@
911 <div class="city_container" v-if="city"> 925 <div class="city_container" v-if="city">
912 <div v-cloak> 926 <div v-cloak>
913 <div id="container"></div> 927 <div id="container"></div>
  928 + <div class="close_top">
  929 + <div class="meal_title">
  930 + <span class="iconfont icon-cuohao" @click="close"></span>
  931 + </div>
  932 + </div>
914 <div class="city_top"> 933 <div class="city_top">
915 <div class="city_name_box" @click="choose_city_fun"> 934 <div class="city_name_box" @click="choose_city_fun">
916 <span class="iconfont icon-dizhi"></span> 935 <span class="iconfont icon-dizhi"></span>
@@ -990,18 +1009,25 @@ @@ -990,18 +1009,25 @@
990 </div> 1009 </div>
991 <div @click="close" class="meal" v-if="taocan"> 1010 <div @click="close" class="meal" v-if="taocan">
992 <div class="meal_item" @click.stop> 1011 <div class="meal_item" @click.stop>
993 - <div class="meal_title"><span></span><span>选择套餐</span><span class="iconfont icon-cuohao"  
994 - @click="close"></span></div> 1012 + <div class="meal_title">
  1013 + <span></span>
  1014 + <span>选择套餐</span>
  1015 + <span class="iconfont icon-cuohao" @click="close"></span>
  1016 + </div>
995 <div class="meal_price_box"> 1017 <div class="meal_price_box">
996 - <div><span>服务价格</span><span class="meal_price">优惠价格¥{{Math.abs(priceList.count)?Math.abs(priceList.count):0}}</span> 1018 + <div>
  1019 + <span>服务价格</span>
  1020 + <span class="meal_price">优惠价格¥{{Math.abs(priceList.count)?Math.abs(priceList.count):0}}</span>
  1021 + </div>
  1022 + <div class="price">
  1023 + <span class="meal_price">¥{{priceList.price?priceList.price:0}}</span>
  1024 + <span class="old_price">原价¥{{priceList.o_price?priceList.o_price:0}}</span>
997 </div> 1025 </div>
998 - <div class="price"><span class="meal_price">¥{{priceList.price?priceList.price:0}}</span><span  
999 - class="old_price">原价¥{{priceList.o_price?priceList.o_price:0}}</span></div>  
1000 </div> 1026 </div>
1001 <div class="incer">此服务由慈界平台优质服务商提供</div> 1027 <div class="incer">此服务由慈界平台优质服务商提供</div>
1002 - <div class="sever_list"><span :class="{'span_active':index==active_index}"  
1003 - v-for="(item,index) in attribute"  
1004 - @click="t_choose_sever(item,index)">{{item}}</span></div> 1028 + <div class="sever_list">
  1029 + <span :class="{'span_active':index==active_index}" v-for="(item,index) in attribute" @click="t_choose_sever(item,index)">{{item}}</span>
  1030 + </div>
1005 <div class="pay_box"> 1031 <div class="pay_box">
1006 <span class="pay_num">购买数量 <span 1032 <span class="pay_num">购买数量 <span
1007 class="limit">(限购<span>{{priceList.limit_num?priceList.limit_num:0}}</span>{{unit}})</span></span> 1033 class="limit">(限购<span>{{priceList.limit_num?priceList.limit_num:0}}</span>{{unit}})</span></span>
@@ -1082,7 +1108,7 @@ @@ -1082,7 +1108,7 @@
1082 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js"></script> 1108 <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
1083 <script> 1109 <script>
1084 var app = new Vue({ 1110 var app = new Vue({
1085 - el: '#app', 1111 + el: '#warp',
1086 data: { 1112 data: {
1087 img_show: true, 1113 img_show: true,
1088 imgshow: true, 1114 imgshow: true,
@@ -1269,10 +1295,9 @@ @@ -1269,10 +1295,9 @@
1269 'trigger': '#sever', /*按钮选择器,用于触发弹出插件*/ 1295 'trigger': '#sever', /*按钮选择器,用于触发弹出插件*/
1270 'type': 'datetime', /*模式:date日期;datetime日期时间;time时间;ym年月;*/ 1296 'type': 'datetime', /*模式:date日期;datetime日期时间;time时间;ym年月;*/
1271 // 'minDate':getTimeDetil(3), /*最小日期*/ 1297 // 'minDate':getTimeDetil(3), /*最小日期*/
1272 - 'minDate': formatDate(new Date(getTimeDetil(3)), 1), /*最小日期*/  
1273 - 'maxDate': '', /*最大日期*/ 1298 + 'minDate': getTimeDetil(3), /*最小日期*/
  1299 + 'maxDate': formatDate(new Date(getTimeDetil(168))), /*最大日期*/
1274 'onSubmit': function () {/*确认时触发事件*/ 1300 'onSubmit': function () {/*确认时触发事件*/
1275 - console.log(calendar.value);  
1276 if (checkDate(calendar.value, 1)) { 1301 if (checkDate(calendar.value, 1)) {
1277 app.date_info = calendar.value; 1302 app.date_info = calendar.value;
1278 calendar.onClose() 1303 calendar.onClose()
@@ -1680,6 +1705,7 @@ @@ -1680,6 +1705,7 @@
1680 this.taocan = false; 1705 this.taocan = false;
1681 this.room = false; 1706 this.room = false;
1682 this.tool = false; 1707 this.tool = false;
  1708 + this.city = false;
1683 }, 1709 },
1684 t_choose_sever: function (attr, index) { 1710 t_choose_sever: function (attr, index) {
1685 var app = this; 1711 var app = this;
@@ -482,7 +482,7 @@ @@ -482,7 +482,7 @@
482 getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function(res) { 482 getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function(res) {
483 // alert(JSON.stringify(res)); 483 // alert(JSON.stringify(res));
484 if(res.data.code == 1) { 484 if(res.data.code == 1) {
485 - res.data.data.avatar = 'http://wx.cijievip.com'+res.data.data.avatar 485 + res.data.data.avatar = res.data.data.avatar
486 app.user_type = res.data.data; 486 app.user_type = res.data.data;
487 } else {} 487 } else {}
488 loadEnd() 488 loadEnd()
@@ -100,8 +100,6 @@ @@ -100,8 +100,6 @@
100 // var app = this; 100 // var app = this;
101 // app.rid = api.pageParam.rid; 101 // app.rid = api.pageParam.rid;
102 this.rid = localStorage.getItem('rid'); 102 this.rid = localStorage.getItem('rid');
103 -  
104 - // alert(app.rid);  
105 this.healthData(); 103 this.healthData();
106 // api.addEventListener({ 104 // api.addEventListener({
107 // name: 'sugar' 105 // name: 'sugar'
@@ -148,15 +146,17 @@ @@ -148,15 +146,17 @@
148 'XX-Token': getToken() 146 'XX-Token': getToken()
149 }; 147 };
150 getRequest('post', 'user/index/healthData', post, header).then(function (res) { 148 getRequest('post', 'user/index/healthData', post, header).then(function (res) {
151 - loadEnd();  
152 - console.log(res) 149 + console.log(res);
153 if (res.data.code == 1) { 150 if (res.data.code == 1) {
154 - app.sugar_data = res.data.data.suger.data ? res.data.data.suger.data : 0;  
155 - app.puser_data = res.data.data.puser.data ? res.data.data.puser.data : 0/0; 151 + var puser_data = res.data.data.puser.data;
  152 + var suger_data = res.data.data.suger.data;
  153 + app.sugar_data = !isNaN(suger_data) ? res.data.data.suger.data : 0;
  154 + app.puser_data = !isNaN(puser_data) ? res.data.data.puser.data : 0/0;
156 } 155 }
  156 + loadEnd();
157 157
158 }) 158 })
159 } 159 }
160 } 160 }
161 }) 161 })
162 -</script> 162 +
@@ -53,8 +53,6 @@ @@ -53,8 +53,6 @@
53 53
54 .date_box { 54 .date_box {
55 position:relative; 55 position:relative;
56 - width:7.5rem;  
57 -  
58 display: flex; 56 display: flex;
59 align-items: center; 57 align-items: center;
60 justify-content: space-between; 58 justify-content: space-between;
@@ -75,7 +73,6 @@ @@ -75,7 +73,6 @@
75 position:absolute; 73 position:absolute;
76 right:0.9rem; 74 right:0.9rem;
77 top:0.4rem; 75 top:0.4rem;
78 -  
79 } 76 }
80 77
81 .save_btn { 78 .save_btn {
@@ -108,6 +105,10 @@ @@ -108,6 +105,10 @@
108 height:0.68rem; 105 height:0.68rem;
109 border:none; 106 border:none;
110 } 107 }
  108 + .jebody{
  109 + width: 100%;
  110 + overflow: hidden;
  111 + }
111 body .weui-toast{ 112 body .weui-toast{
112 min-height: 40px; 113 min-height: 40px;
113 line-height: 40px; 114 line-height: 40px;
@@ -140,14 +141,11 @@ @@ -140,14 +141,11 @@
140 <!--<div class="date_item">请选择测量时间</div>--> 141 <!--<div class="date_item">请选择测量时间</div>-->
141 <!--<div class="iconfont icon-xiangyou"></div>--> 142 <!--<div class="iconfont icon-xiangyou"></div>-->
142 <!--</div>--> 143 <!--</div>-->
143 -  
144 <div class="jeitem"> 144 <div class="jeitem">
145 - <div class="date_box" id="choose_time">  
146 - <input type="text" id="chosetime" placeholder="请选择测量时间"> 145 + <div class="date_box" id="choose_times">
  146 + <input type="text" readonly id="chosetime" placeholder="请选择测量时间">
147 </div> 147 </div>
148 </div> 148 </div>
149 -  
150 -  
151 <div class="save_btn">保存</div> 149 <div class="save_btn">保存</div>
152 </body> 150 </body>
153 </html> 151 </html>
@@ -168,11 +166,10 @@ @@ -168,11 +166,10 @@
168 <script type="text/javascript" src="../../assets/js/jedate.js"></script> 166 <script type="text/javascript" src="../../assets/js/jedate.js"></script>
169 <script type="text/javascript"> 167 <script type="text/javascript">
170 $(document).ready(function () { 168 $(document).ready(function () {
171 - var type=1 169 + var type=1;
172 $(".knob").knob(); 170 $(".knob").knob();
173 loadEnd(); 171 loadEnd();
174 - var rid=localStorage.getItem("rid")  
175 - 172 + var rid=localStorage.getItem("rid");
176 function getSugar() { 173 function getSugar() {
177 var header = { 174 var header = {
178 "XX-Device-Type": getDevice(), 175 "XX-Device-Type": getDevice(),
@@ -185,6 +182,7 @@ @@ -185,6 +182,7 @@
185 getRequest('post', 'user/index/getLastBoolData', post, header).then(function (res) { 182 getRequest('post', 'user/index/getLastBoolData', post, header).then(function (res) {
186 if (res.data.code == 1) { 183 if (res.data.code == 1) {
187 $('.knob').val(res.data.data.data); 184 $('.knob').val(res.data.data.data);
  185 + $('#chosetime').val(res.data.data.time);
188 $('.date_item').text(res.data.data.time); 186 $('.date_item').text(res.data.data.time);
189 $('.sugar_type span').removeClass('spanactive').eq(res.data.data.time_type-1).addClass('spanactive'); 187 $('.sugar_type span').removeClass('spanactive').eq(res.data.data.time_type-1).addClass('spanactive');
190 } else { 188 } else {
@@ -204,75 +202,32 @@ @@ -204,75 +202,32 @@
204 }); 202 });
205 $('.date_box').click(function () { 203 $('.date_box').click(function () {
206 204
207 - // if (api.systemType == 'ios') {  
208 - // api.openPicker({  
209 - // type: 'date_time',  
210 - // date: new Date(),  
211 - // maxDate: getTimeDetil(0),  
212 - // title: '测量时间'  
213 - // }, function (ret, err) {  
214 - // console.log(ret)  
215 - // if (ret) {  
216 - // var year = ret.year;  
217 - // var month = ret.month;  
218 - // var day = ret.day;  
219 - // var hour = ret.hour;  
220 - // var minute = ret.minute;  
221 - // var date_info = year + '-' + add0(month) + '-' + add0(day) + ' ' + add0(hour) + ':' + add0(minute);  
222 - // if (checkDate(date_info, 2)) {  
223 - // $('.date_item').html(date_info)  
224 - // } else {  
225 - // toastMsg('选择日期不能大于当前时间');  
226 - // $('.date_item').html('请选择测量时间')  
227 - // }  
228 - // } else {  
229 - // console.log(err)  
230 - // }  
231 - // });  
232 - // }  
233 - // else {  
234 - // api.openPicker({  
235 - // type: 'date',  
236 - // title: '服务日期',  
237 - // }, function (ret, err) {  
238 - // if (ret) {  
239 - // var year = ret.year;  
240 - // var month = ret.month;  
241 - // var day = ret.day;  
242 - // api.openPicker({  
243 - // type: 'time',  
244 - // title: '服务时间'  
245 - // }, function (rets, errs) {  
246 - // if (rets) {  
247 - // var hour = rets.hour;  
248 - // var minute = rets.minute;  
249 - // var date_info = year + '-' + add0(month) + '-' + add0(day) + ' ' + add0(hour) + ':' + add0(minute);  
250 - // if (checkDate(date_info, 2)) {  
251 - // $('.date_item').html(date_info);  
252 - // } else {  
253 - // toastMsg('选择日期不能大于当前时间');  
254 - // $('.date_item').html('请选择测量时间')  
255 - // }  
256 - // } else {  
257 - // console.log(errs)  
258 - // }  
259 - // });  
260 - // } else {  
261 - // console.log(err)  
262 - // }  
263 - // });  
264 - // }  
265 -  
266 -  
267 -  
268 }); 205 });
  206 + //时间选择
  207 + $('#choose_times').click(function(){
  208 + var calendar = new datePicker();
  209 + calendar.init({
  210 + 'trigger': '#choose_times', /*按钮选择器,用于触发弹出插件*/
  211 + 'type': 'datetime', /*模式:date日期;datetime日期时间;time时间;ym年月;*/
  212 + // 'minDate':getTimeDetil(3), /*最小日期*/
  213 + 'minDate': '', /*最小日期*/
  214 + 'maxDate': '', /*最大日期*/
  215 + 'onSubmit': function () {/*确认时触发事件*/
  216 + if (calendar.value) {
  217 + $('#chosetime').val(calendar.value);
  218 + calendar.onClose()
  219 + }
  220 + },
  221 + 'onClose': function () {/*取消时触发事件*/
  222 + // api.closeWin();
  223 + }
  224 + });
  225 + })
269 226
270 $('.save_btn').click(function () { 227 $('.save_btn').click(function () {
271 var rid=localStorage.getItem("rid"); 228 var rid=localStorage.getItem("rid");
272 var value = $('.knob').val(); 229 var value = $('.knob').val();
273 var date = $('#chosetime').val(); 230 var date = $('#chosetime').val();
274 - date=date.split("T");  
275 - date=date[0]+" " +date[1];  
276 type = $('.spanactive').attr('data-id') 231 type = $('.spanactive').attr('data-id')
277 // console.log(type) 232 // console.log(type)
278 var post = { 233 var post = {
@@ -162,9 +162,9 @@ @@ -162,9 +162,9 @@
162 position: fixed; 162 position: fixed;
163 width: 100%; 163 width: 100%;
164 left: 0; 164 left: 0;
165 - bottom: 1.3rem; 165 + bottom: 1.31rem;
166 z-index: 2; 166 z-index: 2;
167 - /*border-top: 1px solid #fff;*/ 167 + border-bottom: 1px solid #f2f2f2;
168 } 168 }
169 169
170 .strict_btn_price { 170 .strict_btn_price {
@@ -354,7 +354,7 @@ @@ -354,7 +354,7 @@
354 // 我的消息 354 // 我的消息
355 // 去认购 355 // 去认购
356 go_pay: function() { 356 go_pay: function() {
357 - openView('strict_pay', 'strict/strict_pay', '认购') 357 + openView('strict_pay', '../strict/strict_pay', '认购')
358 }, 358 },
359 // 分享 359 // 分享
360 share: function() { 360 share: function() {
@@ -7,9 +7,10 @@ @@ -7,9 +7,10 @@
7 <meta http-equiv="X-UA-Compatible" content="ie=edge"> 7 <meta http-equiv="X-UA-Compatible" content="ie=edge">
8 <meta name="format-detection" content="telephone=no,email=no,date=no,address=no"> 8 <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
9 <script src="../../assets/js/fontsize.js"></script> 9 <script src="../../assets/js/fontsize.js"></script>
10 - <link rel="stylesheet" href="../../assets/css/api.css"/>  
11 <link rel="stylesheet" href="../../assets/css/style.css"> 10 <link rel="stylesheet" href="../../assets/css/style.css">
12 <link rel="stylesheet" href="../../assets/css/index.css"> 11 <link rel="stylesheet" href="../../assets/css/index.css">
  12 + <link rel="stylesheet" href="../../assets/css/weui.min.css">
  13 + <link rel="stylesheet" href="../../assets/css/api.css"/>
13 <link rel="stylesheet" href="../../assets/icon/iconfont.css"> 14 <link rel="stylesheet" href="../../assets/icon/iconfont.css">
14 <title></title> 15 <title></title>
15 <style> 16 <style>
@@ -209,6 +210,7 @@ @@ -209,6 +210,7 @@
209 </body> 210 </body>
210 </html> 211 </html>
211 <script type="text/javascript" src="../../assets/js/api.js"></script> 212 <script type="text/javascript" src="../../assets/js/api.js"></script>
  213 +<script type="text/javascript" src="../../assets/js/weui.min.js"></script>
212 <script type="text/javascript" src="../../assets/js/vue.min.js"></script> 214 <script type="text/javascript" src="../../assets/js/vue.min.js"></script>
213 <script type="text/javascript" src="../../assets/js/index.js"></script> 215 <script type="text/javascript" src="../../assets/js/index.js"></script>
214 <script type="text/javascript" src="../../assets/js/public.js"></script> 216 <script type="text/javascript" src="../../assets/js/public.js"></script>
@@ -235,28 +237,28 @@ @@ -235,28 +237,28 @@
235 pos: 'fixed' 237 pos: 'fixed'
236 }, 238 },
237 created: function () { 239 created: function () {
238 - apiready = function () {  
239 - app.crowdPrice();  
240 - var client_h = window.innerHeight;  
241 - window.addEventListener('resize', function () {  
242 - if (window.innerHeight < client_h) {  
243 - app.pos = 'relative'  
244 - } else {  
245 - app.pos = 'fixed'  
246 - }  
247 - }, false);  
248 - } 240 + this.crowdPrice();
  241 + var client_h = window.innerHeight;
  242 + window.addEventListener('resize', function () {
  243 + if (window.innerHeight < client_h) {
  244 + app.pos = 'relative'
  245 + } else {
  246 + app.pos = 'fixed'
  247 + }
  248 + }, false);
249 }, 249 },
250 methods: { 250 methods: {
251 // 认购协议 251 // 认购协议
252 openAgree: function () { 252 openAgree: function () {
253 - openView('agree_content', 'common/agree_content', '认购协议', 'agree_content', false, { 253 +
  254 + openView('agree_content', '../common/agree_content', '认购协议', 'agree_content', false, {
254 title_name: '认购协议', 255 title_name: '认购协议',
255 id: 4 256 id: 4
256 }, false) 257 }, false)
257 }, 258 },
258 // 选择权益 259 // 选择权益
259 power: function (index, type) { 260 power: function (index, type) {
  261 + var app = this;
260 app.type_vip = type; 262 app.type_vip = type;
261 app.popupVisible = false; 263 app.popupVisible = false;
262 app.strict_num = app.price_data[index].mix_price; 264 app.strict_num = app.price_data[index].mix_price;
@@ -265,6 +267,7 @@ @@ -265,6 +267,7 @@
265 }, 267 },
266 // 减少数量 268 // 减少数量
267 reduce: function () { 269 reduce: function () {
  270 + var app = this;
268 if (app.strict_num > 1) { 271 if (app.strict_num > 1) {
269 app.strict_num--; 272 app.strict_num--;
270 for (var i in app.price_data) { 273 for (var i in app.price_data) {
@@ -283,6 +286,7 @@ @@ -283,6 +286,7 @@
283 }, 286 },
284 // 增加数量 287 // 增加数量
285 plus: function () { 288 plus: function () {
  289 + var app = this
286 app.strict_num++; 290 app.strict_num++;
287 for (var i in app.price_data) { 291 for (var i in app.price_data) {
288 if (app.strict_num > parseInt(app.price_data[app.price_data.length - 1].max_price)) { 292 if (app.strict_num > parseInt(app.price_data[app.price_data.length - 1].max_price)) {
@@ -300,6 +304,7 @@ @@ -300,6 +304,7 @@
300 }, 304 },
301 // 改变数量 输入框 305 // 改变数量 输入框
302 change_value: function () { 306 change_value: function () {
  307 + var app = this
303 if (!/^[2-9]+\d*$/.test(app.strict_num)) { 308 if (!/^[2-9]+\d*$/.test(app.strict_num)) {
304 toastMsg('请输入大于等于2的整数'); 309 toastMsg('请输入大于等于2的整数');
305 app.strict_num = 1; 310 app.strict_num = 1;
@@ -320,6 +325,7 @@ @@ -320,6 +325,7 @@
320 }, 325 },
321 // 获取方案信息 326 // 获取方案信息
322 crowdPrice: function () { 327 crowdPrice: function () {
  328 + var app = this
323 var header = { 329 var header = {
324 "XX-Device-Type": getDevice(), 330 "XX-Device-Type": getDevice(),
325 'XX-Token': getToken() 331 'XX-Token': getToken()
@@ -336,6 +342,7 @@ @@ -336,6 +342,7 @@
336 }, 342 },
337 // 提交认购 343 // 提交认购
338 pay_vip: function () { 344 pay_vip: function () {
  345 + var app = this
339 if (app.strict_num < 1 && app.plan_id == '') { 346 if (app.strict_num < 1 && app.plan_id == '') {
340 toastMsg('请选择权益方案') 347 toastMsg('请选择权益方案')
341 } else if (app.name == '') { 348 } else if (app.name == '') {
@@ -366,7 +373,7 @@ @@ -366,7 +373,7 @@
366 // alert(JSON.stringify(res)); 373 // alert(JSON.stringify(res));
367 if (res.data.code == 1) { 374 if (res.data.code == 1) {
368 var order_id = res.data.data.oid; 375 var order_id = res.data.data.oid;
369 - openView('my_pay', 'my/my_pay', '支付', 'my_pay', false, {order_id: order_id}); 376 + openView('my_pay', '../my/my_pay', '支付', 'my_pay', false, {order_id: order_id});
370 } else { 377 } else {
371 toastMsg(res.data.msg) 378 toastMsg(res.data.msg)
372 } 379 }