作者 朱振飞

预约模块地址处理

@@ -351,19 +351,20 @@ function getRequest(type, url, params, header) { @@ -351,19 +351,20 @@ function getRequest(type, url, params, header) {
351 url: baseurl + url, 351 url: baseurl + url,
352 method: type, 352 method: type,
353 params: params, 353 params: params,
354 - headers: header, 354 + headers: header
355 }).then(function (res) { 355 }).then(function (res) {
356 - if (res.data.code == 502) {  
357 - // setTimeout(() => {  
358 - // window.location.href = '../../html/login/login_index.html'  
359 - // }, 2000); 356 + if (res.data.code == '502') {
  357 + setTimeout(function(){
  358 + window.location.href = '../../html/login/login_index.html'
  359 + }, 2000);
360 // openView('login_index', 'login/login_index', '登录', 'login_index', false, false, false) 360 // openView('login_index', 'login/login_index', '登录', 'login_index', false, false, false)
361 } else { 361 } else {
362 resolve(res) 362 resolve(res)
363 } 363 }
364 loadEnd(); 364 loadEnd();
365 // resolve(res) 365 // resolve(res)
366 - }).catch(function (err) { 366 + }).catch(function (err) {
  367 + console.log(121212)
367 toastMsg('网络错误'); 368 toastMsg('网络错误');
368 // openView('wrong', 'common/wrong', '网络错误', 'wrong', false, false, false); 369 // openView('wrong', 'common/wrong', '网络错误', 'wrong', false, false, false);
369 // alert(JSON.stringify(err)) 370 // alert(JSON.stringify(err))
@@ -173,14 +173,13 @@ @@ -173,14 +173,13 @@
173 userId: '', 173 userId: '',
174 }, 174 },
175 created: function () { 175 created: function () {
176 - var app = this  
177 // alert('预约' + api.pageParam.id) 176 // alert('预约' + api.pageParam.id)
178 - app.cid = localStorage.getItem('cid');  
179 - app.id = localStorage.getItem('id');  
180 - app.care_name = localStorage.getItem('care_name');  
181 - app.cityname = localStorage.getItem('cityname');  
182 - app.proCareInfoInfo();  
183 - app.getUserIndexInfo(); 177 + this.cid = localStorage.getItem('cid');
  178 + this.id = localStorage.getItem('id');
  179 + this.care_name = localStorage.getItem('care_name');
  180 + this.cityname = localStorage.getItem('cityname');
  181 + this.proCareInfoInfo();
  182 + this.getUserIndexInfo();
184 }, 183 },
185 methods: { 184 methods: {
186 // 去预约 185 // 去预约
@@ -387,7 +387,6 @@ @@ -387,7 +387,6 @@
387 app.attribute = api.pageParam.attribute.split(','); 387 app.attribute = api.pageParam.attribute.split(',');
388 app.id = api.pageParam.id; 388 app.id = api.pageParam.id;
389 app.unit = api.pageParam.unit; 389 app.unit = api.pageParam.unit;
390 -  
391 } 390 }
392 }, 391 },
393 methods: { 392 methods: {
@@ -398,6 +397,7 @@ @@ -398,6 +397,7 @@
398 api.closeWin(); 397 api.closeWin();
399 }, 398 },
400 choose_sever: function (attr, index) { 399 choose_sever: function (attr, index) {
  400 + var app = this;
401 app.active_index = index; 401 app.active_index = index;
402 app.active_name = app.attribute[index]; 402 app.active_name = app.attribute[index];
403 app.attribute_id = app.attribute[index].id; 403 app.attribute_id = app.attribute[index].id;
@@ -269,7 +269,6 @@ @@ -269,7 +269,6 @@
269 }else { 269 }else {
270 toastMsg('请选择入住类型') 270 toastMsg('请选择入住类型')
271 } 271 }
272 -  
273 }, 272 },
274 plus: function () { 273 plus: function () {
275 if (app.num < app.price_info.limit_num) { 274 if (app.num < app.price_info.limit_num) {
@@ -7,6 +7,35 @@ @@ -7,6 +7,35 @@
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>
  11 + header {
  12 + width: 100%;
  13 + height: auto;
  14 + font-size: 15px;
  15 + }
  16 +
  17 + .index_header {
  18 + line-height: 0.44rem;
  19 + color: #424242;
  20 + display: flex;
  21 + align-items: center;
  22 + justify-content: space-between;
  23 + padding: 0.24rem 0.42rem;
  24 + }
  25 +
  26 + .close_left {
  27 + position: relative;
  28 + }
  29 +
  30 + .close_left::before {
  31 + position: absolute;
  32 + left: -0.1rem;
  33 + right: -0.1rem;
  34 + top: -0.1rem;
  35 + bottom: -0.1rem;
  36 + content: '';
  37 + }
  38 + </style>
10 </head> 39 </head>
11 40
12 <body> 41 <body>
@@ -80,24 +109,17 @@ @@ -80,24 +109,17 @@
80 var firstTouch; 109 var firstTouch;
81 110
82 shortcut.addEventListener('touchstart', function (e) { 111 shortcut.addEventListener('touchstart', function (e) {
83 -  
84 var anchor = e.target.getAttribute('data-anchor'); 112 var anchor = e.target.getAttribute('data-anchor');
85 -  
86 firstTouch = e.touches[0]; 113 firstTouch = e.touches[0];
87 touch.y1 = firstTouch.pageY; 114 touch.y1 = firstTouch.pageY;
88 touch.anchor = anchor; 115 touch.anchor = anchor;
89 -  
90 scrollTo(anchor); 116 scrollTo(anchor);
91 -  
92 }); 117 });
93 118
94 shortcut.addEventListener('touchmove', function (e) { 119 shortcut.addEventListener('touchmove', function (e) {
95 -  
96 firstTouch = e.touches[0]; 120 firstTouch = e.touches[0];
97 touch.y2 = firstTouch.pageY; 121 touch.y2 = firstTouch.pageY;
98 -  
99 var anchorHeight = 16; 122 var anchorHeight = 16;
100 -  
101 var delta = (touch.y2 - touch.y1) / anchorHeight | 0; 123 var delta = (touch.y2 - touch.y1) / anchorHeight | 0;
102 124
103 var anchor = shortcutList[shortcutList.indexOf(touch.anchor) + delta]; 125 var anchor = shortcutList[shortcutList.indexOf(touch.anchor) + delta];
@@ -198,18 +198,8 @@ @@ -198,18 +198,8 @@
198 </footer> 198 </footer>
199 </div> 199 </div>
200 </body> 200 </body>
201 -  
202 </html> 201 </html>
203 -<script>  
204 - window.onLoad = function () {  
205 - var map = new AMap.Map('container');  
206 - }  
207 - var url = 'https://webapi.amap.com/maps?v=1.4.8&key=ef53760bd959a4df08b7d4587280e642&callback=onLoad';  
208 - var jsapi = document.createElement('script');  
209 - jsapi.charset = 'utf-8';  
210 - jsapi.src = url;  
211 - document.head.appendChild(jsapi);  
212 -</script> 202 +<script type="text/javascript" src = 'https://webapi.amap.com/maps?v=1.4.4&test=true&key=ef53760bd959a4df08b7d4587280e642&&plugin=AMap.ToolBar,AMap.IndoorMap'></script>
213 <script type="text/javascript" src="../../assets/js/api.js"></script> 203 <script type="text/javascript" src="../../assets/js/api.js"></script>
214 <script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script> 204 <script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script>
215 <script type="text/javascript" src="../../assets/js/weui.min.js"></script> 205 <script type="text/javascript" src="../../assets/js/weui.min.js"></script>
@@ -261,6 +251,12 @@ @@ -261,6 +251,12 @@
261 user_info: [] 251 user_info: []
262 }, 252 },
263 created: function () { 253 created: function () {
  254 + var cityName = localStorage.getItem('cityName')
  255 + if(cityName){
  256 + this.cityname = cityName
  257 + }else{
  258 + this.get_city()
  259 + }
264 this.cat(); //首页导航 260 this.cat(); //首页导航
265 this.indexList(); //第三栏 261 this.indexList(); //第三栏
266 this.show(); //严选推荐 262 this.show(); //严选推荐
@@ -323,16 +319,19 @@ @@ -323,16 +319,19 @@
323 }, 319 },
324 // 切换当前城市 320 // 切换当前城市
325 goToCity: function () { 321 goToCity: function () {
  322 + var app = this
326 if (app.cityname == '') { 323 if (app.cityname == '') {
327 toastMsg('定位中') 324 toastMsg('定位中')
328 } else { 325 } else {
329 - api.openWin({  
330 - name: 'city_win',  
331 - url: '../index/city_win.html',  
332 - pageParam: {  
333 - cityname: app.cityname  
334 - }  
335 - }); 326 + localStorage.setItem('cityName',app.cityname);
  327 + window.location.href = '../index/city_f.html';
  328 + // api.openWin({
  329 + // name: 'city_win',
  330 + // url: '',
  331 + // pageParam: {
  332 + // cityname: app.cityname
  333 + // }
  334 + // });
336 } 335 }
337 }, 336 },
338 // 显示快捷菜单 337 // 显示快捷菜单
@@ -202,6 +202,538 @@ @@ -202,6 +202,538 @@
202 background-color: #FFF; 202 background-color: #FFF;
203 overflow-y: auto; 203 overflow-y: auto;
204 } 204 }
  205 + /*套餐选择*/
  206 + .meal {
  207 + display: flex;
  208 + flex-direction: column;
  209 + justify-content: flex-end;
  210 + position: fixed;
  211 + top: 0;
  212 + left: 0;
  213 + width: 100%;
  214 + height: 100%;
  215 + background-color: rgba(0,0,0,0.5);
  216 + }
  217 +
  218 + .meal_title {
  219 + text-align: center;
  220 + color: #424242;
  221 + font-size: 15px;
  222 + font-weight: bold;
  223 + border-bottom: 1px solid #ccc;
  224 + display: flex;
  225 + align-items: center;
  226 + justify-content: space-between;
  227 + padding: 0.25rem;
  228 + }
  229 +
  230 + .meal_item {
  231 + background-color: #fff;
  232 + }
  233 +
  234 + .pay_box {
  235 + display: flex;
  236 + align-items: center;
  237 + justify-content: space-between;
  238 + padding: 0 10% 0.25rem 10%;
  239 + }
  240 +
  241 + .pay_num {
  242 + font-size: 12px;
  243 + color: #424242;
  244 + }
  245 +
  246 + .pay_btn_box {
  247 + display: flex;
  248 + align-items: center;
  249 + }
  250 +
  251 + .pay_btn_box .iconfont {
  252 + font-size: 20px;
  253 + color: #ccc;
  254 + }
  255 +
  256 + .pay_btn_box input {
  257 + width: 0.5rem;
  258 + text-align: center;
  259 + border: 0;
  260 + outline: none;
  261 + font-size: 15px;
  262 + }
  263 +
  264 + .pay_num .limit {
  265 + padding: 0;
  266 + font-size: 12px;
  267 + color: #ccc;
  268 + }
  269 +
  270 + .pay_btn {
  271 + font-size: 15px;
  272 + color: #fff;
  273 + background-color: #dbb25f;
  274 + text-align: center;
  275 + padding: 0.2rem 0;
  276 + }
  277 +
  278 + .room_box, .price_box {
  279 + display: flex;
  280 + /*align-items: center;*/
  281 + justify-content: space-between;
  282 + padding: 0.2rem 0.4rem 0 0.4rem;
  283 +
  284 + }
  285 +
  286 + .room_left {
  287 + font-size: 15px;
  288 + color: #424242;
  289 + }
  290 +
  291 + .youhui {
  292 + color: #d8b25f;
  293 + font-size: 12px;
  294 + margin-left: 0.1rem;
  295 + }
  296 +
  297 + .room_right {
  298 + color: #dbb25f;
  299 + font-size: 15px;
  300 + }
  301 +
  302 + .old_price {
  303 + text-decoration: line-through;
  304 + color: #ccc;
  305 + margin-left: 0.1rem;
  306 + }
  307 +
  308 + .room_tips {
  309 + color: #ccc;
  310 + font-size: 12px;
  311 + padding: 0 0.4rem;
  312 + }
  313 +
  314 + .price_left, .price_right {
  315 + display: flex;
  316 + /*align-items: center;*/
  317 + flex-wrap: wrap;
  318 + flex: 1;
  319 + }
  320 +
  321 + .price_left span, .price_right span {
  322 + background-color: #f2f2f2;
  323 + color: #424242;
  324 + padding: 0 0.2rem;
  325 + font-size: 14px;
  326 + margin: 0 0.2rem 0.2rem 0;
  327 + border-radius: 0.05rem;
  328 + cursor: pointer;
  329 + min-width: 0.88rem;
  330 + text-align: center;
  331 + height: 0.48rem;
  332 + display: flex;
  333 + align-items: center;
  334 + justify-content: center;
  335 + }
  336 +
  337 + .icon-cuohao {
  338 + font-size: 15px;
  339 + color: #424242;
  340 + }
  341 +
  342 + .price_box .span_active {
  343 + background-color: #dbb25f;
  344 + color: #fff;
  345 + }
  346 + .meal_title {
  347 + text-align: center;
  348 + color: #424242;
  349 + font-size: 15px;
  350 + font-weight: bold;
  351 + border-bottom: 1px solid #ccc;
  352 + display: flex;
  353 + align-items: center;
  354 + justify-content: space-between;
  355 + padding: 0.25rem;
  356 + }
  357 +
  358 + .meal_price_box {
  359 + display: flex;
  360 + align-items: center;
  361 + justify-content: space-between;
  362 + font-size: 12px;
  363 + color: #424242;
  364 + padding: 0.25rem 10% 0 10%;
  365 + }
  366 +
  367 + .meal_price {
  368 + color: #d8b25f;
  369 + font-size: 9px;
  370 + margin-left: 0.1rem;
  371 + }
  372 +
  373 + .incer {
  374 + color: #ccc;
  375 + font-size: 9px;
  376 + padding: 0 10%;
  377 + }
  378 +
  379 + .sever_list {
  380 + display: flex;
  381 + align-items: center;
  382 + flex-wrap: wrap;
  383 + font-size: 12px;
  384 + padding: 0.25rem 10%;
  385 + }
  386 +
  387 + .sever_list span {
  388 + background-color: #f2f2f2;
  389 + padding: 0.1rem 0.2rem;
  390 + margin: 0 0.2rem 0.2rem 0;
  391 + border-radius: 0.07rem;
  392 + }
  393 +
  394 + .sever_list .span_active {
  395 + background-color: #dbb25f;
  396 + color: #fff;
  397 + }
  398 +
  399 + .meal_item {
  400 + background-color: #fff;
  401 + }
  402 +
  403 + .pay_box {
  404 + display: flex;
  405 + align-items: center;
  406 + justify-content: space-between;
  407 + padding: 0 10% 0.25rem 10%;
  408 + }
  409 +
  410 + .pay_num {
  411 + font-size: 12px;
  412 + color: #424242;
  413 + }
  414 +
  415 + .pay_btn_box {
  416 + display: flex;
  417 + align-items: center;
  418 +
  419 + }
  420 +
  421 + .pay_btn_box .iconfont {
  422 + font-size: 20px;
  423 + color: #ccc;
  424 + }
  425 +
  426 + .pay_btn_box input {
  427 + width: 0.5rem;
  428 + text-align: center;
  429 + border: 0;
  430 + outline: none;
  431 + font-size: 15px;
  432 + }
  433 +
  434 + .pay_num .limit {
  435 + padding: 0;
  436 + font-size: 9px;
  437 + color: #ccc;
  438 + }
  439 +
  440 + .price {
  441 + flex: 1;
  442 + text-align: right;
  443 + }
  444 +
  445 + .price .meal_price {
  446 + font-size: 12px;
  447 + }
  448 +
  449 + .price .old_price {
  450 + text-decoration: line-through;
  451 + color: #ccc;
  452 + margin-left: 0.1rem;
  453 + }
  454 +
  455 + .pay_btn {
  456 + font-size: 15px;
  457 + color: #fff;
  458 + background-color: #dbb25f;
  459 + text-align: center;
  460 + padding: 0.2rem 0;
  461 + }
  462 +
  463 + .icon-cuohao {
  464 + font-size: 15px;
  465 + color: #424242;
  466 + }
  467 +
  468 + .save_btn {
  469 + text-align: center;
  470 + font-size: 0.36rem;
  471 + color: #fff;
  472 + padding: 0.15rem 0;
  473 + width: 100%;
  474 + position: absolute;
  475 + left: 0;
  476 + bottom: 0;
  477 + z-index: 100;
  478 + background-color: #dbb25f;
  479 + }
  480 +
  481 + .moreoul {
  482 + width: 100%;
  483 + }
  484 +
  485 + .moreoul li {
  486 + width: 100%;
  487 + padding: 0.3rem 0;
  488 + line-height: 0.3rem;
  489 + font-size: 16px;
  490 + border-bottom: 1px solid #f0f0f0;
  491 + text-align: center;
  492 + }
  493 +
  494 + .nodata {
  495 + font-size: 16px;
  496 + color: #c0c0c0;
  497 + text-align: center;
  498 + padding: 0.5rem 0;
  499 + width: 100% !important;
  500 + }
  501 +
  502 + .weui-picker__indicator:after {
  503 + border-bottom: 1px solid #dbb25f;
  504 + }
  505 +
  506 + .weui-picker__indicator:before {
  507 + border-top: 1px solid #dbb25f;
  508 + }
  509 +
  510 + .weui-picker__action {
  511 + padding: 0.2rem 0;
  512 + font-size: 13px;
  513 + text-align: center;
  514 + }
  515 +
  516 + .weui-picker__action:first-child {
  517 + color: #333;
  518 + text-align: center;
  519 + }
  520 +
  521 + .weui-picker__action:last-child {
  522 + color: #fff;
  523 + text-align: center;
  524 + background-color: #dbb25f;
  525 + }
  526 +
  527 + .weui-picker__hd {
  528 + padding: 0;
  529 + }
  530 +
  531 + .weui-picker__item {
  532 + font-size: 13px;
  533 + }
  534 +
  535 + .close_left {
  536 + position: relative;
  537 + }
  538 +
  539 + .close_left::before {
  540 + position: absolute;
  541 + left: -0.1rem;
  542 + right: -0.1rem;
  543 + top: -0.1rem;
  544 + bottom: -0.1rem;
  545 + content: '';
  546 + }
  547 +
  548 + .mint-popup-bottom {
  549 + width: 100%;
  550 + }
  551 +
  552 + .weui-check__label:active {
  553 + background: transparent;
  554 + }
  555 +
  556 + .weui-cells_checkbox .weui-icon-checked:before {
  557 + /*content: '';*/
  558 + }
  559 +
  560 + .weui-cells_checkbox .weui-check:checked + .weui-icon-checked:before {
  561 + color: #dbb25f
  562 + }
  563 +
  564 + .weui-cell__hd {
  565 + position: relative;
  566 + }
  567 +
  568 + .weui-cell__hd::before {
  569 + content: '';
  570 + position: absolute;
  571 + left: -10px;
  572 + right: -10px;
  573 + top: -10px;
  574 + bottom: -10px;
  575 + }
  576 +
  577 + .mold_index {
  578 + position: fixed;
  579 + height: 100%;
  580 + width: 100%;
  581 + background-color: rgba(0, 0, 0, 0.05);
  582 + /*background-color: #000;*/
  583 + left: 0;
  584 + top: 0;
  585 + bottom: 0;
  586 + z-index: 10;
  587 + }
  588 +
  589 + .weui-mask, .weui-mask_transparent {
  590 + position: fixed;
  591 + z-index: 1000;
  592 + top: 0;
  593 + right: 0;
  594 + left: 0;
  595 + bottom: 0;
  596 + width: 100%;
  597 + height: 100%;
  598 + display: flex;
  599 + align-items: center;
  600 + justify-content: center;
  601 + }
  602 +
  603 + .weui-toast {
  604 + position: fixed;
  605 + z-index: 5000;
  606 + width: 40%;
  607 + min-width: 20%;
  608 + min-height: auto;
  609 + height: auto;
  610 + top: 50%;
  611 + left: 0;
  612 + right: 0;
  613 + margin: 0 auto;
  614 + /*margin-left: -3.8em;*/
  615 + background: hsla(0, 0%, 7%, .7);
  616 + text-align: center;
  617 + border-radius: 5px;
  618 + color: #fff;
  619 + font-size: 14px;
  620 + }
  621 +
  622 + .weui-icon_toast {
  623 + margin: 0;
  624 + /*display: block*/
  625 + }
  626 +
  627 + .weui-toast__content {
  628 + margin: 0;
  629 + padding: 0.1rem 0;
  630 + }
  631 +
  632 + .weui-icon_toast.weui-icon-success-no-circle {
  633 + font-size: 0;
  634 + }
  635 +
  636 + .weui-icon_toast.weui-icon-success-no-circle:before {
  637 + color: #fff;
  638 + font-size: 0;
  639 + margin: 0;
  640 + }
  641 + /*图片上传*/
  642 + #photoBox{
  643 + position: fixed;
  644 + top: 0;
  645 + left: 0;
  646 + width: 100%;
  647 + height: 100%;
  648 + background-color: #FFF;
  649 + }
  650 + .auth2_title {
  651 + font-size: 14px;
  652 + color: #424242;
  653 + margin: 0.57rem 0.62rem 0 0.62rem;
  654 + }
  655 +
  656 + .photos {
  657 + display: flex;
  658 + align-items: center;
  659 + /*justify-content: space-around;*/
  660 + flex-wrap: wrap;
  661 + font-size: 14px;
  662 + color: #424242;
  663 + }
  664 +
  665 + .photo_item {
  666 + display: flex;
  667 + align-items: center;
  668 + flex-direction: column;
  669 + margin: 0.84rem 0 0 0;
  670 + /*flex: 1;*/
  671 + width: 50%;
  672 + }
  673 +
  674 + .photo_item_img {
  675 + height: 1.92rem;
  676 + width: 2.46rem;
  677 + border: 1px dashed #dcdcdc;
  678 + display: flex;
  679 + align-items: center;
  680 + justify-content: center;
  681 + border-radius: 0.1rem;
  682 + overflow: hidden;
  683 + margin-bottom: 0.28rem;
  684 + position: relative;
  685 + }
  686 + .photo_item_img input{
  687 + position: absolute;
  688 + top: 0;
  689 + left: 0;
  690 + width: 100%;
  691 + height: 100%;
  692 + opacity: 0;
  693 + }
  694 +
  695 + .photo_item_img .iconfont {
  696 + font-size: 33px;
  697 + color: #c1c1c1;
  698 + }
  699 +
  700 + .photo_item_img img {
  701 + width: 100%;
  702 + }
  703 +
  704 + .idcard_box input {
  705 + padding: 0.28rem 0;
  706 + width: 100%;
  707 + text-align: right;
  708 + }
  709 +
  710 + .idcard_box .iconfont {
  711 + color: #E3C88D;
  712 + margin-right: 0.1rem;
  713 + }
  714 +
  715 + .photo_re {
  716 + color: #AAAAAA;
  717 + font-size: 14px;
  718 + text-align: right;
  719 + margin: 0 0 0.47rem 0;
  720 + padding-right: 1.3rem;
  721 + }
  722 +
  723 + .auth2_tips {
  724 + text-align: center;
  725 + font-size: 10px;
  726 + color: #AAAAAA;
  727 + margin-bottom: 0.65rem;
  728 + }
  729 +
  730 + .save_btn {
  731 + position: relative;
  732 + width: 84%;
  733 + margin: 0.91rem auto 0.3rem auto;
  734 + border-radius: 0.1rem;
  735 + font-size: 15px;
  736 + }
205 </style> 737 </style>
206 <body> 738 <body>
207 <div id="loadStart"></div> 739 <div id="loadStart"></div>
@@ -390,18 +922,18 @@ @@ -390,18 +922,18 @@
390 <div class="my_address"> 922 <div class="my_address">
391 <div class="address_title"><span class="iconfont icon-shouye"></span><span> 我的服务地址</span></div> 923 <div class="address_title"><span class="iconfont icon-shouye"></span><span> 我的服务地址</span></div>
392 <div class="address_item nodata" v-if="user_address_list.length==0">暂无服务地址</div> 924 <div class="address_item nodata" v-if="user_address_list.length==0">暂无服务地址</div>
393 - <div class="address_item" v-for="(item,index) in user_address_list" @click="choose_address(item.address,item.address_info,item.lon,item.lat)" v-else> 925 + <div class="address_item" v-for="(item,index) in user_address_list" @click="choose_address(item.pname,item.address,item.address_info,item.lon,item.lat)" v-else>
394 <span>{{item.address}}{{item.address_info}}</span> 926 <span>{{item.address}}{{item.address_info}}</span>
395 </div> 927 </div>
396 </div> 928 </div>
397 <div class="my_address"> 929 <div class="my_address">
398 <div class="address_title"><span class="iconfont icon-dizhi"></span><span>我的附近地址</span></div> 930 <div class="address_title"><span class="iconfont icon-dizhi"></span><span>我的附近地址</span></div>
399 - <div class="address_item" v-for="(item,index) in nearList" @click="choose_address(item.address,'',item.lon,item.lat)"> 931 + <div class="address_item" v-for="(item,index) in nearList" @click="choose_address(item.pname,item.address,'',item.lon,item.lat)">
400 <span>{{item.address}}</span> 932 <span>{{item.address}}</span>
401 </div> 933 </div>
402 </div> 934 </div>
403 </div> 935 </div>
404 - <div v-for="(item,index) in keywords" class="city_item" @click="choose_address(item.address,item.name,item.lon,item.lat)" v-else> 936 + <div v-for="(item,index) in keywords" class="city_item" @click="choose_address(item.cityname,item.address,item.name,item.lon,item.lat)" v-else>
405 <div> 937 <div>
406 <div class="city_name">{{item.name}}</div> 938 <div class="city_name">{{item.name}}</div>
407 <div class="city_address">{{item.address}}</div> 939 <div class="city_address">{{item.address}}</div>
@@ -409,6 +941,117 @@ @@ -409,6 +941,117 @@
409 </div> 941 </div>
410 </div> 942 </div>
411 </div> 943 </div>
  944 + <!--选择套餐-->
  945 + <div @click="close" class="meal" v-if="room">
  946 + <div class="meal_item" @click.stop>
  947 + <div class="meal_title">
  948 + <span></span>
  949 + <span>入住选择</span>
  950 + <span class="iconfont icon-cuohao" @click="close"></span>
  951 + </div>
  952 + <div class="room_box">
  953 + <div class="room_left">
  954 + <div><span>服务价格</span><span class="youhui">优惠¥{{price_info.count?price_info.count:0}}</span></div>
  955 + </div>
  956 + <div class="room_right">
  957 + <span>¥{{price_info.price?price_info.price:0}}</span>
  958 + <span class="old_price">原价{{price_info.o_price?price_info.o_price:0}}</span>
  959 + </div>
  960 + </div>
  961 + <div class="room_tips">此价格包含护理、房间、用餐费用</div>
  962 + <div class="price_box">
  963 + <div class="price_left">
  964 + <span :class="{'span_active':index==active_index}"
  965 + v-for="(item,index) in attribute[0]"
  966 + @click="choose_left(index)">{{item}}</span>
  967 + </div>
  968 + <div class="price_right">
  969 + <span :class="{'span_active':index==active_index2}"
  970 + v-for="(item,index) in attribute[1]"
  971 + @click="choose_right(index)">{{item}}</span>
  972 + </div>
  973 + </div>
  974 + <div class="pay_box">
  975 + <span class="pay_num">入住周期 <span
  976 + class="limit">({{price_info.limit_num?price_info.limit_num:0}}{{unit}})</span></span>
  977 + <div class="pay_btn_box">
  978 + <span class="iconfont icon-jian" @click="reduce"></span>
  979 + <input type="number" placeholder="" value="1" v-model="num">
  980 + <span class="iconfont icon-jikediancanicon09" @click="plus"></span>
  981 + </div>
  982 + </div>
  983 + <div class="pay_btn" @click.stop="pay_go">确定</div>
  984 + </div>
  985 + </div>
  986 + <div @click="close" class="meal" v-if="taocan">
  987 + <div class="meal_item" @click.stop>
  988 + <div class="meal_title"><span></span><span>选择套餐</span><span class="iconfont icon-cuohao"
  989 + @click="close"></span></div>
  990 + <div class="meal_price_box">
  991 + <div><span>服务价格</span><span class="meal_price">优惠价格¥{{Math.abs(priceList.count)?Math.abs(priceList.count):0}}</span>
  992 + </div>
  993 + <div class="price"><span class="meal_price">¥{{priceList.price?priceList.price:0}}</span><span
  994 + class="old_price">原价¥{{priceList.o_price?priceList.o_price:0}}</span></div>
  995 + </div>
  996 + <div class="incer">此服务由慈界平台优质服务商提供</div>
  997 + <div class="sever_list"><span :class="{'span_active':index==active_index}"
  998 + v-for="(item,index) in attribute"
  999 + @click="t_choose_sever(item,index)">{{item}}</span></div>
  1000 + <div class="pay_box">
  1001 + <span class="pay_num">购买数量 <span
  1002 + class="limit">(限购<span>{{priceList.limit_num?priceList.limit_num:0}}</span>{{unit}})</span></span>
  1003 + <div class="pay_btn_box">
  1004 + <span class="iconfont icon-jian" @click="t_reduce"></span>
  1005 + <input type="number" placeholder="" value="1" v-model="num">
  1006 + <span class="iconfont icon-jikediancanicon09" @click="t_plus"></span>
  1007 + </div>
  1008 + </div>
  1009 + <div class="pay_btn" @click="t_pay_go">确定</div>
  1010 + </div>
  1011 + </div>
  1012 + <!--选择图片上传-->
  1013 + <div id="photoBox" v-cloak v-if="photoUpload">
  1014 + <div class="auth2_title">请上传就医证明,以便订单审核(为您保密)</div>
  1015 + <div class="photos">
  1016 + <div class="photo_item">
  1017 + <div class="photo_item_img" >
  1018 + <img v-if="img1" :src="img1"/>
  1019 + <span v-else class="iconfont icon-xiangji"></span>
  1020 + <input type="file" accept="image/*" @change="addPic" id="a">
  1021 + </div>
  1022 + <div class="photo_type">诊断证明/医疗处置单</div>
  1023 + </div>
  1024 + <div class="photo_item">
  1025 + <div class="photo_item_img" @click="popupVisible1=true">
  1026 + <img v-if="img2" :src="img2"/>
  1027 + <span v-else class="iconfont icon-xiangji"></span>
  1028 + <input type="file" accept="image/*" @change="addPic" id="b">
  1029 + </div>
  1030 + <div class="photo_type">药品处方</div>
  1031 + </div>
  1032 + <div class="photo_item">
  1033 + <div class="photo_item_img" @click="popupVisible2=true">
  1034 + <img v-if="img3" :src="img3"/>
  1035 + <span v-else class="iconfont icon-xiangji"></span>
  1036 + <input type="file" accept="image/*" @change="addPic" id="c">
  1037 + </div>
  1038 + <div class="photo_type">药品照片</div>
  1039 + </div>
  1040 + <div class="photo_item">
  1041 + <div class="photo_item_img" @click="popupVisible3=true">
  1042 + <img v-if="img4" :src="img4"/>
  1043 + <span v-else class="iconfont icon-xiangji"></span>
  1044 + <input type="file" accept="image/*" @change="addPic" id="d">
  1045 + </div>
  1046 + <div class="photo_type">
  1047 + <div>病例</div>
  1048 + </div>
  1049 + </div>
  1050 + </div>
  1051 + <div class="photo_re">(选填)</div>
  1052 + <div class="save_btn" @click="auth_next">提交</div>
  1053 + <div class="auth2_tips">为提高审核速度,请最少上传1张清晰的图片</div>
  1054 + </div>
412 </div> 1055 </div>
413 </body> 1056 </body>
414 </html> 1057 </html>
@@ -425,7 +1068,7 @@ @@ -425,7 +1068,7 @@
425 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script> 1068 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
426 <script type="text/javascript" src="../../assets/js/datePicker.js"></script> 1069 <script type="text/javascript" src="../../assets/js/datePicker.js"></script>
427 <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&test=true&key=ef53760bd959a4df08b7d4587280e642&&plugin=AMap.ToolBar,AMap.IndoorMap'></script>
428 - 1071 +<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
429 <script> 1072 <script>
430 var app = new Vue({ 1073 var app = new Vue({
431 el: '#app', 1074 el: '#app',
@@ -473,17 +1116,13 @@ @@ -473,17 +1116,13 @@
473 attribute_id: '', 1116 attribute_id: '',
474 attribute_type: '', 1117 attribute_type: '',
475 user_info: [], 1118 user_info: [],
476 - lon: '',  
477 - lat: '',  
478 diagnosis: '', 1119 diagnosis: '',
479 drug_recipe: '', 1120 drug_recipe: '',
480 drug: '', 1121 drug: '',
481 ill_case: '', 1122 ill_case: '',
482 unit: '', 1123 unit: '',
483 pos: 'fixed', 1124 pos: 'fixed',
484 - city: true,  
485 - lat: '',  
486 - lng: '', 1125 + city: false,
487 keyword: '', 1126 keyword: '',
488 keywords: [], 1127 keywords: [],
489 cities: [], 1128 cities: [],
@@ -491,25 +1130,57 @@ @@ -491,25 +1130,57 @@
491 nearList: [], 1130 nearList: [],
492 user_address_list: [], 1131 user_address_list: [],
493 address_show: true, 1132 address_show: true,
  1133 + lon: '',
  1134 + lat: '',
494 latitude: '', 1135 latitude: '',
495 longitude: '', 1136 longitude: '',
496 //经度 1137 //经度
497 lng: '', 1138 lng: '',
498 -  
499 //纬度 1139 //纬度
500 lat: '', 1140 lat: '',
501 map: {}, 1141 map: {},
502 //经纬度 1142 //经纬度
503 - centerPoint: [] 1143 + centerPoint: [],
  1144 + // 套餐选择
  1145 + active_left: '',
  1146 + active_right: '',
  1147 + attribute: [],
  1148 + price_info: [],
  1149 + active_index: -1,
  1150 + active_index2: -1,
  1151 + taocan: false,
  1152 + room: false,
  1153 + // 套餐选择2
  1154 + sever_list: [],
  1155 + priceList: [],
  1156 + // 图片上传
  1157 + photoUpload: true,
  1158 + img1: '',
  1159 + img2: '',
  1160 + img3: '',
  1161 + img4: '',
  1162 + popupVisible: false,
  1163 + popupVisible1: false,
  1164 + popupVisible2: false,
  1165 + popupVisible3: false,
  1166 + configinfo: []
504 }, 1167 },
505 created: function () { 1168 created: function () {
506 var app = this; 1169 var app = this;
507 - this.getUserIndexInfo();  
508 this.id = localStorage.getItem('id'); 1170 this.id = localStorage.getItem('id');
509 - this.applyInfo();  
510 this.cityname = localStorage.getItem('cityName'); 1171 this.cityname = localStorage.getItem('cityName');
  1172 + this.getUserIndexInfo();
  1173 + this.applyInfo();
511 //获取当前地址 1174 //获取当前地址
512 - this.get_city() 1175 + this.get_city();
  1176 + this.getsdk();
  1177 + //获取已经上传的图片
  1178 + if ($api.getStorage('img1') || ($api.getStorage('img2')) || ($api.getStorage('img3')) || ($api.getStorage('img4'))) {
  1179 + app.img1 = $api.getStorage('img1');
  1180 + app.img2 = $api.getStorage('img2');
  1181 + app.img3 = $api.getStorage('img3');
  1182 + app.img4 = $api.getStorage('img4')
  1183 + }
513 1184
514 // api.addEventListener({ 1185 // api.addEventListener({
515 // name: 'choose_city' 1186 // name: 'choose_city'
@@ -577,16 +1248,11 @@ @@ -577,16 +1248,11 @@
577 // toastMsg('请重试') 1248 // toastMsg('请重试')
578 // } 1249 // }
579 // }); 1250 // });
580 - // app.name=api.pageParam.name; 1251 + // app.name=api.pageParam.name;
581 }, 1252 },
582 methods: { 1253 methods: {
583 // 选择服务日期 1254 // 选择服务日期
584 dateSelect: function () { 1255 dateSelect: function () {
585 - // api.openWin({  
586 - // name: 'getSev_w',  
587 - // url: '../common/getSev_w.html'  
588 - // });  
589 -  
590 var calendar = new datePicker(); 1256 var calendar = new datePicker();
591 calendar.init({ 1257 calendar.init({
592 'trigger': '#sever', /*按钮选择器,用于触发弹出插件*/ 1258 'trigger': '#sever', /*按钮选择器,用于触发弹出插件*/
@@ -632,7 +1298,7 @@ @@ -632,7 +1298,7 @@
632 }, 1298 },
633 // 上传证明 1299 // 上传证明
634 openProve: function () { 1300 openProve: function () {
635 - openView('prove', 'index/prove', '上传就医证明','prove',false,false,false) 1301 + openView('prove', '../index/prove', '上传就医证明','prove',false,false,false)
636 }, 1302 },
637 // 获取订单详情 1303 // 获取订单详情
638 applyInfo: function () { 1304 applyInfo: function () {
@@ -698,44 +1364,19 @@ @@ -698,44 +1364,19 @@
698 }, 1364 },
699 // 选择套餐 1365 // 选择套餐
700 chooseMeal: function () { 1366 chooseMeal: function () {
  1367 + var app = this;
701 if (app.attribute_type == 1) { 1368 if (app.attribute_type == 1) {
702 - api.openWin({  
703 - name: 'choose_meal_w.html',  
704 - url: './choose_meal_w.html',  
705 - pageParam: {  
706 - attribute: app.attribute,  
707 - id: app.id,  
708 - unit: app.unit  
709 - }  
710 - }); 1369 + app.taocan = true;
  1370 + app.room = false;
711 } else { 1371 } else {
712 - api.openFrame({  
713 - bgColor: 'rgba(0,0,0,0.05)',  
714 - name: 'choose_room_f',  
715 - url: './choose_room_f.html',  
716 - bounces: false,  
717 - animation: {  
718 - type: "push",  
719 - subType: "from_bottom",  
720 - duration: 300  
721 - },  
722 - rect: {  
723 - x: 0,  
724 - y: 0,  
725 - w: 'auto',  
726 - h: 'auto'  
727 - },  
728 - pageParam: {  
729 - attribute: app.attribute,  
730 - id: app.id,  
731 - unit: app.unit  
732 - }  
733 - }); 1372 + app.room = true;
  1373 + app.taocan = false;
734 } 1374 }
735 }, 1375 },
736 // 选择服务地址 1376 // 选择服务地址
737 openMap: function () { 1377 openMap: function () {
738 - openView('choose_address', '../common/choose_address', '选择服务地址', 'choose_address', false, {cityname: app.cityname}); 1378 + this.city = true;
  1379 + // openView('choose_address', '../common/choose_address', '选择服务地址', 'choose_address', false, {cityname: app.cityname});
739 }, 1380 },
740 // 获取协议 1381 // 获取协议
741 openIsPro: function () { 1382 openIsPro: function () {
@@ -773,7 +1414,6 @@ @@ -773,7 +1414,6 @@
773 // api.hideProgress(); 1414 // api.hideProgress();
774 }, 2000); 1415 }, 2000);
775 }, 1416 },
776 -  
777 // 定位当前城市 1417 // 定位当前城市
778 get_city: function() { 1418 get_city: function() {
779 var app = this ; 1419 var app = this ;
@@ -789,8 +1429,7 @@ @@ -789,8 +1429,7 @@
789 AMap.event.addListener(geolocation, 'complete', onComplete) 1429 AMap.event.addListener(geolocation, 'complete', onComplete)
790 AMap.event.addListener(geolocation, 'error', onError) 1430 AMap.event.addListener(geolocation, 'error', onError)
791 function onComplete(data) { 1431 function onComplete(data) {
792 - alert(JSON.stringify(data));  
793 - app.cityname = data.addressComponent.province; 1432 + // app.cityname = data.addressComponent.province;
794 console.log(app.cityname); 1433 console.log(app.cityname);
795 app.lng = data.position.lng; 1434 app.lng = data.position.lng;
796 app.lat = data.position.lat; 1435 app.lat = data.position.lat;
@@ -817,7 +1456,7 @@ @@ -817,7 +1456,7 @@
817 console.log(JSON.stringify(status)) 1456 console.log(JSON.stringify(status))
818 if(result.info === 'OK') { 1457 if(result.info === 'OK') {
819 var locationList = result.poiList.pois; // 周边地标建筑列表 1458 var locationList = result.poiList.pois; // 周边地标建筑列表
820 - //console.log(JSON.stringify(locationList)) 1459 + console.log(locationList)
821 app.nearList = locationList          // 生成地址列表html 1460 app.nearList = locationList          // 生成地址列表html
822 //           createLocationHtml(locationList); 1461 //           createLocationHtml(locationList);
823 } else { 1462 } else {
@@ -919,18 +1558,13 @@ @@ -919,18 +1558,13 @@
919 } 1558 }
920 }, 1559 },
921 // 选择地址 1560 // 选择地址
922 - choose_address: function(address, name, longitude, latitude) {  
923 - api.sendEvent({  
924 - name: 'choose_city',  
925 - extra: {  
926 - address: address,  
927 - name: name,  
928 - longitude: longitude,  
929 - latitude: latitude,  
930 - city: app.cityname  
931 - }  
932 - });  
933 - closeWindow(); 1561 + choose_address: function(cityname,address, name, longitude, latitude) {
  1562 + this.cityname = cityname;
  1563 + this.user_address = address;
  1564 + this.user_address_detail = name;
  1565 + this.lon = longitude;
  1566 + this.lat = latitude;
  1567 + this.city = false;
934 }, 1568 },
935 // 切换城市 1569 // 切换城市
936 choose_city_fun: function() { 1570 choose_city_fun: function() {
@@ -954,6 +1588,193 @@ @@ -954,6 +1588,193 @@
954 } 1588 }
955 }); 1589 });
956 }, 1590 },
  1591 + //套餐选择
  1592 + choose_left: function (index) {
  1593 + app.active_index = index;
  1594 + app.active_left = app.attribute[0][index];
  1595 + app.num = app.price_info.limit_num;
  1596 + app.getPrice();
  1597 + },
  1598 + choose_right: function (index) {
  1599 + app.active_index2 = index;
  1600 + app.active_right = app.attribute[1][index];
  1601 + app.getPrice();
  1602 + app.num = app.price_info.limit_num;
  1603 + },
  1604 + reduce: function () {
  1605 + if (app.price_info.limit_num) {
  1606 + if (app.num > app.price_info.limit_num) {
  1607 + app.num--
  1608 + } else {
  1609 + toastMsg('不能低于' + app.price_info.limit_num + '个月哦')
  1610 + }
  1611 + }else {
  1612 + toastMsg('请选择入住类型')
  1613 + }
  1614 +
  1615 + },
  1616 + plus: function () {
  1617 + if (app.num < app.price_info.limit_num) {
  1618 + } else {
  1619 + app.num++
  1620 + }
  1621 + },
  1622 + getPrice: function () {
  1623 + if (app.active_left && app.active_right) {
  1624 + var post = {
  1625 + attribute: app.active_left + '_' + app.active_right,
  1626 + id: app.id
  1627 + };
  1628 + getRequest('post', 'portal/Goods/getPrice', post, null).then(function (res) {
  1629 + if (res.data.code == 1) {
  1630 + app.price_info = res.data.data;
  1631 + app.num = app.price_info.limit_num;
  1632 + app.attribute_id = app.price_info.attribute_id
  1633 + }
  1634 + })
  1635 + } else {
  1636 + toastMsg('请选择入住类型')
  1637 + }
  1638 +
  1639 + },
  1640 + pay_go: function () {
  1641 + if (app.active_left && app.active_right) {
  1642 + api.sendEvent({
  1643 + name: 'room',
  1644 + extra: {
  1645 + name_left: app.active_left,
  1646 + name_right: app.active_right,
  1647 + num: app.num,
  1648 + price: app.price_info.price,
  1649 + attribute_id: app.attribute_id
  1650 + }
  1651 + });
  1652 + app.close()
  1653 + }
  1654 + else {
  1655 + toastMsg('请选择入住类型')
  1656 + }
  1657 + },
  1658 + //套餐选择2
  1659 + close: function () {
  1660 + // api.closeWin({
  1661 + // name: 'choose_meal_w'
  1662 + // });
  1663 + this.taocan = false
  1664 + this.room = false
  1665 + },
  1666 + t_choose_sever: function (attr, index) {
  1667 + var app = this;
  1668 + app.active_index = index;
  1669 + app.active_name = app.attribute[index];
  1670 + app.attribute_id = app.attribute[index].id;
  1671 + var post = {
  1672 + id: app.id,
  1673 + attribute: attr
  1674 + };
  1675 + var header = {
  1676 + "XX-Device-Type": getDevice(),
  1677 + 'XX-Token': getToken()
  1678 + };
  1679 + getRequest('post', 'portal/Goods/getPrice', post, header).then(function (res) {
  1680 + // alert(JSON.stringify(res))
  1681 + if (res.data.code == 1) {
  1682 + app.priceList = res.data.data;
  1683 + } else {
  1684 + toastMsg(res.msg)
  1685 + }
  1686 + });
  1687 + app.num = 1;
  1688 + app.meal = app.active_name + app.num + app.unit;
  1689 + },
  1690 + t_reduce: function () {
  1691 + var app = this;
  1692 + if (app.num > 1) {
  1693 + app.num--
  1694 + }
  1695 + app.price = parseFloat(app.priceList.price) * (app.num);
  1696 + app.meal = app.active_name + app.num + app.unit;
  1697 + },
  1698 + t_plus: function () {
  1699 + var app = this;
  1700 + if (app.num < app.priceList.limit_num) {
  1701 + app.num++
  1702 + } else {
  1703 + toastMsg('不能超过最大限购哦')
  1704 + }
  1705 + app.price = parseFloat(app.priceList.price) * (app.num);
  1706 + app.meal = app.active_name + app.num + app.unit;
  1707 + },
  1708 + t_pay_go: function () {
  1709 + var app = this;
  1710 + if (app.active_name != '') {
  1711 + app.close()
  1712 + } else {
  1713 + toastMsg('请选择套餐类型')
  1714 + }
  1715 +
  1716 + },
  1717 + //证明上传
  1718 + addPic(event){
  1719 +
  1720 + },
  1721 + //诊断证明/医疗处置单
  1722 + auth1: function (type) {
  1723 + wx.chooseImage({
  1724 + count: 1, // 默认9
  1725 + sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
  1726 + sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
  1727 + success: function (res) {
  1728 + var localIds = res.localIds; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
  1729 + wx.uploadImage({
  1730 + localId: localIds, // 需要上传的图片的本地ID,由chooseImage接口获得
  1731 + isShowProgressTips: 1, // 默认为1,显示进度提示
  1732 + success: function (res) {
  1733 + var serverId = res.serverId; // 返回图片的服务器端ID
  1734 + app.img1=serverId
  1735 + }
  1736 +
  1737 + });
  1738 + }
  1739 +
  1740 + });
  1741 + },
  1742 + // 药品处方
  1743 + auth2: function (type) {
  1744 + app.popupVisible1 = false;
  1745 +
  1746 + },
  1747 + // 药品照片
  1748 + auth3: function (type) {
  1749 + app.popupVisible2 = false;
  1750 +
  1751 + },
  1752 + // 病例
  1753 + auth4: function (type) {
  1754 + app.popupVisible3 = false;
  1755 + },
  1756 + auth_next: function () {
  1757 + if (app.img1 == '') {
  1758 + toastMsg('请上传诊断证明/医疗处置单')
  1759 + } else if (app.img2 == '') {
  1760 + toastMsg('请上传药品处方')
  1761 + } else if (app.img3 == '') {
  1762 + toastMsg('请上传药品照片')
  1763 + }
  1764 + else {
  1765 + api.sendEvent({
  1766 + name: 'prove',
  1767 + extra: {
  1768 + diagnosis: app.img1,
  1769 + drug_recipe: app.img2,
  1770 + drug: app.img3,
  1771 + ill_case: app.img4
  1772 + }
  1773 + });
  1774 + api.closeWin();
  1775 + }
  1776 + },
  1777 +
957 // 去预约 1778 // 去预约
958 appointment: function () { 1779 appointment: function () {
959 var app = this; 1780 var app = this;
@@ -1043,7 +1864,8 @@ @@ -1043,7 +1864,8 @@
1043 'XX-Token': getToken() 1864 'XX-Token': getToken()
1044 }; 1865 };
1045 getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function (res) { 1866 getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function (res) {
1046 - if (res.data.code == 1) { 1867 + console.log(res)
  1868 + if (res.data.code === '1') {
1047 app.user_info = res.data.data; 1869 app.user_info = res.data.data;
1048 } else { 1870 } else {
1049 toastMsg(res.data.msg) 1871 toastMsg(res.data.msg)
@@ -200,7 +200,6 @@ @@ -200,7 +200,6 @@
200 app.img3 = $api.getStorage('img3'); 200 app.img3 = $api.getStorage('img3');
201 app.img4 = $api.getStorage('img4') 201 app.img4 = $api.getStorage('img4')
202 } 202 }
203 -  
204 } 203 }
205 }, 204 },
206 methods: { 205 methods: {
@@ -214,7 +213,7 @@ @@ -214,7 +213,7 @@
214 apis: 'chooseImage,uploadImage' 213 apis: 'chooseImage,uploadImage'
215 }; 214 };
216 getRequest('post', 'user/index/getSingture', post, header).then(function (res) { 215 getRequest('post', 'user/index/getSingture', post, header).then(function (res) {
217 - // alert(JSON.stringify(res)) 216 + alert(JSON.stringify(res))
218 if (res.data.code == 1) { 217 if (res.data.code == 1) {
219 app.configinfo = res.data.data; 218 app.configinfo = res.data.data;
220 wx.config({ 219 wx.config({
@@ -245,7 +244,6 @@ @@ -245,7 +244,6 @@
245 var serverId = res.serverId; // 返回图片的服务器端ID 244 var serverId = res.serverId; // 返回图片的服务器端ID
246 app.img1=serverId 245 app.img1=serverId
247 } 246 }
248 -  
249 }); 247 });
250 } 248 }
251 249
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 <link rel="stylesheet" href="../../assets/css/pay.css"> 14 <link rel="stylesheet" href="../../assets/css/pay.css">
15 <link rel="stylesheet" href="../../assets/css/my_news.css"> 15 <link rel="stylesheet" href="../../assets/css/my_news.css">
16 <link rel="stylesheet" href="../../assets/icon/iconfont.css"> 16 <link rel="stylesheet" href="../../assets/icon/iconfont.css">
17 - <title></title> 17 + <title>我的账户</title>
18 <style> 18 <style>
19 body { 19 body {
20 background-color: #f4f4f4; 20 background-color: #f4f4f4;
@@ -143,6 +143,7 @@ @@ -143,6 +143,7 @@
143 </body> 143 </body>
144 </html> 144 </html>
145 <script type="text/javascript" src="../../assets/js/api.js"></script> 145 <script type="text/javascript" src="../../assets/js/api.js"></script>
  146 +<script type="text/javascript" src="../../assets/js/weui.min.js"></script>
146 <script type="text/javascript" src="../../assets/js/public.js"></script> 147 <script type="text/javascript" src="../../assets/js/public.js"></script>
147 <script type="text/javascript" src="../../assets/js/fastclick.js"></script> 148 <script type="text/javascript" src="../../assets/js/fastclick.js"></script>
148 <script> 149 <script>
@@ -160,26 +161,20 @@ @@ -160,26 +161,20 @@
160 user_type: [] 161 user_type: []
161 }, 162 },
162 created: function () { 163 created: function () {
163 - apiready = function () {  
164 -  
165 - api.addEventListener({  
166 - name: 'cash'  
167 - }, function (ret, err) {  
168 - app.getUserIndexInfo();  
169 - });  
170 - app.getUserIndexInfo();  
171 - } 164 + this.getUserIndexInfo();
172 }, 165 },
173 methods: { 166 methods: {
174 my_count: function () { 167 my_count: function () {
  168 + var app = this;
175 // alert(app.user_type.balance); 169 // alert(app.user_type.balance);
176 if (parseFloat(app.user_type.balance) <= 0) { 170 if (parseFloat(app.user_type.balance) <= 0) {
177 toastMsg('余额不足') 171 toastMsg('余额不足')
178 } else { 172 } else {
179 - openView('my_cash', 'my/my_cash', '提现确认', 'my_cash', false, {balance: app.user_type.balance}) 173 + openView('my_cash', '../my/my_cash', '提现确认', 'my_cash', false, {balance: app.user_type.balance})
180 } 174 }
181 }, 175 },
182 getUserIndexInfo: function () { 176 getUserIndexInfo: function () {
  177 + var app = this;
183 var header = { 178 var header = {
184 "XX-Device-Type": getDevice(), 179 "XX-Device-Type": getDevice(),
185 'XX-Token': getToken() 180 'XX-Token': getToken()
@@ -119,7 +119,7 @@ @@ -119,7 +119,7 @@
119 </div> 119 </div>
120 <!--<div :class="['cons_item',item.able==1?'':'cons_item_nouse']"--> 120 <!--<div :class="['cons_item',item.able==1?'':'cons_item_nouse']"-->
121 <div class='cons_item' 121 <div class='cons_item'
122 - v-for="(item,index) in getConsumeMoney_data"> 122 + v-for="(item,index) in getConsumeMoney_data" >
123 <div class="cons_item_img"><img src="../../assets/image/juan_03.jpg" alt=""></div> 123 <div class="cons_item_img"><img src="../../assets/image/juan_03.jpg" alt=""></div>
124 <div class="cons_item_content"> 124 <div class="cons_item_content">
125 <div class="cons_left"> 125 <div class="cons_left">
@@ -132,9 +132,10 @@ @@ -132,9 +132,10 @@
132 </div> 132 </div>
133 </div> 133 </div>
134 <div class="cons_item_img2"><img src="../../assets/image/line.jpg" alt=""></div> 134 <div class="cons_item_img2"><img src="../../assets/image/line.jpg" alt=""></div>
135 - <div class="cons_item_bottom"><span>{{item.post_title}}</span><span class="bottom_btn"  
136 - v-if="item.able">去使用</span><span  
137 - class="bottom_btn" v-else>不可使用</span> 135 + <div class="cons_item_bottom">
  136 + <span>{{item.post_title}}</span>
  137 + <!--<span class="bottom_btn" v-if="item.able">去使用</span>-->
  138 + <!--<span class="bottom_btn" v-else>不可使用</span>-->
138 </div> 139 </div>
139 </div> 140 </div>
140 <!--<div class="cons_item">--> 141 <!--<div class="cons_item">-->
@@ -174,25 +175,15 @@ @@ -174,25 +175,15 @@
174 getConsumeMoney_data: [] 175 getConsumeMoney_data: []
175 }, 176 },
176 created: function () { 177 created: function () {
177 - apiready = function () {  
178 - app.order_id = api.pageParam.order_id;  
179 - app.getConsumeMoney();  
180 - } 178 + this.order_id = localStorage.getItem('order_id');
  179 + this.getConsumeMoney();
181 }, 180 },
182 methods: { 181 methods: {
183 goUse: function () { 182 goUse: function () {
184 - api.openWin({  
185 - name: 'win',  
186 - url: '../common/index_win.html',  
187 - });  
188 - api.sendEvent({  
189 - name: 'index0',  
190 - extra: {  
191 - index: 0  
192 - }  
193 - }); 183 + window.location.href = '../common/index_win.html'
194 }, 184 },
195 getConsumeMoney: function () { 185 getConsumeMoney: function () {
  186 + var app = this;
196 var post = { 187 var post = {
197 order_id: app.order_id 188 order_id: app.order_id
198 }; 189 };
@@ -207,7 +198,7 @@ @@ -207,7 +198,7 @@
207 } 198 }
208 loadEnd(); 199 loadEnd();
209 }); 200 });
210 - }, 201 + }
211 } 202 }
212 }) 203 })
213 </script> 204 </script>
@@ -155,7 +155,7 @@ @@ -155,7 +155,7 @@
155 <span class="iconfont icon-xiangyou"></span> 155 <span class="iconfont icon-xiangyou"></span>
156 </div> 156 </div>
157 </div> 157 </div>
158 - <div class="detail_item" @click="broSelect"> 158 + <div class="detail_item" @click="broSelect" id="broDate">
159 <div>生日</div> 159 <div>生日</div>
160 <div class="detail_item_right"> 160 <div class="detail_item_right">
161 <div class="detail_item_input"> 161 <div class="detail_item_input">
@@ -240,6 +240,7 @@ @@ -240,6 +240,7 @@
240 </script> 240 </script>
241 <script type="text/javascript" src="../../assets/js/axios.min.js"></script> 241 <script type="text/javascript" src="../../assets/js/axios.min.js"></script>
242 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script> 242 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
  243 +<script type="text/javascript" src="../../assets/js/datePicker.js"></script>
243 <script> 244 <script>
244 var app = new Vue({ 245 var app = new Vue({
245 el: '#app', 246 el: '#app',
@@ -388,7 +389,6 @@ @@ -388,7 +389,6 @@
388 }; 389 };
389 } 390 }
390 391
391 - }  
392 if (ret) { 392 if (ret) {
393 api.ajax({ 393 api.ajax({
394 url: baseurl + "user/index/upAvatar", 394 url: baseurl + "user/index/upAvatar",
@@ -418,25 +418,46 @@ @@ -418,25 +418,46 @@
418 // 选择生日 418 // 选择生日
419 broSelect: function () { 419 broSelect: function () {
420 var app = this; 420 var app = this;
421 - api.openPicker({  
422 - type: 'date',  
423 - title: '选择出生日期'  
424 - }, function (ret, err) {  
425 - if (ret) {  
426 - app.bro_year = ret.year;  
427 - app.bro_month = ret.month;  
428 - app.bro_day = ret.day;  
429 - app.broth_info = app.bro_year + '-' + add0(app.bro_month) + '-' + add0(app.bro_day);  
430 - if (checkDate(app.broth_info, 2)) {  
431 - return app.broth_info  
432 - } else { 421 + var calendar = new datePicker();
  422 + calendar.init({
  423 + 'trigger': '#broDate', /*按钮选择器,用于触发弹出插件*/
  424 + 'type': 'date', /*模式:date日期;datetime日期时间;time时间;ym年月;*/
  425 + // 'minDate':getTimeDetil(3), /*最小日期*/
  426 + 'minDate': '', /*最小日期*/
  427 + 'maxDate': formatDate(new Date(), 1), /*最大日期*/
  428 + 'onSubmit': function () {/*确认时触发事件*/
  429 + console.log(calendar.value);
  430 + if (calendar.value) {
  431 + app.broth_info = calendar.value;
  432 + calendar.onClose()
  433 + }else {
433 toastMsg('出生日期不能比今天晚'); 434 toastMsg('出生日期不能比今天晚');
434 return app.broth_info = app.default_bro 435 return app.broth_info = app.default_bro
435 } 436 }
436 - } else {  
437 - console.log(JSON.stringify(err)); 437 + },
  438 + 'onClose': function () {/*取消时触发事件*/
  439 + // api.closeWin();
438 } 440 }
439 - }); 441 + })
  442 + // api.openPicker({
  443 + // type: 'date',
  444 + // title: '选择出生日期'
  445 + // }, function (ret, err) {
  446 + // if (ret) {
  447 + // app.bro_year = ret.year;
  448 + // app.bro_month = ret.month;
  449 + // app.bro_day = ret.day;
  450 + // app.broth_info = app.bro_year + '-' + add0(app.bro_month) + '-' + add0(app.bro_day);
  451 + // if (checkDate(app.broth_info, 2)) {
  452 + // return app.broth_info
  453 + // } else {
  454 + // toastMsg('出生日期不能比今天晚');
  455 + // return app.broth_info = app.default_bro
  456 + // }
  457 + // } else {
  458 + // console.log(JSON.stringify(err));
  459 + // }
  460 + // });
440 }, 461 },
441 // 选择身高 462 // 选择身高
442 heightSelect: function () { 463 heightSelect: function () {
@@ -414,7 +414,7 @@ @@ -414,7 +414,7 @@
414 if(app.user_type == '') { 414 if(app.user_type == '') {
415 toastMsg('未登录') 415 toastMsg('未登录')
416 } else { 416 } else {
417 - openView('my_balance', 'my/my_balance', '我的账号', 'my_balance', false, false, false) 417 + openView('my_balance', '../my/my_balance', '我的账号', 'my_balance', false, false, false)
418 } 418 }
419 }, 419 },
420 // 我的消费金 420 // 我的消费金
@@ -423,7 +423,7 @@ @@ -423,7 +423,7 @@
423 if(app.user_type == '') { 423 if(app.user_type == '') {
424 toastMsg('未登录') 424 toastMsg('未登录')
425 } else { 425 } else {
426 - openView('my_consumption', 'my/my_consumption', '我的消费金', 'my_consumption', false, false, false) 426 + openView('my_consumption', '../my/my_consumption', '我的消费金', 'my_consumption', false, false, false)
427 } 427 }
428 }, 428 },
429 // 我的权益 429 // 我的权益
@@ -466,7 +466,7 @@ @@ -466,7 +466,7 @@
466 } else { 466 } else {
467 name = '亲友资料' 467 name = '亲友资料'
468 } 468 }
469 - openView('my_detail', 'my/my_detail', name, 'my_detail', false, { 469 + openView('my_detail', '../my/my_detail', name, 'my_detail', false, {
470 type: app.type, 470 type: app.type,
471 rid: app.rid, 471 rid: app.rid,
472 name: name 472 name: name
@@ -217,21 +217,21 @@ @@ -217,21 +217,21 @@
217 }, 217 },
218 created: function () { 218 created: function () {
219 var app = this; 219 var app = this;
220 - app.myOrder();  
221 - api.addEventListener({  
222 - name: 'cancel_order'  
223 - }, function (ret, err) {  
224 - if (ret) {  
225 - app.myOrder();  
226 - }  
227 - });  
228 - api.addEventListener({  
229 - name: 're_money'  
230 - }, function (ret, err) {  
231 - if (ret) {  
232 - app.myOrder();  
233 - }  
234 - }); 220 + this.myOrder();
  221 + // api.addEventListener({
  222 + // name: 'cancel_order'
  223 + // }, function (ret, err) {
  224 + // if (ret) {
  225 + // app.myOrder();
  226 + // }
  227 + // });
  228 + // api.addEventListener({
  229 + // name: 're_money'
  230 + // }, function (ret, err) {
  231 + // if (ret) {
  232 + // app.myOrder();
  233 + // }
  234 + // });
235 }, 235 },
236 methods: { 236 methods: {
237 // 去详情页 237 // 去详情页