作者 朱振飞

版本搭建

1 /*首页头部分*/ 1 /*首页头部分*/
  2 +
2 .index_header { 3 .index_header {
3 line-height: 0.38rem; 4 line-height: 0.38rem;
4 color: #fff; 5 color: #fff;
@@ -6,7 +7,7 @@ @@ -6,7 +7,7 @@
6 display: flex; 7 display: flex;
7 align-items: center; 8 align-items: center;
8 justify-content: space-between; 9 justify-content: space-between;
9 - padding: 0.2rem 0.4rem; 10 + padding: 0.3rem 0.4rem;
10 font-size: 15px; 11 font-size: 15px;
11 } 12 }
12 13
@@ -62,15 +63,12 @@ footer { @@ -62,15 +63,12 @@ footer {
62 display: flex; 63 display: flex;
63 align-items: center; 64 align-items: center;
64 justify-content: space-around; 65 justify-content: space-around;
65 - position: fixed;  
66 width: 100%; 66 width: 100%;
67 font-size: 12px; 67 font-size: 12px;
68 - left: 0;  
69 color: #969696; 68 color: #969696;
70 - bottom: 0;  
71 background-color: #fff; 69 background-color: #fff;
72 border: 1px solid #f2f2f2; 70 border: 1px solid #f2f2f2;
73 - z-index: 100; 71 +
74 } 72 }
75 73
76 .footer_item { 74 .footer_item {
@@ -96,6 +94,7 @@ footer { @@ -96,6 +94,7 @@ footer {
96 transition: 0.1s; 94 transition: 0.1s;
97 } 95 }
98 96
  97 +
99 /*首页内容部分*/ 98 /*首页内容部分*/
100 99
101 .index_list { 100 .index_list {
@@ -146,7 +145,7 @@ footer { @@ -146,7 +145,7 @@ footer {
146 font-size: 15px; 145 font-size: 15px;
147 position: fixed; 146 position: fixed;
148 right: 0.25rem; 147 right: 0.25rem;
149 - top: 0; 148 + top: 1.05rem;
150 background-color: #fff; 149 background-color: #fff;
151 border-radius: 0.07rem; 150 border-radius: 0.07rem;
152 z-index: 20; 151 z-index: 20;
@@ -205,9 +204,16 @@ footer { @@ -205,9 +204,16 @@ footer {
205 font-size: 15px; 204 font-size: 15px;
206 } 205 }
207 206
  207 +
208 /*.banner_item img {*/ 208 /*.banner_item img {*/
  209 +
  210 +
209 /*width: 100%;*/ 211 /*width: 100%;*/
  212 +
  213 +
210 /*!*max-height: 1.3rem;*!*/ 214 /*!*max-height: 1.3rem;*!*/
  215 +
  216 +
211 /*}*/ 217 /*}*/
212 218
213 .banner_item_img { 219 .banner_item_img {
@@ -230,7 +236,7 @@ footer { @@ -230,7 +236,7 @@ footer {
230 236
231 .swiper_box { 237 .swiper_box {
232 background-color: #fff; 238 background-color: #fff;
233 - padding: 0 0.14rem; 239 + margin: 0 0.14rem;*/
234 z-index: 0; 240 z-index: 0;
235 overflow: hidden; 241 overflow: hidden;
236 } 242 }
@@ -273,7 +279,6 @@ footer { @@ -273,7 +279,6 @@ footer {
273 } 279 }
274 280
275 .swiper_item { 281 .swiper_item {
276 -  
277 /*display: flex;*/ 282 /*display: flex;*/
278 /*align-items: center;*/ 283 /*align-items: center;*/
279 /*justify-content: space-between;*/ 284 /*justify-content: space-between;*/
@@ -297,8 +302,7 @@ footer { @@ -297,8 +302,7 @@ footer {
297 overflow: hidden; 302 overflow: hidden;
298 border-radius: 0.1rem; 303 border-radius: 0.1rem;
299 float: left; 304 float: left;
300 - padding: 0.28rem 0 0 0 ;  
301 - 305 + padding: 0.28rem 0 0 0;
302 } 306 }
303 307
304 .swiper_item_img img { 308 .swiper_item_img img {
@@ -336,13 +340,17 @@ footer { @@ -336,13 +340,17 @@ footer {
336 margin: 0.28rem 0.25rem 0.28rem 0; 340 margin: 0.28rem 0.25rem 0.28rem 0;
337 } 341 }
338 342
339 -.swiper_item_type1, .swiper_item_type2, .swiper_item_type3 { 343 +.swiper_item_type1,
  344 +.swiper_item_type2,
  345 +.swiper_item_type3 {
340 display: flex; 346 display: flex;
341 align-items: center; 347 align-items: center;
342 margin-right: 0.2rem; 348 margin-right: 0.2rem;
343 } 349 }
344 350
345 -.swiper_item_type1 span, .swiper_item_type2 span, .swiper_item_type3 span { 351 +.swiper_item_type1 span,
  352 +.swiper_item_type2 span,
  353 +.swiper_item_type3 span {
346 display: -webkit-box; 354 display: -webkit-box;
347 -webkit-box-orient: vertical; 355 -webkit-box-orient: vertical;
348 -webkit-line-clamp: 1; 356 -webkit-line-clamp: 1;
@@ -361,7 +369,9 @@ footer { @@ -361,7 +369,9 @@ footer {
361 width: 100%; 369 width: 100%;
362 } 370 }
363 371
364 -.icon_box1, .icon_box2, .icon_box3 { 372 +.icon_box1,
  373 +.icon_box2,
  374 +.icon_box3 {
365 height: 0.3rem; 375 height: 0.3rem;
366 width: 0.3rem; 376 width: 0.3rem;
367 border-radius: 50%; 377 border-radius: 50%;
@@ -404,7 +414,9 @@ footer { @@ -404,7 +414,9 @@ footer {
404 font-size: 18px; 414 font-size: 18px;
405 } 415 }
406 416
  417 +
407 /*专业护理*/ 418 /*专业护理*/
  419 +
408 .nurse_banner { 420 .nurse_banner {
409 background-repeat: no-repeat; 421 background-repeat: no-repeat;
410 background-size: cover; 422 background-size: cover;
@@ -610,3 +622,24 @@ footer { @@ -610,3 +622,24 @@ footer {
610 animation: opacity 0.2s forwards; 622 animation: opacity 0.2s forwards;
611 border-bottom: 1px solid #f6f6f6; 623 border-bottom: 1px solid #f6f6f6;
612 } 624 }
  625 +html,body{
  626 + height: 100%;
  627 +}
  628 +#app {
  629 + height: 100%;
  630 + display: flex;
  631 + display: -webkit-flex;
  632 + display: -webkit-box;
  633 + flex-flow: column;
  634 + -webkit-flex-flow: column;
  635 + -webkit-box-orient: vertical;
  636 + overflow-x: hidden;
  637 +}
  638 +
  639 +.warp {
  640 + position: relative;
  641 + -webkit-box-flex: 1;
  642 + -webkit-flex: 1;
  643 + flex: 1;
  644 + overflow: auto;
  645 +}
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html lang="en"> 2 <html lang="en">
3 -<head> 3 +
  4 + <head>
4 <meta charset="UTF-8"> 5 <meta charset="UTF-8">
5 - <meta name="viewport"  
6 - content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/> 6 + <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
7 <meta name="format-detection" content="telephone=no,email=no,date=no,address=no"> 7 <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
8 - <title></title> 8 + <title>慈界医养</title>
9 <script src="../../assets/js/fontsize.js"></script> 9 <script src="../../assets/js/fontsize.js"></script>
10 <link rel="stylesheet" href="../../assets/css/weui.min.css"> 10 <link rel="stylesheet" href="../../assets/css/weui.min.css">
11 - <link rel="stylesheet" href="../../assets/css/api.css"/>  
12 - <!--<link rel="stylesheet" href="http://at.alicdn.com/t/font_641470_jg64l6ijsg4lsor.css">-->  
13 - <link rel="stylesheet" href="../../assets/css/my_f.css"/> 11 + <link rel="stylesheet" href="../../assets/css/api.css" />
  12 + <link rel="stylesheet" href="../../assets/css/my_f.css" />
14 <link rel="stylesheet" href="../../assets/css/index.css"> 13 <link rel="stylesheet" href="../../assets/css/index.css">
15 <link rel="stylesheet" href="../../assets/icon/iconfont.css"> 14 <link rel="stylesheet" href="../../assets/icon/iconfont.css">
16 <style> 15 <style>
@@ -25,90 +24,251 @@ @@ -25,90 +24,251 @@
25 background-color: #dbb25f; 24 background-color: #dbb25f;
26 } 25 }
27 26
28 - .app_name {  
29 - padding-right: 0.8rem;  
30 - font-family: "fzjt";  
31 - font-size: 20px; 27 + .strict_box {
  28 + display: flex;
  29 + align-items: center;
  30 + justify-content: space-around;
  31 + font-size: 11px;
  32 + color: #565656;
  33 + padding: 0.26rem 0;
  34 + background-color: #fff;
  35 + }
  36 +
  37 + .strict_box .iconfont {
  38 + color: #D8B25F;
  39 + font-size: 15px;
  40 + margin-right: 0.1rem;
  41 + }
  42 +
  43 + .strict_box1 {
  44 + display: flex;
  45 + align-items: center;
  46 + justify-content: space-between;
  47 + font-size: 11px;
  48 + padding: 0.21rem 0.37rem;
  49 + background-color: #fff;
  50 + }
  51 +
  52 + .strict_box1_left {
  53 + padding: 0.14rem 0.3rem;
  54 + box-shadow: 0 0 3px #ccc;
  55 + color: #686868;
  56 + border-radius: 0.16rem;
  57 + }
  58 +
  59 + .strict_box1_right {
  60 + padding: 0.14rem 0.3rem;
  61 + color: #FBA500;
  62 + box-shadow: 0 0 3px rgba(251, 165, 0, 0.5);
  63 + border-radius: 0.16rem;
32 } 64 }
33 65
34 - .triangle_border_up span {  
35 - display: block; 66 + .progress_box {
  67 + margin: 0.1rem 0.26rem 0 0.26rem;
  68 + background-color: #f5f5f5;
  69 + }
  70 +
  71 + .progress {
  72 + height: 0.08rem;
  73 + background-color: #D8B25F;
36 width: 0; 74 width: 0;
37 - height: 0;  
38 - border-width: 0 5px 5px;  
39 - border-style: solid;  
40 - border-color: transparent transparent #fff; /*透明 透明 黄*/  
41 - position: absolute; 75 + }
  76 +
  77 + .target_box {
  78 + display: flex;
  79 + align-items: center;
  80 + justify-content: space-between;
  81 + padding: 0.46rem 0;
  82 + box-shadow: 0 -3px 4px 0 #E4E4E4 inset;
  83 + background-color: #fff;
  84 + }
  85 +
  86 + .target_item {
  87 + font-size: 17px;
  88 + color: #060606;
  89 + /*font-weight: 600;*/
  90 + text-align: center;
  91 + flex: 1;
  92 + border-right: 1px solid #d9d9d9;
  93 + padding: 0.2rem 0 0.1rem 0;
  94 + }
  95 +
  96 + .target_item:last-child {
  97 + border: 0;
  98 + }
  99 +
  100 + .target_item_bottom {
  101 + font-size: 12px;
  102 + color: #565656;
  103 + }
  104 +
  105 + .strict_title {
  106 + display: flex;
  107 + align-items: center;
  108 + justify-content: space-between;
  109 + font-size: 17px;
  110 + color: #000;
  111 + padding: 0.35rem 0;
  112 + background-color: #fff;
  113 + }
  114 +
  115 + .strict_title span {
  116 + flex: 1;
  117 + text-align: center;
  118 + }
  119 +
  120 + .strict_title .strict_title_item {
  121 + border-right: 2px solid #D8B25F;
  122 + }
  123 +
  124 + .strict_title .strict_title_item_active {
  125 + color: #D8B25F;
  126 + }
  127 +
  128 + .strict_content_title {
  129 + padding: 0.32rem 0;
  130 + display: flex;
  131 + align-items: center;
  132 + justify-content: center;
  133 + font-size: 12px;
  134 + color: #060606;
  135 + background-color: #fff;
  136 + }
  137 +
  138 + .strict_content_title .quan {
  139 + padding: 0.1rem 0;
  140 + border-bottom: 1px solid #333;
  141 + }
  142 +
  143 + .strict_box_img {
  144 + display: flex;
  145 + align-items: center;
  146 + justify-content: center;
  147 + }
  148 +
  149 + .strict_box_img img {
  150 + width: 100%;
  151 + }
  152 +
  153 + .strict_btn {
  154 + display: flex;
  155 + align-items: center;
  156 + justify-content: space-between;
  157 + background: #fff;
  158 + padding: 0 0 0 0.57rem;
  159 + /*margin: 0.08rem 0 0 0;*/
  160 + position: fixed;
  161 + width: 100%;
  162 + left: 0;
42 bottom: 0; 163 bottom: 0;
43 - right: 0.55rem; 164 + z-index: 2;
  165 + /*border-top: 1px solid #fff;*/
44 } 166 }
45 167
46 - .mold_index {  
47 - position: absolute; 168 + .strict_btn_price {
  169 + font-size: 18px;
  170 + color: #E87139;
  171 + flex: 1;
48 } 172 }
49 173
50 - #container {  
51 - width: 0;  
52 - height: 0; 174 + .strict_btn_right {
  175 + flex: 1;
  176 + display: flex;
  177 + align-items: center;
  178 + font-size: 10px;
  179 + color: #333;
  180 + }
  181 +
  182 + .goPay {
  183 + padding: 0.28rem 0;
  184 + background-color: #D8B25F;
  185 + font-size: 15px;
  186 + color: #fff;
  187 + flex: 1;
  188 + text-align: center;
53 } 189 }
54 190
55 - .index1 .icon-fenxiang-tianchong {  
56 - color: #d8b25f; 191 + .strict_btn_right_item {
  192 + padding: 0 0.32rem;
  193 + display: flex;
  194 + align-items: center;
  195 + flex-direction: column;
  196 + border-left: 1px solid #E4E4E4
57 } 197 }
58 198
59 - .my_top {  
60 - overflow: hidden; 199 + .rmb {
  200 + font-size: 13px;
61 } 201 }
62 202
63 - .dot {  
64 - position: absolute;  
65 - height: 10px;  
66 - width: 10px;  
67 - background-color: #EE6449;  
68 - border-radius: 50%;  
69 - right: 0.44rem;  
70 - top: 0.37rem;  
71 - z-index: 100000; 203 + .index_on {
  204 + background-color: #fff;
  205 + border-bottom: 1px solid #f2f2f2;
72 } 206 }
73 207
74 - .my_top_icon_box {  
75 - background-color: #ddbb72;  
76 - padding:0.2rem 0.5rem 0.2rem 0; 208 + .index_on .iconfont {
  209 + color: #D8B25F;
77 } 210 }
  211 + /*flex布局*/
78 212
  213 + [v-cloak] {
  214 + display: none;
  215 + }
79 </style> 216 </style>
80 -</head>  
81 -<body>  
82 -<div id="app" v-cloak>  
83 - <div id="container"></div>  
84 - <header :class="index===0?'headers':''">  
85 - <div class="index_header" v-if="index==0">  
86 - <div class="index_left" >  
87 - <div class="index_left_img">  
88 - <div class="iconfont icon-dizhi"></div> 217 + </head>
  218 +
  219 + <body>
  220 + <div id="app" v-cloak>
  221 + <div class="warp" v-cloak>
  222 + <header class="" id="header">
  223 + <div class="my_top">
  224 + <div class="my_header_boxs" @click="my_detail">
  225 + <div class="my_header_box">
  226 + <img :src="user_type.avatar?user_type.avatar:'../../assets/image/default_img.png'" alt="">
89 </div> 227 </div>
90 - <span @click.stop="goToCity">{{cityname?cityname:'定位中...'}}</span> 228 + <span :class="['my_vip',user_type.is_vip==1?'vip_show':'no_vip']">V</span>
91 </div> 229 </div>
92 - <span class="app_name">慈界医养</span>  
93 - <div class="index_right" @click="show_menu">  
94 - <img src="../../assets/image/plus.png" alt="" :class="[img_active?'img_transform':'img_transform1']"> 230 + <div class="my_name">{{user_type.name}}</div>
95 </div> 231 </div>
  232 + </header>
  233 + <div class="my_count">
  234 + <div class="my_count_item" @click="my_balance(user_type.balance)">
  235 + <div class="my_price">{{user_type.balance?user_type.balance:0.00}}元</div>
  236 + <div>账户余额</div>
96 </div> 237 </div>
97 - <div class="index1" v-else-if="index==1">  
98 - <div class="index1_item index_on">  
99 - <!--<div class="index1_item index_on">-->  
100 - <div></div>  
101 - <div class="iconfont icon-fenxiang-tianchong"></div> 238 + <div class="my_count_item" @click="my_consumption">
  239 + <div class="my_price">{{user_type.count?user_type.count:0}}张</div>
  240 + <div>消费金额</div>
102 </div> 241 </div>
103 </div> 242 </div>
104 - <div class="my_top_icon_box" v-else>  
105 - <span class="iconfont icon-xiaoxi" @click="my_news"></span>  
106 - <span class="dot" v-show="newList.length!=0"></span> 243 + <div class="my_item_box">
  244 + <div class="my_item" @click="goPay">
  245 + <img src="../../assets/image/my0.png" alt="">
  246 + <span>我的订单</span>
107 </div> 247 </div>
108 - <div class="triangle_border_up" v-show="img_active">  
109 - <span></span> 248 + <div class="my_item" @click="go_hearth">
  249 + <img src="../../assets/image/my1.png" alt="">
  250 + <span>健康档案</span>
110 </div> 251 </div>
111 - </header> 252 + <div class="my_item border_2" @click="my_power">
  253 + <img src="../../assets/image/my2.png" alt="">
  254 + <span>我的权益</span>
  255 + </div>
  256 + <div class="my_item border_1" @click="question">
  257 + <img src="../../assets/image/my3.png" alt="">
  258 + <span>常见问题</span>
  259 + </div>
  260 + <div class="my_item border_1 " @click="friend">
  261 + <img src="../../assets/image/my4.png" alt="">
  262 + <span>邀请好友</span>
  263 + <span class="my_money">领取高额消费金额</span>
  264 + </div>
  265 + <div class="my_item border_1 border_2" @click="set">
  266 + <img src="../../assets/image/my5.png" alt="">
  267 + <span>设置</span>
  268 + </div>
  269 + </div>
  270 + </div>
  271 +
112 <footer> 272 <footer>
113 <div class="footer_item" :class="{footer_item_active:index==0}" @click="changeTab(0)"> 273 <div class="footer_item" :class="{footer_item_active:index==0}" @click="changeTab(0)">
114 <i class="iconfont icon-yuanjiaojuxingkaobei"></i> 274 <i class="iconfont icon-yuanjiaojuxingkaobei"></i>
@@ -122,13 +282,13 @@ @@ -122,13 +282,13 @@
122 <i class="iconfont icon-wo"></i> 282 <i class="iconfont icon-wo"></i>
123 <span>我的</span> 283 <span>我的</span>
124 </div> 284 </div>
125 - <div class="mold_index" v-show="img_active" @click="hideMenu"></div> 285 +
126 </footer> 286 </footer>
127 -</div>  
128 -</body> 287 + </div>
  288 + </body>
129 </html> 289 </html>
130 <script> 290 <script>
131 - window.onLoad = function () { 291 + window.onLoad = function() {
132 var map = new AMap.Map('container'); 292 var map = new AMap.Map('container');
133 } 293 }
134 var url = 'https://webapi.amap.com/maps?v=1.4.8&key=ef53760bd959a4df08b7d4587280e642&callback=onLoad'; 294 var url = 'https://webapi.amap.com/maps?v=1.4.8&key=ef53760bd959a4df08b7d4587280e642&callback=onLoad';
@@ -138,6 +298,7 @@ @@ -138,6 +298,7 @@
138 document.head.appendChild(jsapi); 298 document.head.appendChild(jsapi);
139 </script> 299 </script>
140 <script type="text/javascript" src="../../assets/js/api.js"></script> 300 <script type="text/javascript" src="../../assets/js/api.js"></script>
  301 +<script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script>
141 <script type="text/javascript" src="../../assets/js/weui.min.js"></script> 302 <script type="text/javascript" src="../../assets/js/weui.min.js"></script>
142 <script type="text/javascript" src="../../assets/js/public.js"></script> 303 <script type="text/javascript" src="../../assets/js/public.js"></script>
143 <script type="text/javascript" src="../../assets/js/fastclick.js"></script> 304 <script type="text/javascript" src="../../assets/js/fastclick.js"></script>
@@ -151,96 +312,83 @@ @@ -151,96 +312,83 @@
151 var app = new Vue({ 312 var app = new Vue({
152 el: "#app", 313 el: "#app",
153 data: { 314 data: {
154 - index: 0,  
155 - headerH: '',  
156 - footerH: '',  
157 - getlng: '',  
158 - getlat: '',  
159 - cityindex: '',  
160 - cityname: '',  
161 - img_active: false,  
162 - map: {},  
163 - newList: [] 315 + index: 2,
  316 + isLogin: true,
  317 + // user_info: [],
  318 + user_type: [1],
  319 + avatar_default: '../../assets/image/mblogo_03.png',
  320 + default_name: '',
  321 + marginTop: '',
  322 + newList: [],
  323 + type: 0
164 }, 324 },
165 - created: function () {  
166 - apiready = function () {  
167 - api.addEventListener({  
168 - name: 'city'  
169 - }, function (ret, err) {  
170 - app.cityname = ret.value.city;  
171 - });  
172 - app.headerH = $api.offset($api.dom('header')).h;  
173 - app.footerH = $api.offset($api.dom('footer')).h;  
174 - api.openFrameGroup({  
175 - name: 'index_fm',  
176 - scrollEnabled: false,  
177 - index: app.index,  
178 - preload: 0,  
179 - reload: true,  
180 - rect: {  
181 - x: 0,  
182 - y: app.headerH,  
183 - w: 'auto',  
184 - h: api.winHeight - app.headerH - app.footerH 325 + created: function() {
  326 + this.getUserIndexInfo()
  327 + this.getNews();
185 }, 328 },
186 - frames: [  
187 - {  
188 - name: 'index_f',  
189 - url: '../index/index_f.html',  
190 - bounces: false, 329 + mounted: function() {
  330 + window.addEventListener('scroll', this.handleScroll)
  331 + },
  332 + methods: {
  333 + // 个人资料
  334 + my_detail: function() {
  335 + if(app.user_type == '') {
  336 + toastMsg('未登录')
  337 + } else {
  338 + openView('my_detail', 'my/my_detail', '个人资料', 'my_detail', false, {
  339 + rid: 0,
  340 + type: 0
  341 + })
  342 + }
191 }, 343 },
192 - {  
193 - name: 'strict_f',  
194 - url: '../strict/strict_f.html',  
195 - bounces: false 344 + // 设置
  345 + set: function() {
  346 + openView('my_set', 'my/my_set', '设置', 'my_set', false, false, false)
196 }, 347 },
197 - {  
198 - name: 'my_f',  
199 - url: '../my/my_f.html',  
200 - bounces: false 348 + // 常见问题
  349 + question: function() {
  350 + if(app.user_type == '') {
  351 + toastMsg('未登录')
  352 + } else {
  353 + openView('my_que', 'my/my_que', '常见问题', 'my_que', false, false, false)
201 } 354 }
202 - ],  
203 -  
204 - });  
205 - api.addEventListener({  
206 - name: 'index0'  
207 - }, function (ret, err) {  
208 - api.setFrameGroupIndex({  
209 - name: 'index_fm',  
210 - index: ret.value.index  
211 - })  
212 - });  
213 -  
214 - api.addEventListener({  
215 - name: 'index1'  
216 - }, function (ret, err) {  
217 - api.setFrameGroupIndex({  
218 - name: 'index_fm',  
219 - index: ret.value.index 355 + },
  356 + // 邀友有赚
  357 + friend: function() {
  358 + if(app.user_type == '') {
  359 + toastMsg('未登录')
  360 + } else {
  361 + openView('my_invite', 'my/my_invite', '邀请好友', 'my_invite', false, {
  362 + invite_type: 0
220 }) 363 })
221 - });  
222 - api.addEventListener({  
223 - name: 'hide_menu'  
224 - }, function (ret, err) {  
225 - app.img_active = ret.value.img_active;  
226 - });  
227 - app.get_city();  
228 - app.getNews();  
229 } 364 }
230 }, 365 },
231 - methods: { 366 + // 我的订单
  367 + goPay: function() {
  368 + if(app.user_type == '') {
  369 + toastMsg('未登录')
  370 + } else {
  371 + openView('my_orderlist', 'my/my_orderlist', '我的订单', 'my_orderlist', false, false, false);
  372 + }
  373 + },
232 // 我的消息 374 // 我的消息
233 - my_news: function () {  
234 - openView('my_news', 'my/my_news', '消息通知', 'my_news', false, {new_type: 0}) 375 + my_news: function() {
  376 + if(app.user_type == '') {
  377 + toastMsg('未登录')
  378 + } else {
  379 + openView('my_news', 'my/my_news', '消息通知', 'my_news', false, {
  380 + new_type: 0
  381 + })
  382 + }
235 }, 383 },
236 // 有无消息判断 384 // 有无消息判断
237 - getNews: function () { 385 + getNews: function() {
238 var header = { 386 var header = {
239 "XX-Device-Type": getDevice(), 387 "XX-Device-Type": getDevice(),
240 'XX-Token': getToken() 388 'XX-Token': getToken()
241 }; 389 };
242 - getRequest('post', 'user/index/getUserMessageList', null, header).then(function (res) {  
243 - if (res.data.code == 1) { 390 + getRequest('post', 'user/index/getUserMessageList', null, header).then(function(res) {
  391 + if(res.data.code == 1) {
244 app.newList = res.data.data.unread; 392 app.newList = res.data.data.unread;
245 } else { 393 } else {
246 toastMsg(res.data.msg) 394 toastMsg(res.data.msg)
@@ -248,88 +396,76 @@ @@ -248,88 +396,76 @@
248 loadEnd(); 396 loadEnd();
249 }) 397 })
250 }, 398 },
251 - // 定位当前城市  
252 - get_city: function () {  
253 - app.map = new AMap.Map('container', {});  
254 - app.map.plugin('AMap.Geolocation', function () {  
255 - var geolocation = new AMap.Geolocation({  
256 - // 是否使用高精度定位,默认:true  
257 - enableHighAccuracy: true,  
258 - // 设置定位超时时间,默认:无穷大  
259 - timeout: 10000,  
260 - });  
261 - geolocation.getCurrentPosition();  
262 - AMap.event.addListener(geolocation, 'complete', onComplete)  
263 - AMap.event.addListener(geolocation, 'error', onError)  
264 -  
265 - function onComplete(data) {  
266 - // console.log(JSON.stringify(data))  
267 - app.cityname = data.addressComponent.province  
268 - // data是具体的定位信息  
269 - }  
270 -  
271 - function onError(erro) {  
272 - // 定位出错  
273 - toastMsg('请开启定位功能') 399 + // 我的账号
  400 + my_balance: function() {
  401 + if(app.user_type == '') {
  402 + toastMsg('未登录')
  403 + } else {
  404 + openView('my_balance', 'my/my_balance', '我的账号', 'my_balance', false, false, false)
274 } 405 }
275 - })  
276 }, 406 },
277 - // 切换底部导航  
278 - changeTab: function (res) {  
279 -  
280 - setTimeout(function () {  
281 - app.index = res;  
282 - api.setFrameGroupIndex({  
283 - name: 'index_fm',  
284 - index: res  
285 - })  
286 - }, 300);  
287 - app.img_active = false;  
288 - api.sendEvent({  
289 - name: 'show_menu',  
290 - extra: {  
291 - img_active: app.img_active 407 + // 我的消费金
  408 + my_consumption: function() {
  409 + if(app.user_type == '') {
  410 + toastMsg('未登录')
  411 + } else {
  412 + openView('my_consumption', 'my/my_consumption', '我的消费金', 'my_consumption', false, false, false)
292 } 413 }
293 - });  
294 }, 414 },
295 - // 切换当前城市  
296 - goToCity: function () {  
297 - if (app.cityname == '') {  
298 - toastMsg('定位中') 415 + // 我的权益
  416 + my_power: function() {
  417 + var header = {
  418 + "XX-Device-Type": getDevice(),
  419 + 'XX-Token': getToken()
  420 + };
  421 + if(app.user_type == '') {
  422 + toastMsg('未登录')
299 } else { 423 } else {
300 - api.openWin({  
301 - name: 'city_win',  
302 - url: '../index/city_win.html',  
303 - pageParam: {  
304 - cityname: app.cityname 424 + getRequest('post', 'user/index/myRights', null, header).then(function(res) {
  425 + if(res.data.code == 1) {
  426 + openView('my_benefit', 'my/my_benefit', '我的权益', 'my_benefit', false, false, false)
  427 + } else {
  428 + toastMsg(res.data.msg);
305 } 429 }
306 }); 430 });
307 } 431 }
308 }, 432 },
309 - // 显示快捷菜单  
310 - show_menu: function () {  
311 - if (app.img_active == false) {  
312 - app.img_active = true 433 + // 健康档案
  434 + go_hearth: function() {
  435 + if(app.user_type == '') {
  436 + toastMsg('未登录')
313 } else { 437 } else {
314 - app.img_active = false  
315 - }  
316 - api.sendEvent({  
317 - name: 'show_menu',  
318 - extra: {  
319 - img_active: app.img_active  
320 - }  
321 - }); 438 + api.openFrame({
  439 + name: 'my_health',
  440 + url: './my_health.html',
  441 + // bounces: true,
  442 + rect: {
  443 + x: 0,
  444 + y: 0,
  445 + w: 'auto',
  446 + h: 'auto',
322 }, 447 },
323 - // 隐藏快捷菜单  
324 - hideMenu: function () {  
325 - app.img_active = !app.img_active;  
326 - api.sendEvent({  
327 - name: 'show_menu',  
328 - extra: {  
329 - img_active: app.img_active 448 + pageParam: {
  449 + rid: 0,
  450 + type: 0
330 } 451 }
331 }); 452 });
  453 + }
332 }, 454 },
  455 + // 获取个人信息
  456 + getUserIndexInfo: function() {
  457 + var header = {
  458 + "XX-Device-Type": getDevice(),
  459 + 'XX-Token': getToken()
  460 + };
  461 + getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function(res) {
  462 + // alert(JSON.stringify(res));
  463 + if(res.data.code == 1) {
  464 + app.user_type = res.data.data;
  465 + } else {}
  466 + loadEnd()
  467 + });
  468 + }
333 469
334 } 470 }
335 }) 471 })
1 -<!doctype html> 1 + <!doctype html>
2 <html lang="en"> 2 <html lang="en">
3 <head> 3 <head>
4 <meta charset="UTF-8"> 4 <meta charset="UTF-8">
1 -<!DOCTYPE HTML>  
2 -<html> 1 +<!DOCTYPE html>
  2 +<html lang="en">
3 <head> 3 <head>
4 - <meta charset="utf-8"> 4 + <meta charset="UTF-8">
5 <meta name="viewport" 5 <meta name="viewport"
6 - content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>  
7 - <meta name="format-detection" content="telephone=no, email=no, date=no, address=no"> 6 + content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
8 <meta name="format-detection" content="telephone=no,email=no,date=no,address=no"> 7 <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
9 - <title></title> 8 + <title>慈界医养</title>
10 <script src="../../assets/js/fontsize.js"></script> 9 <script src="../../assets/js/fontsize.js"></script>
11 - <link rel="stylesheet" href="../../assets/css/swiper-3.4.2.min.css"> 10 + <link rel="stylesheet" href="../../assets/css/weui.min.css">
12 <link rel="stylesheet" href="../../assets/css/api.css"/> 11 <link rel="stylesheet" href="../../assets/css/api.css"/>
  12 + <link rel="stylesheet" href="../../assets/css/swiper-3.4.2.min.css">
  13 + <!--<link rel="stylesheet" href="http://at.alicdn.com/t/font_641470_jg64l6ijsg4lsor.css">-->
  14 + <link rel="stylesheet" href="../../assets/css/my_f.css"/>
13 <link rel="stylesheet" href="../../assets/css/index.css"> 15 <link rel="stylesheet" href="../../assets/css/index.css">
14 <link rel="stylesheet" href="../../assets/icon/iconfont.css"> 16 <link rel="stylesheet" href="../../assets/icon/iconfont.css">
15 <style> 17 <style>
16 - body, html {  
17 - /*background-color: #efefef;*/  
18 - height: 100%; 18 + header {
  19 + width: 100%;
  20 + height: auto;
  21 + font-size: 20px;
  22 + /*background-color: #dbb25f;*/
  23 + }
  24 +
  25 + .headers {
  26 + background-color: #dbb25f;
19 } 27 }
20 - .banner_box {  
21 - display: flex;  
22 - align-items: center;  
23 - justify-content: center;  
24 - margin-bottom: 0.1rem; 28 +
  29 + .app_name {
  30 + padding-right: 0.8rem;
  31 + font-family: "fzjt";
  32 + font-size: 20px;
25 } 33 }
26 34
27 - .swiper-slide {  
28 - width: 100% !important; 35 + .triangle_border_up span {
  36 + display: block;
  37 + width: 0;
  38 + height: 0;
  39 + border-width: 0 5px 5px;
  40 + border-style: solid;
  41 + border-color: transparent transparent #fff; /*透明 透明 黄*/
  42 + position: absolute;
  43 + bottom: 0;
  44 + right: 0.55rem;
29 } 45 }
30 46
31 - .swiper_list {  
32 - width: 100%; 47 + .mold_index {
  48 + position: absolute;
  49 + }
  50 +
  51 + #container {
  52 + width: 0;
  53 + height: 0;
  54 + }
  55 +
  56 + .index1 .icon-fenxiang-tianchong {
  57 + color: #d8b25f;
  58 + }
  59 +
  60 + .my_top {
  61 + overflow: hidden;
  62 + }
  63 +
  64 + .dot {
  65 + position: absolute;
  66 + height: 10px;
  67 + width: 10px;
  68 + background-color: #EE6449;
  69 + border-radius: 50%;
  70 + right: 0.44rem;
  71 + top: 0.37rem;
  72 + z-index: 100000;
  73 + }
  74 +
  75 + .my_top_icon_box {
  76 + background-color: #ddbb72;
  77 + padding:0.2rem 0.5rem 0.2rem 0;
  78 + }
  79 + /*flex布局*/
  80 + [v-cloak]{
  81 + display: none;
33 } 82 }
34 </style> 83 </style>
35 </head> 84 </head>
36 <body> 85 <body>
37 -<div id="loadStart"></div>  
38 <div id="app" v-cloak> 86 <div id="app" v-cloak>
  87 + <div id="container"></div>
  88 + <header :class="index===0?'headers':''">
  89 + <div class="index_header" v-if="index==0">
  90 + <div class="index_left" >
  91 + <div class="index_left_img">
  92 + <div class="iconfont icon-dizhi"></div>
  93 + </div>
  94 + <span @click.stop="goToCity">{{cityname?cityname:'定位中...'}}</span>
  95 + </div>
  96 + <span class="app_name">慈界医养</span>
  97 + <div class="index_right" @click="show_menu">
  98 + <img src="../../assets/image/plus.png" alt="" :class="[img_active?'img_transform':'img_transform1']">
  99 + </div>
  100 + </div>
  101 + <div class="index1" v-else-if="index==1">
  102 + <div class="index1_item index_on">
  103 + <!--<div class="index1_item index_on">-->
  104 + <div></div>
  105 + <div class="iconfont icon-fenxiang-tianchong"></div>
  106 + </div>
  107 + </div>
  108 + <div class="my_top_icon_box" v-else>
  109 + <span class="iconfont icon-xiaoxi" @click="my_news"></span>
  110 + <span class="dot" v-show="newList.length!=0"></span>
  111 + </div>
  112 + <div class="triangle_border_up" v-show="img_active">
  113 + <span></span>
  114 + </div>
  115 + </header>
  116 + <div class="warp">
39 <div class="index_list" id="top"> 117 <div class="index_list" id="top">
40 - <div class="index_item" v-for="(item,index) in cat_data" @click="openItem(item.id,item.name)"> 118 + <div class="index_item" v-cloak v-for="(item,index) in cat_data" @click="openItem(item.id,item.name)">
41 <div class="index_img"><img :src="item.img?item.img:img_default" alt=""></div> 119 <div class="index_img"><img :src="item.img?item.img:img_default" alt=""></div>
42 <div>{{item.name}}</div> 120 <div>{{item.name}}</div>
43 </div> 121 </div>
@@ -50,11 +128,11 @@ @@ -50,11 +128,11 @@
50 <div class="menus_item" @click="openStrict"><span class="iconfont icon-icon"></span><span>认购权益</span></div> 128 <div class="menus_item" @click="openStrict"><span class="iconfont icon-icon"></span><span>认购权益</span></div>
51 <!--<div class="menus_item" @click="openQrc"><span class="iconfont icon-saoyisao"></span><span>扫一扫</span></div>--> 129 <!--<div class="menus_item" @click="openQrc"><span class="iconfont icon-saoyisao"></span><span>扫一扫</span></div>-->
52 </div> 130 </div>
53 - </div> 131 +
54 <div class="banner_box" @click="openStrict"><img src="../../assets/image/banner.png" alt=""></div> 132 <div class="banner_box" @click="openStrict"><img src="../../assets/image/banner.png" alt=""></div>
55 <div class="banner_nav_box"> 133 <div class="banner_nav_box">
56 - <div class="banner_item" @click="care(item.goods_id,item.title)" v-for="(item,index) in index_data">  
57 - <div class="banner_item_left"> 134 + <div class="banner_item" v-cloak @click="care(item.goods_id,item.title)" v-for="(item,index) in index_data">
  135 + <div class="banner_item_left" >
58 <span class="banner_item_title">{{item.title}}</span> 136 <span class="banner_item_title">{{item.title}}</span>
59 <span class="banner_item_content">{{item.describe}}</span> 137 <span class="banner_item_content">{{item.describe}}</span>
60 </div> 138 </div>
@@ -65,15 +143,13 @@ @@ -65,15 +143,13 @@
65 </div> 143 </div>
66 <div class="swiper_title fixed_top" v-show="top_show"> 144 <div class="swiper_title fixed_top" v-show="top_show">
67 <span></span> 145 <span></span>
68 - <span class="swiper_title_content"> <img src="../../assets/image/part4_03.jpg" alt=""><span>严选推介</span><img  
69 - src="../../assets/image/part4_05.jpg" alt=""></span> 146 + <span class="swiper_title_content"> <img src="../../assets/image/part4_03.jpg" alt=""><span>严选推介</span><img src="../../assets/image/part4_05.jpg" alt=""></span>
70 <span class="change_slide">换一批<span class="iconfont icon-xunhuan101"></span></span> 147 <span class="change_slide">换一批<span class="iconfont icon-xunhuan101"></span></span>
71 </div> 148 </div>
72 <div class="swiper_box"> 149 <div class="swiper_box">
73 <div class="swiper_title" :class="{fixed_top:top_show}" id="main" v-show="!top_show"> 150 <div class="swiper_title" :class="{fixed_top:top_show}" id="main" v-show="!top_show">
74 <span></span> 151 <span></span>
75 - <span class="swiper_title_content"> <img src="../../assets/image/part4_03.jpg" alt=""><span>严选推介</span><img  
76 - src="../../assets/image/part4_05.jpg" alt=""></span> 152 + <span class="swiper_title_content"> <img src="../../assets/image/part4_03.jpg" alt=""><span>严选推介</span><img src="../../assets/image/part4_05.jpg" alt=""></span>
77 <span class="change_slide">换一批<span class="iconfont icon-xunhuan101"></span></span> 153 <span class="change_slide">换一批<span class="iconfont icon-xunhuan101"></span></span>
78 </div> 154 </div>
79 <div class="swiper-container"> 155 <div class="swiper-container">
@@ -99,22 +175,74 @@ @@ -99,22 +175,74 @@
99 </div> 175 </div>
100 <div class="mold_index" v-show="img_active" @touchstart="hideMenu"></div> 176 <div class="mold_index" v-show="img_active" @touchstart="hideMenu"></div>
101 </div> 177 </div>
  178 + </div>
  179 + </div>
  180 +
  181 + <footer>
  182 + <div class="footer_item" :class="{footer_item_active:index==0}" @click="changeTab(0)">
  183 + <i class="iconfont icon-yuanjiaojuxingkaobei"></i>
  184 + <span>严选</span>
  185 + </div>
  186 + <div class="footer_item" :class="{footer_item_active:index==1}" @click="changeTab(1)">
  187 + <i class="iconfont icon-xingzhuang"></i>
  188 + <span>投资</span>
  189 + </div>
  190 + <div class="footer_item" :class="{footer_item_active:index==2}" @click="changeTab(2)">
  191 + <i class="iconfont icon-wo"></i>
  192 + <span>我的</span>
  193 + </div>
  194 + <div class="mold_index" v-show="img_active" @click="hideMenu"></div>
  195 + </footer>
102 </div> 196 </div>
103 </body> 197 </body>
104 </html> 198 </html>
  199 +<script>
  200 + window.onLoad = function () {
  201 + var map = new AMap.Map('container');
  202 + }
  203 + var url = 'https://webapi.amap.com/maps?v=1.4.8&key=ef53760bd959a4df08b7d4587280e642&callback=onLoad';
  204 + var jsapi = document.createElement('script');
  205 + jsapi.charset = 'utf-8';
  206 + jsapi.src = url;
  207 + document.head.appendChild(jsapi);
  208 +</script>
105 <script type="text/javascript" src="../../assets/js/api.js"></script> 209 <script type="text/javascript" src="../../assets/js/api.js"></script>
106 <script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script> 210 <script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script>
  211 +<script type="text/javascript" src="../../assets/js/weui.min.js"></script>
107 <script type="text/javascript" src="../../assets/js/public.js"></script> 212 <script type="text/javascript" src="../../assets/js/public.js"></script>
108 <script type="text/javascript" src="../../assets/js/fastclick.js"></script> 213 <script type="text/javascript" src="../../assets/js/fastclick.js"></script>
109 <script> 214 <script>
110 new FastClick(document.body); 215 new FastClick(document.body);
111 </script> 216 </script>
112 <script type="text/javascript" src="../../assets/js/vue.min.js"></script> 217 <script type="text/javascript" src="../../assets/js/vue.min.js"></script>
  218 +<script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
113 <script type="text/javascript" src="../../assets/js/axios.min.js"></script> 219 <script type="text/javascript" src="../../assets/js/axios.min.js"></script>
114 <script> 220 <script>
  221 + new Swiper('.swiper-container', {
  222 + observer: true,
  223 + observeParents: true,
  224 + slidesPerView: 1,
  225 + // autoplayDisableOnInteraction: false,
  226 + loop: true,
  227 + navigation: {
  228 + nextEl: '.change_slide',
  229 + },
  230 + autoHeight: false,
  231 + speed: 1500,
  232 + });
115 var app = new Vue({ 233 var app = new Vue({
116 - el: '#app', 234 + el: "#app",
117 data: { 235 data: {
  236 + index: 0,
  237 + headerH: '',
  238 + footerH: '',
  239 + getlng: '',
  240 + getlat: '',
  241 + cityindex: '',
  242 + cityname: '',
  243 + img_active: false,
  244 + map: {},
  245 + newList: [],
118 img_active: false, 246 img_active: false,
119 mySwiper: {}, 247 mySwiper: {},
120 scroll_top: '', 248 scroll_top: '',
@@ -129,56 +257,98 @@ @@ -129,56 +257,98 @@
129 user_info: [] 257 user_info: []
130 }, 258 },
131 created: function () { 259 created: function () {
132 - apiready = function () {  
133 - app.cat();//首页导航  
134 - app.index();//第三栏  
135 - app.show();//严选推荐  
136 - app.cityname = api.pageParam.cityname;  
137 - // 获取个人信息  
138 - if (getToken() && getToken() != 'undefined') {  
139 - app.getUserIndexInfo() 260 + this.cat(); //首页导航
  261 + this.indexList(); //第三栏
  262 + this.show(); //严选推荐
  263 + // 底部轮播图
  264 + },
  265 + mounted: function() {
  266 + window.addEventListener('scroll', this.handleScroll)
  267 + },
  268 + methods: {
  269 + // 我的消息
  270 + my_news: function () {
  271 + openView('my_news', 'my/my_news', '消息通知', 'my_news', false, {new_type: 0})
  272 + },
  273 + // 有无消息判断
  274 + getNews: function () {
  275 + var header = {
  276 + "XX-Device-Type": getDevice(),
  277 + 'XX-Token': getToken()
  278 + };
  279 + getRequest('post', 'user/index/getUserMessageList', null, header).then(function (res) {
  280 + if (res.data.code == 1) {
  281 + app.newList = res.data.data.unread;
  282 + } else {
  283 + toastMsg(res.data.msg)
140 } 284 }
141 - app.img_active = false;//进入  
142 - api.setFrameAttr({  
143 - name: api.frameName,  
144 - bounces: true 285 + loadEnd();
  286 + })
  287 + },
  288 + // 定位当前城市
  289 + get_city: function () {
  290 + app.map = new AMap.Map('container', {});
  291 + app.map.plugin('AMap.Geolocation', function () {
  292 + var geolocation = new AMap.Geolocation({
  293 + // 是否使用高精度定位,默认:
  294 + enableHighAccuracy: true,
  295 + // 设置定位超时时间,默认:无穷大
  296 + timeout: 10000,
145 }); 297 });
146 - app.scroll_top = $api.byId('top').scrollHeight;  
147 - if (app.scroll_top == 0) {  
148 - app.top_show = true; 298 + geolocation.getCurrentPosition();
  299 + AMap.event.addListener(geolocation, 'complete', onComplete)
  300 + AMap.event.addListener(geolocation, 'error', onError)
  301 + function onComplete(data) {
  302 + console.log(JSON.stringify(data))
  303 + app.cityname = data.addressComponent.province
  304 + // data是具体的定位信息
  305 + }
  306 + function onError(erro) {
  307 + // 定位出错
  308 + toastMsg('请开启定位功能')
  309 + }
  310 + })
  311 + },
  312 + // 切换底部导航
  313 + changeTab: function (res) {
  314 + //跳转页面
  315 + },
  316 + // 切换当前城市
  317 + goToCity: function () {
  318 + if (app.cityname == '') {
  319 + toastMsg('定位中')
149 } else { 320 } else {
150 - app.top_show = false; 321 + api.openWin({
  322 + name: 'city_win',
  323 + url: '../index/city_win.html',
  324 + pageParam: {
  325 + cityname: app.cityname
151 } 326 }
152 - api.addEventListener({  
153 - name: 'show_menu'  
154 - }, function (ret, err) {  
155 - app.img_active = ret.value.img_active;  
156 - api.setFrameAttr({  
157 - name: 'index_f',  
158 - bounces: false  
159 - });  
160 }); 327 });
161 - // 底部轮播图  
162 - app.mySwiper = new Swiper('.swiper-container', {  
163 - observer: true,  
164 - observeParents: true,  
165 - slidesPerView: 1,  
166 - // autoplayDisableOnInteraction: false,  
167 - loop: true,  
168 - navigation: {  
169 - nextEl: '.change_slide', 328 + }
170 }, 329 },
171 - autoHeight: true,  
172 - speed: 1500,  
173 - });  
174 - }; 330 + // 显示快捷菜单
  331 + show_menu: function () {
  332 + if (app.img_active == false) {
  333 + app.img_active = true
  334 + } else {
  335 + app.img_active = false
  336 + }
175 }, 337 },
176 - mounted: function () {  
177 - window.addEventListener('scroll', this.handleScroll) 338 + // 隐藏快捷菜单
  339 + hideMenu: function () {
  340 + app.img_active = !app.img_active;
  341 + api.sendEvent({
  342 + name: 'show_menu',
  343 + extra: {
  344 + img_active: app.img_active
  345 + }
  346 + });
178 }, 347 },
179 - methods: { 348 +
  349 + //首页的数据
180 // 隐藏菜单 350 // 隐藏菜单
181 - hideMenu: function () { 351 + hideMenu: function() {
182 app.img_active = !app.img_active; 352 app.img_active = !app.img_active;
183 api.sendEvent({ 353 api.sendEvent({
184 name: 'hide_menu', 354 name: 'hide_menu',
@@ -188,21 +358,22 @@ @@ -188,21 +358,22 @@
188 }); 358 });
189 }, 359 },
190 // 严选推荐定位 360 // 严选推荐定位
191 - handleScroll: function () { 361 + handleScroll: function() {
192 var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; 362 var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
193 var offsetTop = document.querySelector('#main').offsetTop; 363 var offsetTop = document.querySelector('#main').offsetTop;
194 - if (scrollTop > offsetTop) { 364 + console.log(scrollTop,offsetTop)
  365 + if(scrollTop > offsetTop) {
195 app.top_show = true 366 app.top_show = true
196 } else { 367 } else {
197 app.top_show = false 368 app.top_show = false
198 } 369 }
199 }, 370 },
200 // 严选推荐定位 371 // 严选推荐定位
201 - destroyed: function () { 372 + destroyed: function() {
202 window.removeEventListener('scroll', this.handleScroll) 373 window.removeEventListener('scroll', this.handleScroll)
203 }, 374 },
204 // 打开投资 375 // 打开投资
205 - openStrict: function () { 376 + openStrict: function() {
206 app.img_active = false; 377 app.img_active = false;
207 378
208 api.setFrameGroupIndex({ 379 api.setFrameGroupIndex({
@@ -211,7 +382,7 @@ @@ -211,7 +382,7 @@
211 }) 382 })
212 }, 383 },
213 // 打开订单 384 // 打开订单
214 - openOrder: function () { 385 + openOrder: function() {
215 app.img_active = false; 386 app.img_active = false;
216 openView('my_orderlist', 'my/my_orderlist', '我的订单', 'my_orderlist', false, false, false); 387 openView('my_orderlist', 'my/my_orderlist', '我的订单', 'my_orderlist', false, false, false);
217 api.sendEvent({ 388 api.sendEvent({
@@ -222,7 +393,7 @@ @@ -222,7 +393,7 @@
222 }); 393 });
223 }, 394 },
224 // 打开健康档案 395 // 打开健康档案
225 - openHealth: function () { 396 + openHealth: function() {
226 app.img_active = false; 397 app.img_active = false;
227 api.openWin({ 398 api.openWin({
228 name: 'my_health_w', 399 name: 'my_health_w',
@@ -239,28 +410,27 @@ @@ -239,28 +410,27 @@
239 }); 410 });
240 }, 411 },
241 // 打开客服 412 // 打开客服
242 - openSever: function () { 413 + openSever: function() {
243 app.img_active = false; 414 app.img_active = false;
244 app.getRongYunToken(); 415 app.getRongYunToken();
245 416
246 }, 417 },
247 // 获取客服token 418 // 获取客服token
248 - getRongYunToken: function () { 419 + getRongYunToken: function() {
249 var header = { 420 var header = {
250 "XX-Device-Type": getDevice(), 421 "XX-Device-Type": getDevice(),
251 'XX-Token': getToken() 422 'XX-Token': getToken()
252 }; 423 };
253 - getRequest('post', 'portal/RongYun/index', null, header).then(function (res) {  
254 - if (res.data.code == 1) { 424 + getRequest('post', 'portal/RongYun/index', null, header).then(function(res) {
  425 + if(res.data.code == 1) {
255 app.rongYunToken = res.data.data.token; 426 app.rongYunToken = res.data.data.token;
256 app.userId = res.data.data.userId; 427 app.userId = res.data.data.userId;
257 // app.rongyunInit(); 428 // app.rongyunInit();
258 - } else {  
259 - } 429 + } else {}
260 }) 430 })
261 }, 431 },
262 // 轮播图跳转详情 432 // 轮播图跳转详情
263 - care: function (id, care_name) { 433 + care: function(id, care_name) {
264 api.openWin({ 434 api.openWin({
265 name: 'care_w', 435 name: 'care_w',
266 url: './care_w.html', 436 url: './care_w.html',
@@ -270,57 +440,61 @@ @@ -270,57 +440,61 @@
270 } 440 }
271 }) 441 })
272 }, 442 },
273 - getUserIndexInfo: function () { 443 + getUserIndexInfo: function() {
274 var header = { 444 var header = {
275 "XX-Device-Type": getDevice(), 445 "XX-Device-Type": getDevice(),
276 'XX-Token': getToken() 446 'XX-Token': getToken()
277 }; 447 };
278 - getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function (res) { 448 + getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function(res) {
279 // alert(JSON.stringify(res)) 449 // alert(JSON.stringify(res))
280 - if (res.data.code == 1) { 450 + if(res.data.code == 1) {
281 app.user_info = res.data.data; 451 app.user_info = res.data.data;
282 - } else {  
283 - } 452 + } else {}
284 }) 453 })
285 }, 454 },
286 // 获取分类图标 455 // 获取分类图标
287 - cat: function () {  
288 - getRequest('post', 'portal/index/cat', null, null).then(function (res) {  
289 - if (res.data.code == 1) { 456 + cat: function() {
  457 + getRequest('post', 'portal/index/cat', null, null).then(function(res) {
  458 + if(res.data.code == 1) {
290 app.cat_data = res.data.data; 459 app.cat_data = res.data.data;
291 // loadEnd(); 460 // loadEnd();
292 - } else {  
293 - } 461 + } else {}
294 }) 462 })
295 }, 463 },
296 // 跳转分类列表 464 // 跳转分类列表
297 - openItem: function (id, name) {  
298 - switch (id) { 465 + openItem: function(id, name) {
  466 + var url = id=='1'?'nursing_f':(id=='2'||id=='3'||id=='6')?'disease_f':(id=='4')
  467 + switch(id) {
299 case 1: 468 case 1:
  469 + url = 'nursing_f'
300 openView('nursing_f', 'index/nursing_f', name, 'nursing_f', false, { 470 openView('nursing_f', 'index/nursing_f', name, 'nursing_f', false, {
301 cid: id, 471 cid: id,
302 cityname: app.cityname 472 cityname: app.cityname
303 }); 473 });
304 break; 474 break;
305 - case 2 : 475 + case 2:
  476 + url = 'disease_f'
306 openView('disease_f', 'index/disease_f', name, 'disease_f', false, { 477 openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
307 cid: id, 478 cid: id,
308 cityname: app.cityname 479 cityname: app.cityname
309 }); 480 });
310 break; 481 break;
311 case 3: 482 case 3:
  483 + url = 'disease_f'
312 openView('disease_f', 'index/disease_f', name, 'disease_f', false, { 484 openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
313 cid: id, 485 cid: id,
314 cityname: app.cityname 486 cityname: app.cityname
315 }); 487 });
316 break; 488 break;
317 case 4: 489 case 4:
  490 + url = 'examination_f'
318 openView('examination_f', 'index/examination_f', name, 'examination_f', false, { 491 openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
319 cid: id, 492 cid: id,
320 cityname: app.cityname 493 cityname: app.cityname
321 }); 494 });
322 break; 495 break;
323 case 5: 496 case 5:
  497 + url = 'doc_home_w'
324 api.openWin({ 498 api.openWin({
325 name: 'doc_home_w', 499 name: 'doc_home_w',
326 url: './doc_home_w.html', 500 url: './doc_home_w.html',
@@ -331,24 +505,28 @@ @@ -331,24 +505,28 @@
331 }); 505 });
332 break; 506 break;
333 case 6: 507 case 6:
  508 + url = 'disease_f'
334 openView('disease_f', 'index/disease_f', name, 'disease_f', false, { 509 openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
335 cid: id, 510 cid: id,
336 cityname: app.cityname 511 cityname: app.cityname
337 }); 512 });
338 break; 513 break;
339 case 7: 514 case 7:
  515 + url = 'examination_f'
340 openView('examination_f', 'index/examination_f', name, 'examination_f', false, { 516 openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
341 cid: id, 517 cid: id,
342 cityname: app.cityname 518 cityname: app.cityname
343 }); 519 });
344 break; 520 break;
345 case 8: 521 case 8:
  522 + url = 'examination_f'
346 openView('examination_f', 'index/examination_f', name, 'examination_f', false, { 523 openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
347 cid: id, 524 cid: id,
348 cityname: app.cityname 525 cityname: app.cityname
349 }); 526 });
350 break; 527 break;
351 case 9: 528 case 9:
  529 + url = 'examination_f'
352 api.openWin({ 530 api.openWin({
353 name: 'Insurance_w', 531 name: 'Insurance_w',
354 url: './Insurance_w.html', 532 url: './Insurance_w.html',
@@ -374,27 +552,29 @@ @@ -374,27 +552,29 @@
374 } 552 }
375 }, 553 },
376 // 获取第三栏列表 554 // 获取第三栏列表
377 - index: function () {  
378 - getRequest('post', 'portal/index/index', null, null).then(function (res) {  
379 - if (res.data.code == 1) { 555 + indexList: function() {
  556 + getRequest('post', 'portal/index/index', null, null).then(function(res) {
  557 + if(res.data.code == 1) {
380 app.index_data = res.data.data; 558 app.index_data = res.data.data;
381 - } else {  
382 - }  
383 - setTimeout(function () {  
384 - api.hideProgress();  
385 - }, 2000) 559 + } else {}
  560 +
386 }) 561 })
387 }, 562 },
388 // 获取严选推荐列表 563 // 获取严选推荐列表
389 - show: function () {  
390 - getRequest('POST', 'portal/index/show', null, null).then(function (res) { 564 + show: function() {
  565 + getRequest('POST', 'portal/index/show', null, null).then(function(res) {
391 // alert(JSON.stringify(res)); 566 // alert(JSON.stringify(res));
392 - if (res.data.code == 1) { 567 + if(res.data.code == 1) {
393 app.show_data = res.data.data 568 app.show_data = res.data.data
394 - } else {  
395 - } 569 + } else {}
396 }) 570 })
  571 + },
  572 + //底部菜单跳转
  573 + changeTab(index){
  574 + var url = index==0?'index_f.html':index == 1?'../strict/strict_f.html':'../my/my_f.html'
  575 + window.location.href = url
397 } 576 }
  577 +
398 } 578 }
399 }) 579 })
400 </script> 580 </script>
@@ -37,12 +37,6 @@ @@ -37,12 +37,6 @@
37 </div> 37 </div>
38 <div class="login_btn" @click="login_main">登录</div> 38 <div class="login_btn" @click="login_main">登录</div>
39 <div class="no_reg">未注册手机验证后自动注册</div> 39 <div class="no_reg">未注册手机验证后自动注册</div>
40 - <!--<div class="fast_login_box"><span class="span_line"></span><span>使用以下账号快速登录</span><span class="span_line"></span>-->  
41 - <!--</div>-->  
42 - <!--<div class="login_type_box">-->  
43 - <!--<span class="iconfont icon-wei_xing" @click="login_wx"></span>-->  
44 - <!--<span class="iconfont icon-QQ" @click="login_qq"></span>-->  
45 - <!--</div>-->  
46 <div class="agree_box"><span :class="['iconfont',isAgree?'icon-yigouxuan':'icon-weigouxuan']" 40 <div class="agree_box"><span :class="['iconfont',isAgree?'icon-yigouxuan':'icon-weigouxuan']"
47 @click="isAgree=!isAgree"></span><span>我同意</span><span 41 @click="isAgree=!isAgree"></span><span>我同意</span><span
48 class="agreement" @click="agree_content">《慈界医养用户服务协议》</span></div> 42 class="agreement" @click="agree_content">《慈界医养用户服务协议》</span></div>
@@ -83,19 +77,19 @@ @@ -83,19 +77,19 @@
83 getCode: function () { 77 getCode: function () {
84 if (!mobileReg.test(app.phone)) { 78 if (!mobileReg.test(app.phone)) {
85 toastMsg('手机号不正确') 79 toastMsg('手机号不正确')
86 -  
87 } 80 }
88 else { 81 else {
89 - const TIME_COUNT = 60; 82 +
  83 + let TIME_COUNT = 60;
90 var post = { 84 var post = {
91 - tel: app.phone, 85 + tel: app.phone
92 }; 86 };
93 var header = { 87 var header = {
94 'XX-Device-Type': getDevice() 88 'XX-Device-Type': getDevice()
95 } 89 }
96 getRequest('POST', 'home/index/loginBySMS', post, header).then(function (res) { 90 getRequest('POST', 'home/index/loginBySMS', post, header).then(function (res) {
97 console.log(res); 91 console.log(res);
98 - toastMsg(res.data.msg); 92 + if(res.data.code ===1){
99 if (!app.timer) { 93 if (!app.timer) {
100 app.count = TIME_COUNT; 94 app.count = TIME_COUNT;
101 app.show = false; 95 app.show = false;
@@ -103,12 +97,14 @@ @@ -103,12 +97,14 @@
103 if (app.count > 0 && app.count <= TIME_COUNT) { 97 if (app.count > 0 && app.count <= TIME_COUNT) {
104 app.count--; 98 app.count--;
105 } else { 99 } else {
106 - app.show = true;  
107 clearInterval(app.timer); 100 clearInterval(app.timer);
108 app.timer = null; 101 app.timer = null;
  102 + app.show = true;
109 } 103 }
110 }, 1000) 104 }, 1000)
111 } 105 }
  106 + }
  107 + toastMsg(res.data.msg);
112 }) 108 })
113 } 109 }
114 }, 110 },
@@ -141,14 +137,9 @@ @@ -141,14 +137,9 @@
141 }; 137 };
142 getRequest('post', 'home/index/checkSMS', post, header).then(function (res) { 138 getRequest('post', 'home/index/checkSMS', post, header).then(function (res) {
143 console.log(res) 139 console.log(res)
144 - // alert(JSON.stringify(res.data.data.token))  
145 if (res.data.code == 1) { 140 if (res.data.code == 1) {
146 $api.setStorage('token', res.data.data.token); 141 $api.setStorage('token', res.data.data.token);
147 -// api.openWin({  
148 -// name: 'index_win',  
149 -// url: '',  
150 -// });  
151 - window.location.href = '../common/index_win.html' 142 + window.location.href = '../index/index_f.html'
152 } else { 143 } else {
153 toastMsg(res.data.msg) 144 toastMsg(res.data.msg)
154 } 145 }
1 -<!doctype html> 1 +<!DOCTYPE html>
2 <html lang="en"> 2 <html lang="en">
3 -<head> 3 +
  4 + <head>
4 <meta charset="UTF-8"> 5 <meta charset="UTF-8">
5 - <meta name="viewport"  
6 - content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">  
7 - <meta http-equiv="X-UA-Compatible" content="ie=edge"> 6 + <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
8 <meta name="format-detection" content="telephone=no,email=no,date=no,address=no"> 7 <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  8 + <title>慈界医养</title>
9 <script src="../../assets/js/fontsize.js"></script> 9 <script src="../../assets/js/fontsize.js"></script>
10 <link rel="stylesheet" href="../../assets/css/weui.min.css"> 10 <link rel="stylesheet" href="../../assets/css/weui.min.css">
11 - <link rel="stylesheet" href="../../assets/css/api.css"/>  
12 - <link rel="stylesheet" href="../../assets/css/my_f.css"/> 11 + <link rel="stylesheet" href="../../assets/css/api.css" />
  12 + <link rel="stylesheet" href="../../assets/css/my_f.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 - <title></title>  
15 -</head>  
16 -<body>  
17 -<div id="loadStart"></div>  
18 -<div id="app" v-cloak> 15 + <style>
  16 + header {
  17 + width: 100%;
  18 + height: auto;
  19 + font-size: 20px;
  20 + /*background-color: #dbb25f;*/
  21 + }
  22 +
  23 + .headers {
  24 + background-color: #dbb25f;
  25 + }
  26 +
  27 + .strict_box {
  28 + display: flex;
  29 + align-items: center;
  30 + justify-content: space-around;
  31 + font-size: 11px;
  32 + color: #565656;
  33 + padding: 0.26rem 0;
  34 + background-color: #fff;
  35 + }
  36 +
  37 + .strict_box .iconfont {
  38 + color: #D8B25F;
  39 + font-size: 15px;
  40 + margin-right: 0.1rem;
  41 + }
  42 +
  43 + .strict_box1 {
  44 + display: flex;
  45 + align-items: center;
  46 + justify-content: space-between;
  47 + font-size: 11px;
  48 + padding: 0.21rem 0.37rem;
  49 + background-color: #fff;
  50 + }
  51 +
  52 + .strict_box1_left {
  53 + padding: 0.14rem 0.3rem;
  54 + box-shadow: 0 0 3px #ccc;
  55 + color: #686868;
  56 + border-radius: 0.16rem;
  57 + }
  58 +
  59 + .strict_box1_right {
  60 + padding: 0.14rem 0.3rem;
  61 + color: #FBA500;
  62 + box-shadow: 0 0 3px rgba(251, 165, 0, 0.5);
  63 + border-radius: 0.16rem;
  64 + }
  65 +
  66 + .progress_box {
  67 + margin: 0.1rem 0.26rem 0 0.26rem;
  68 + background-color: #f5f5f5;
  69 + }
  70 +
  71 + .progress {
  72 + height: 0.08rem;
  73 + background-color: #D8B25F;
  74 + width: 0;
  75 + }
  76 +
  77 + .target_box {
  78 + display: flex;
  79 + align-items: center;
  80 + justify-content: space-between;
  81 + padding: 0.46rem 0;
  82 + box-shadow: 0 -3px 4px 0 #E4E4E4 inset;
  83 + background-color: #fff;
  84 + }
  85 +
  86 + .target_item {
  87 + font-size: 17px;
  88 + color: #060606;
  89 + /*font-weight: 600;*/
  90 + text-align: center;
  91 + flex: 1;
  92 + border-right: 1px solid #d9d9d9;
  93 + padding: 0.2rem 0 0.1rem 0;
  94 + }
  95 +
  96 + .target_item:last-child {
  97 + border: 0;
  98 + }
  99 +
  100 + .target_item_bottom {
  101 + font-size: 12px;
  102 + color: #565656;
  103 + }
  104 +
  105 + .strict_title {
  106 + display: flex;
  107 + align-items: center;
  108 + justify-content: space-between;
  109 + font-size: 17px;
  110 + color: #000;
  111 + padding: 0.35rem 0;
  112 + background-color: #fff;
  113 + }
  114 +
  115 + .strict_title span {
  116 + flex: 1;
  117 + text-align: center;
  118 + }
  119 +
  120 + .strict_title .strict_title_item {
  121 + border-right: 2px solid #D8B25F;
  122 + }
  123 +
  124 + .strict_title .strict_title_item_active {
  125 + color: #D8B25F;
  126 + }
  127 +
  128 + .strict_content_title {
  129 + padding: 0.32rem 0;
  130 + display: flex;
  131 + align-items: center;
  132 + justify-content: center;
  133 + font-size: 12px;
  134 + color: #060606;
  135 + background-color: #fff;
  136 + }
  137 +
  138 + .strict_content_title .quan {
  139 + padding: 0.1rem 0;
  140 + border-bottom: 1px solid #333;
  141 + }
  142 +
  143 + .strict_box_img {
  144 + display: flex;
  145 + align-items: center;
  146 + justify-content: center;
  147 + }
  148 +
  149 + .strict_box_img img {
  150 + width: 100%;
  151 + }
  152 +
  153 + .strict_btn {
  154 + display: flex;
  155 + align-items: center;
  156 + justify-content: space-between;
  157 + background: #fff;
  158 + padding: 0 0 0 0.57rem;
  159 + /*margin: 0.08rem 0 0 0;*/
  160 + position: fixed;
  161 + width: 100%;
  162 + left: 0;
  163 + bottom: 0;
  164 + z-index: 2;
  165 + /*border-top: 1px solid #fff;*/
  166 + }
  167 +
  168 + .strict_btn_price {
  169 + font-size: 18px;
  170 + color: #E87139;
  171 + flex: 1;
  172 + }
  173 +
  174 + .strict_btn_right {
  175 + flex: 1;
  176 + display: flex;
  177 + align-items: center;
  178 + font-size: 10px;
  179 + color: #333;
  180 + }
  181 +
  182 + .goPay {
  183 + padding: 0.28rem 0;
  184 + background-color: #D8B25F;
  185 + font-size: 15px;
  186 + color: #fff;
  187 + flex: 1;
  188 + text-align: center;
  189 + }
  190 +
  191 + .strict_btn_right_item {
  192 + padding: 0 0.32rem;
  193 + display: flex;
  194 + align-items: center;
  195 + flex-direction: column;
  196 + border-left: 1px solid #E4E4E4
  197 + }
  198 +
  199 + .rmb {
  200 + font-size: 13px;
  201 + }
  202 +
  203 + .index_on {
  204 + background-color: #fff;
  205 + border-bottom: 1px solid #f2f2f2;
  206 + }
  207 +
  208 + .index_on .iconfont {
  209 + color: #D8B25F;
  210 + }
  211 + /*flex布局*/
  212 +
  213 + [v-cloak] {
  214 + display: none;
  215 + }
  216 + </style>
  217 + </head>
  218 +
  219 + <body>
  220 + <div id="app" v-cloak>
  221 + <div class="warp" v-cloak>
19 <header class="" id="header"> 222 <header class="" id="header">
20 <div class="my_top"> 223 <div class="my_top">
21 <div class="my_header_boxs" @click="my_detail"> 224 <div class="my_header_boxs" @click="my_detail">
@@ -64,10 +267,39 @@ @@ -64,10 +267,39 @@
64 <span>设置</span> 267 <span>设置</span>
65 </div> 268 </div>
66 </div> 269 </div>
67 -</div>  
68 -</body> 270 + </div>
  271 +
  272 + <footer>
  273 + <div class="footer_item" :class="{footer_item_active:index==0}" @click="changeTab(0)">
  274 + <i class="iconfont icon-yuanjiaojuxingkaobei"></i>
  275 + <span>严选</span>
  276 + </div>
  277 + <div class="footer_item" :class="{footer_item_active:index==1}" @click="changeTab(1)">
  278 + <i class="iconfont icon-xingzhuang"></i>
  279 + <span>投资</span>
  280 + </div>
  281 + <div class="footer_item" :class="{footer_item_active:index==2}" @click="changeTab(2)">
  282 + <i class="iconfont icon-wo"></i>
  283 + <span>我的</span>
  284 + </div>
  285 +
  286 + </footer>
  287 + </div>
  288 + </body>
  289 +
69 </html> 290 </html>
  291 +<script>
  292 + window.onLoad = function() {
  293 + var map = new AMap.Map('container');
  294 + }
  295 + var url = 'https://webapi.amap.com/maps?v=1.4.8&key=ef53760bd959a4df08b7d4587280e642&callback=onLoad';
  296 + var jsapi = document.createElement('script');
  297 + jsapi.charset = 'utf-8';
  298 + jsapi.src = url;
  299 + document.head.appendChild(jsapi);
  300 +</script>
70 <script type="text/javascript" src="../../assets/js/api.js"></script> 301 <script type="text/javascript" src="../../assets/js/api.js"></script>
  302 +<script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script>
71 <script type="text/javascript" src="../../assets/js/weui.min.js"></script> 303 <script type="text/javascript" src="../../assets/js/weui.min.js"></script>
72 <script type="text/javascript" src="../../assets/js/public.js"></script> 304 <script type="text/javascript" src="../../assets/js/public.js"></script>
73 <script type="text/javascript" src="../../assets/js/fastclick.js"></script> 305 <script type="text/javascript" src="../../assets/js/fastclick.js"></script>
@@ -75,12 +307,13 @@ @@ -75,12 +307,13 @@
75 new FastClick(document.body); 307 new FastClick(document.body);
76 </script> 308 </script>
77 <script type="text/javascript" src="../../assets/js/vue.min.js"></script> 309 <script type="text/javascript" src="../../assets/js/vue.min.js"></script>
78 -<script type="text/javascript" src="../../assets/js/axios.min.js"></script>  
79 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script> 310 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
  311 +<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
80 <script> 312 <script>
81 var app = new Vue({ 313 var app = new Vue({
82 - el: '#app', 314 + el: "#app",
83 data: { 315 data: {
  316 + index: 2,
84 isLogin: true, 317 isLogin: true,
85 // user_info: [], 318 // user_info: [],
86 user_type: [1], 319 user_type: [1],
@@ -90,89 +323,73 @@ @@ -90,89 +323,73 @@
90 newList: [], 323 newList: [],
91 type: 0 324 type: 0
92 }, 325 },
93 - created: function () {  
94 - apiready = function () {  
95 - app.type = api.pageParam.type ? api.pageParam.type : 0;  
96 - app.getUserIndexInfo()  
97 - if (getToken()) {  
98 - app.getUserIndexInfo()  
99 - app.getNews();  
100 - }  
101 - api.addEventListener({  
102 - name: 'changeInfo'  
103 - }, function (ret, err) {  
104 - app.getUserIndexInfo();  
105 - });  
106 - api.addEventListener({  
107 - name: 'login'  
108 - }, function (ret, err) {  
109 - app.getUserIndexInfo();  
110 - });  
111 - api.addEventListener({  
112 - name: 'pay_success'  
113 - }, function (ret, err) {  
114 - app.getUserIndexInfo();  
115 - });  
116 - api.addEventListener({  
117 - name: 'add_success'  
118 - }, function (ret, err) {  
119 - app.getUserIndexInfo();  
120 - });  
121 - } 326 + created: function() {
  327 + this.getUserIndexInfo()
  328 + this.getNews();
  329 + },
  330 + mounted: function() {
  331 + window.addEventListener('scroll', this.handleScroll)
122 }, 332 },
123 methods: { 333 methods: {
124 // 个人资料 334 // 个人资料
125 - my_detail: function () {  
126 - if (app.user_type == '') { 335 + my_detail: function() {
  336 + if(app.user_type == '') {
127 toastMsg('未登录') 337 toastMsg('未登录')
128 } else { 338 } else {
129 - openView('my_detail', 'my/my_detail', '个人资料', 'my_detail', false, {rid: 0, type: 0}) 339 + openView('my_detail', 'my/my_detail', '个人资料', 'my_detail', false, {
  340 + rid: 0,
  341 + type: 0
  342 + })
130 } 343 }
131 }, 344 },
132 // 设置 345 // 设置
133 - set: function () { 346 + set: function() {
134 openView('my_set', 'my/my_set', '设置', 'my_set', false, false, false) 347 openView('my_set', 'my/my_set', '设置', 'my_set', false, false, false)
135 }, 348 },
136 // 常见问题 349 // 常见问题
137 - question: function () {  
138 - if (app.user_type == '') { 350 + question: function() {
  351 + if(app.user_type == '') {
139 toastMsg('未登录') 352 toastMsg('未登录')
140 } else { 353 } else {
141 openView('my_que', 'my/my_que', '常见问题', 'my_que', false, false, false) 354 openView('my_que', 'my/my_que', '常见问题', 'my_que', false, false, false)
142 } 355 }
143 }, 356 },
144 // 邀友有赚 357 // 邀友有赚
145 - friend: function () {  
146 - if (app.user_type == '') { 358 + friend: function() {
  359 + if(app.user_type == '') {
147 toastMsg('未登录') 360 toastMsg('未登录')
148 } else { 361 } else {
149 - openView('my_invite', 'my/my_invite', '邀请好友', 'my_invite', false, {invite_type: 0}) 362 + openView('my_invite', 'my/my_invite', '邀请好友', 'my_invite', false, {
  363 + invite_type: 0
  364 + })
150 } 365 }
151 }, 366 },
152 // 我的订单 367 // 我的订单
153 - goPay: function () {  
154 - if (app.user_type == '') { 368 + goPay: function() {
  369 + if(app.user_type == '') {
155 toastMsg('未登录') 370 toastMsg('未登录')
156 } else { 371 } else {
157 openView('my_orderlist', 'my/my_orderlist', '我的订单', 'my_orderlist', false, false, false); 372 openView('my_orderlist', 'my/my_orderlist', '我的订单', 'my_orderlist', false, false, false);
158 } 373 }
159 }, 374 },
160 // 我的消息 375 // 我的消息
161 - my_news: function () {  
162 - if (app.user_type == '') { 376 + my_news: function() {
  377 + if(app.user_type == '') {
163 toastMsg('未登录') 378 toastMsg('未登录')
164 } else { 379 } else {
165 - openView('my_news', 'my/my_news', '消息通知', 'my_news', false, {new_type: 0}) 380 + openView('my_news', 'my/my_news', '消息通知', 'my_news', false, {
  381 + new_type: 0
  382 + })
166 } 383 }
167 }, 384 },
168 // 有无消息判断 385 // 有无消息判断
169 - getNews: function () { 386 + getNews: function() {
170 var header = { 387 var header = {
171 "XX-Device-Type": getDevice(), 388 "XX-Device-Type": getDevice(),
172 'XX-Token': getToken() 389 'XX-Token': getToken()
173 }; 390 };
174 - getRequest('post', 'user/index/getUserMessageList', null, header).then(function (res) {  
175 - if (res.data.code == 1) { 391 + getRequest('post', 'user/index/getUserMessageList', null, header).then(function(res) {
  392 + if(res.data.code == 1) {
176 app.newList = res.data.data.unread; 393 app.newList = res.data.data.unread;
177 } else { 394 } else {
178 toastMsg(res.data.msg) 395 toastMsg(res.data.msg)
@@ -181,32 +398,32 @@ @@ -181,32 +398,32 @@
181 }) 398 })
182 }, 399 },
183 // 我的账号 400 // 我的账号
184 - my_balance: function () {  
185 - if (app.user_type == '') { 401 + my_balance: function() {
  402 + if(app.user_type == '') {
186 toastMsg('未登录') 403 toastMsg('未登录')
187 } else { 404 } else {
188 openView('my_balance', 'my/my_balance', '我的账号', 'my_balance', false, false, false) 405 openView('my_balance', 'my/my_balance', '我的账号', 'my_balance', false, false, false)
189 } 406 }
190 }, 407 },
191 // 我的消费金 408 // 我的消费金
192 - my_consumption: function () {  
193 - if (app.user_type == '') { 409 + my_consumption: function() {
  410 + if(app.user_type == '') {
194 toastMsg('未登录') 411 toastMsg('未登录')
195 } else { 412 } else {
196 openView('my_consumption', 'my/my_consumption', '我的消费金', 'my_consumption', false, false, false) 413 openView('my_consumption', 'my/my_consumption', '我的消费金', 'my_consumption', false, false, false)
197 } 414 }
198 }, 415 },
199 // 我的权益 416 // 我的权益
200 - my_power: function () { 417 + my_power: function() {
201 var header = { 418 var header = {
202 "XX-Device-Type": getDevice(), 419 "XX-Device-Type": getDevice(),
203 'XX-Token': getToken() 420 'XX-Token': getToken()
204 }; 421 };
205 - if (app.user_type == '') { 422 + if(app.user_type == '') {
206 toastMsg('未登录') 423 toastMsg('未登录')
207 } else { 424 } else {
208 - getRequest('post', 'user/index/myRights', null, header).then(function (res) {  
209 - if (res.data.code == 1) { 425 + getRequest('post', 'user/index/myRights', null, header).then(function(res) {
  426 + if(res.data.code == 1) {
210 openView('my_benefit', 'my/my_benefit', '我的权益', 'my_benefit', false, false, false) 427 openView('my_benefit', 'my/my_benefit', '我的权益', 'my_benefit', false, false, false)
211 } else { 428 } else {
212 toastMsg(res.data.msg); 429 toastMsg(res.data.msg);
@@ -215,8 +432,8 @@ @@ -215,8 +432,8 @@
215 } 432 }
216 }, 433 },
217 // 健康档案 434 // 健康档案
218 - go_hearth: function () {  
219 - if (app.user_type == '') { 435 + go_hearth: function() {
  436 + if(app.user_type == '') {
220 toastMsg('未登录') 437 toastMsg('未登录')
221 } else { 438 } else {
222 api.openFrame({ 439 api.openFrame({
@@ -237,20 +454,25 @@ @@ -237,20 +454,25 @@
237 } 454 }
238 }, 455 },
239 // 获取个人信息 456 // 获取个人信息
240 - getUserIndexInfo: function () { 457 + getUserIndexInfo: function() {
241 var header = { 458 var header = {
242 "XX-Device-Type": getDevice(), 459 "XX-Device-Type": getDevice(),
243 'XX-Token': getToken() 460 'XX-Token': getToken()
244 }; 461 };
245 - getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function (res) { 462 + getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function(res) {
246 // alert(JSON.stringify(res)); 463 // alert(JSON.stringify(res));
247 - if (res.data.code == 1) { 464 + if(res.data.code == 1) {
248 app.user_type = res.data.data; 465 app.user_type = res.data.data;
249 - } else {  
250 - } 466 + } else {}
251 loadEnd() 467 loadEnd()
252 }); 468 });
  469 + }, //底部菜单跳转
  470 + changeTab(index){
  471 + var url = index==0?'../index/index_f.html':index == 1?'../strict/strict_f.html':'my_f.html'
  472 + window.location.href = url
253 } 473 }
  474 +
  475 +
254 } 476 }
255 }) 477 })
256 </script> 478 </script>
1 -<!doctype html> 1 +<!DOCTYPE html>
2 <html lang="en"> 2 <html lang="en">
3 <head> 3 <head>
4 <meta charset="UTF-8"> 4 <meta charset="UTF-8">
5 <meta name="viewport" 5 <meta name="viewport"
6 - content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">  
7 - <meta http-equiv="X-UA-Compatible" content="ie=edge"> 6 + content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
8 <meta name="format-detection" content="telephone=no,email=no,date=no,address=no"> 7 <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  8 + <title>慈界医养</title>
9 <script src="../../assets/js/fontsize.js"></script> 9 <script src="../../assets/js/fontsize.js"></script>
  10 + <link rel="stylesheet" href="../../assets/css/weui.min.css">
10 <link rel="stylesheet" href="../../assets/css/api.css"/> 11 <link rel="stylesheet" href="../../assets/css/api.css"/>
  12 + <link rel="stylesheet" href="../../assets/css/swiper-3.4.2.min.css">
  13 + <!--<link rel="stylesheet" href="http://at.alicdn.com/t/font_641470_jg64l6ijsg4lsor.css">-->
  14 + <link rel="stylesheet" href="../../assets/css/my_f.css"/>
11 <link rel="stylesheet" href="../../assets/css/index.css"> 15 <link rel="stylesheet" href="../../assets/css/index.css">
12 <link rel="stylesheet" href="../../assets/icon/iconfont.css"> 16 <link rel="stylesheet" href="../../assets/icon/iconfont.css">
13 - <title></title>  
14 <style> 17 <style>
15 - body {  
16 - /*background-color: #f2f2f2;*/ 18 + header {
  19 + width: 100%;
  20 + height: auto;
  21 + font-size: 20px;
  22 + /*background-color: #dbb25f;*/
  23 + }
  24 +
  25 + .headers {
  26 + background-color: #dbb25f;
17 } 27 }
18 28
19 .strict_box { 29 .strict_box {
@@ -200,11 +210,27 @@ @@ -200,11 +210,27 @@
200 .index_on .iconfont { 210 .index_on .iconfont {
201 color: #D8B25F; 211 color: #D8B25F;
202 } 212 }
  213 + /*flex布局*/
  214 + [v-cloak]{
  215 + display: none;
  216 + }
203 </style> 217 </style>
204 </head> 218 </head>
205 <body> 219 <body>
206 -<div id="loadStart"></div>  
207 <div id="app" v-cloak> 220 <div id="app" v-cloak>
  221 + <div id="container"></div>
  222 + <header :class="index===0?'headers':''">
  223 +
  224 + <div class="index1" v-else-if="index==1">
  225 + <div class="index1_item index_on">
  226 + <!--<div class="index1_item index_on">-->
  227 + <div></div>
  228 + <div class="iconfont icon-fenxiang-tianchong"></div>
  229 + </div>
  230 + </div>
  231 +
  232 + </header>
  233 + <div class="warp" v-cloak>
208 <div class="index1"> 234 <div class="index1">
209 <img :src="banner" alt=""> 235 <img :src="banner" alt="">
210 </div> 236 </div>
@@ -260,61 +286,81 @@ @@ -260,61 +286,81 @@
260 <div class="goPay" @click="go_pay">去认购</div> 286 <div class="goPay" @click="go_pay">去认购</div>
261 </div> 287 </div>
262 </div> 288 </div>
  289 + </div>
  290 +
  291 + <footer>
  292 + <div class="footer_item" :class="{footer_item_active:index==0}" @click="changeTab(0)">
  293 + <i class="iconfont icon-yuanjiaojuxingkaobei"></i>
  294 + <span>严选</span>
  295 + </div>
  296 + <div class="footer_item" :class="{footer_item_active:index==1}" @click="changeTab(1)">
  297 + <i class="iconfont icon-xingzhuang"></i>
  298 + <span>投资</span>
  299 + </div>
  300 + <div class="footer_item" :class="{footer_item_active:index==2}" @click="changeTab(2)">
  301 + <i class="iconfont icon-wo"></i>
  302 + <span>我的</span>
  303 + </div>
  304 +
  305 + </footer>
263 </div> 306 </div>
264 </body> 307 </body>
265 </html> 308 </html>
  309 +<script>
  310 + window.onLoad = function () {
  311 + var map = new AMap.Map('container');
  312 + }
  313 + var url = 'https://webapi.amap.com/maps?v=1.4.8&key=ef53760bd959a4df08b7d4587280e642&callback=onLoad';
  314 + var jsapi = document.createElement('script');
  315 + jsapi.charset = 'utf-8';
  316 + jsapi.src = url;
  317 + document.head.appendChild(jsapi);
  318 +</script>
266 <script type="text/javascript" src="../../assets/js/api.js"></script> 319 <script type="text/javascript" src="../../assets/js/api.js"></script>
  320 +<script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script>
  321 +<script type="text/javascript" src="../../assets/js/weui.min.js"></script>
267 <script type="text/javascript" src="../../assets/js/public.js"></script> 322 <script type="text/javascript" src="../../assets/js/public.js"></script>
268 <script type="text/javascript" src="../../assets/js/fastclick.js"></script> 323 <script type="text/javascript" src="../../assets/js/fastclick.js"></script>
269 <script> 324 <script>
270 new FastClick(document.body); 325 new FastClick(document.body);
271 </script> 326 </script>
272 <script type="text/javascript" src="../../assets/js/vue.min.js"></script> 327 <script type="text/javascript" src="../../assets/js/vue.min.js"></script>
273 -<script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script>  
274 -<script type="text/javascript" src="../../assets/js/axios.min.js"></script>  
275 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script> 328 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
  329 +<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
276 <script> 330 <script>
  331 +
277 var app = new Vue({ 332 var app = new Vue({
278 - el: '#app', 333 + el: "#app",
279 data: { 334 data: {
  335 + index: 1,
280 change_index: '', 336 change_index: '',
281 show_img: true, 337 show_img: true,
282 share_show: false, 338 share_show: false,
283 banner: '', 339 banner: '',
284 - state: 0,//开放状态  
285 - taget: 0,//目标数量  
286 - num: 0,//已认购  
287 - progress: 0,//进度  
288 - money: 0,//认购金额  
289 - introduce: '',//介绍  
290 - scheme: '',//方案 340 + state: 0, //开放状态
  341 + taget: 0, //目标数量
  342 + num: 0, //已认购
  343 + progress: 0, //进度
  344 + money: 0, //认购金额
  345 + introduce: '', //介绍
  346 + scheme: '', //方案
291 wechat: '', 347 wechat: '',
292 top: '0' 348 top: '0'
293 }, 349 },
294 created: function () { 350 created: function () {
295 - apiready = function () {  
296 - app.crowd();  
297 - if (getDevice() == 'iPhone10,3') {  
298 - app.top = '0.35rem'  
299 - }  
300 - api.addEventListener({  
301 - name: 'index1'  
302 - }, function (ret, err) {  
303 - app.img_active = ret.value.img_active;  
304 - api.setFrameAttr({  
305 - name: 'index_f',  
306 -  
307 - });  
308 - });  
309 - } 351 + this.crowd(); //第三栏
  352 + },
  353 + mounted: function() {
  354 + window.addEventListener('scroll', this.handleScroll)
310 }, 355 },
311 methods: { 356 methods: {
  357 + // 我的消息
312 // 去认购 358 // 去认购
313 - go_pay: function () { 359 + go_pay: function() {
314 openView('strict_pay', 'strict/strict_pay', '认购') 360 openView('strict_pay', 'strict/strict_pay', '认购')
315 }, 361 },
316 // 分享 362 // 分享
317 - share: function () { 363 + share: function() {
318 api.openFrame({ 364 api.openFrame({
319 bgColor: 'rgba(0,0,0,0.05)', 365 bgColor: 'rgba(0,0,0,0.05)',
320 name: 'share', 366 name: 'share',
@@ -334,7 +380,7 @@ @@ -334,7 +380,7 @@
334 }); 380 });
335 }, 381 },
336 // 展示微信号 382 // 展示微信号
337 - openCli: function () { 383 + openCli: function() {
338 api.openFrame({ 384 api.openFrame({
339 bgColor: 'rgba(0,0,0,0.05)', 385 bgColor: 'rgba(0,0,0,0.05)',
340 name: 'group', 386 name: 'group',
@@ -357,28 +403,28 @@ @@ -357,28 +403,28 @@
357 }); 403 });
358 }, 404 },
359 // 定位头部 405 // 定位头部
360 - handleScroll: function () { 406 + handleScroll: function() {
361 var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; 407 var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
362 var offsetTop = document.querySelector('#main').offsetTop; 408 var offsetTop = document.querySelector('#main').offsetTop;
363 - if (scrollTop > offsetTop) { 409 + if(scrollTop > offsetTop) {
364 app.share_show = true 410 app.share_show = true
365 } else { 411 } else {
366 app.share_show = false 412 app.share_show = false
367 } 413 }
368 }, 414 },
369 // 移除监听事件 415 // 移除监听事件
370 - destroyed: function () { 416 + destroyed: function() {
371 window.removeEventListener('scroll', this.handleScroll) 417 window.removeEventListener('scroll', this.handleScroll)
372 }, 418 },
373 // 获取详情 419 // 获取详情
374 - crowd: function () { 420 + crowd: function() {
375 var header = { 421 var header = {
376 "XX-Device-Type": getDevice(), 422 "XX-Device-Type": getDevice(),
377 'XX-Token': getToken() 423 'XX-Token': getToken()
378 }; 424 };
379 - getRequest('post', 'portal/Goods/crowd', null, header).then(function (res) { 425 + getRequest('post', 'portal/Goods/crowd', null, header).then(function(res) {
380 // alert(JSON.stringify(res)); 426 // alert(JSON.stringify(res));
381 - if (res.data.code == 1) { 427 + if(res.data.code == 1) {
382 app.banner = res.data.data.banner; 428 app.banner = res.data.data.banner;
383 app.state = res.data.data.state; 429 app.state = res.data.data.state;
384 app.taget = res.data.data.taget; 430 app.taget = res.data.data.taget;
@@ -393,11 +439,11 @@ @@ -393,11 +439,11 @@
393 } 439 }
394 loadEnd(); 440 loadEnd();
395 }) 441 })
396 - }  
397 - },  
398 - mounted: function () {  
399 - // 计算滚动条位置  
400 - window.addEventListener('scroll', this.handleScroll)  
401 }, 442 },
  443 + // 切换底部导航
  444 + changeTab: function (res) {
  445 + //跳转页面
  446 + }
  447 + }
402 }) 448 })
403 </script> 449 </script>