作者 朱振飞

修改登录判断

  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<projectDescription>
  3 + <name>A6079080424317</name>
  4 + <comment></comment>
  5 + <projects>
  6 + </projects>
  7 + <buildSpec>
  8 + <buildCommand>
  9 + <name>com.aptana.editor.php.aptanaPhpBuilder</name>
  10 + <arguments>
  11 + </arguments>
  12 + </buildCommand>
  13 + <buildCommand>
  14 + <name>com.aptana.ide.core.unifiedBuilder</name>
  15 + <arguments>
  16 + </arguments>
  17 + </buildCommand>
  18 + </buildSpec>
  19 + <natures>
  20 + <nature>com.aptana.projects.webnature</nature>
  21 + <nature>com.aptana.editor.php.phpNature</nature>
  22 + </natures>
  23 + <filteredResources>
  24 + <filter>
  25 + <id>1536237167925</id>
  26 + <name></name>
  27 + <type>26</type>
  28 + <matcher>
  29 + <id>org.eclipse.ui.ide.multiFilter</id>
  30 + <arguments>1.0-name-matches-false-false-node_modules</arguments>
  31 + </matcher>
  32 + </filter>
  33 + </filteredResources>
  34 +</projectDescription>
  1 +header {
  2 + width: 100%;
  3 + height: auto;
  4 + font-size: 18px;
  5 + color: #424242;
  6 +}
  7 +
  8 +.index_header {
  9 + line-height: 0.44rem;
  10 + color: #424242;
  11 + display: flex;
  12 + align-items: center;
  13 + justify-content: space-between;
  14 + padding: 0.24rem 0.3rem;
  15 + border-bottom: 1px solid #ececec;
  16 +}
  17 +
  18 +.icon-fanhui {
  19 + color: #dbb25f;
  20 + font-size: 20px;
  21 +}
  22 +
  23 +.win_mid {
  24 + padding-right: 0.5rem;
  25 + color: #424242;
  26 +}
  27 +
  28 +.center {
  29 + line-height: 0.44rem;
  30 + color: #424242;
  31 + text-align: center;
  32 + padding: 0.2rem 0;
  33 + border-bottom: 1px solid #ececec;
  34 +}
@@ -10,8 +10,10 @@ @@ -10,8 +10,10 @@
10 padding: 0.3rem 0.4rem; 10 padding: 0.3rem 0.4rem;
11 font-size: 15px; 11 font-size: 15px;
12 } 12 }
13 -  
14 -.index_left { 13 +.white_bg{
  14 + background-color: #FFF;
  15 +}
  16 +.index_left {
15 display: flex; 17 display: flex;
16 align-items: center; 18 align-items: center;
17 font-size: 14px; 19 font-size: 14px;
@@ -52,22 +52,14 @@ function openView(fmName, fmUrl, winTitle, winName, winUrl, fmParams, winParams) @@ -52,22 +52,14 @@ function openView(fmName, fmUrl, winTitle, winName, winUrl, fmParams, winParams)
52 } 52 }
53 53
54 function closeWindow(winName) { 54 function closeWindow(winName) {
55 - if (winName) {  
56 - api.closeWin({  
57 - name: winName,  
58 - animation: "reveal"  
59 - });  
60 - } else {  
61 - api.closeWin({  
62 - animation: "reveal"  
63 - });  
64 - } 55 + window.location.href = document.referrer;
  56 + window.history.back(-1);
65 } 57 }
66 58
67 function getHeight(id) { 59 function getHeight(id) {
68 return document.getElementById(id).offsetHeight; 60 return document.getElementById(id).offsetHeight;
69 } 61 }
70 - 62 +
71 63
72 function openFm(fmName, url) { 64 function openFm(fmName, url) {
73 var posY = $api.offset($api.dom("header")).h; 65 var posY = $api.offset($api.dom("header")).h;
@@ -359,15 +351,18 @@ function getRequest(type, url, params, header) { @@ -359,15 +351,18 @@ function getRequest(type, url, params, header) {
359 }).then(function (res) { 351 }).then(function (res) {
360 // alert(JSON.stringify(res)) 352 // alert(JSON.stringify(res))
361 if (res.data.code == 502) { 353 if (res.data.code == 502) {
362 - openView('login_index', 'login/login_index', '登录', 'login_index', false, false, false) 354 + setTimeout(() => {
  355 + window.location.href = '/html/login/login_index.html'
  356 + }, 2000);
  357 + // openView('login_index', 'login/login_index', '登录', 'login_index', false, false, false)
363 } else { 358 } else {
364 - resolve(res) 359 + resolve(res)
365 } 360 }
366 loadEnd(); 361 loadEnd();
367 // resolve(res) 362 // resolve(res)
368 - }).catch(function (err) { 363 + }).catch(function (err) {
369 toastMsg('网络错误'); 364 toastMsg('网络错误');
370 - openView('wrong', 'common/wrong', '网络错误', 'wrong', false, false, false); 365 + // openView('wrong', 'common/wrong', '网络错误', 'wrong', false, false, false);
371 // alert(JSON.stringify(err)) 366 // alert(JSON.stringify(err))
372 reject(err) 367 reject(err)
373 }) 368 })
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 <script src="../../assets/js/fontsize.js"></script> 10 <script src="../../assets/js/fontsize.js"></script>
11 <link rel="stylesheet" href="../../assets/css/api.css"/> 11 <link rel="stylesheet" href="../../assets/css/api.css"/>
12 <link rel="stylesheet" href="../../assets/css/index.css"> 12 <link rel="stylesheet" href="../../assets/css/index.css">
  13 + <link rel="stylesheet" href="../../assets/css/common_header.css">
13 <link rel="stylesheet" href="../../assets/icon/iconfont.css"> 14 <link rel="stylesheet" href="../../assets/icon/iconfont.css">
14 <style> 15 <style>
15 body { 16 body {
@@ -29,52 +30,61 @@ @@ -29,52 +30,61 @@
29 <body> 30 <body>
30 <div id="loadStart"></div> 31 <div id="loadStart"></div>
31 <div id="app" v-cloak> 32 <div id="app" v-cloak>
32 - <div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">  
33 - <!--<div class="nurse_text">{{name}}</div>-->  
34 - </div>  
35 - <div class="nurse_title" v-if="cid==3">  
36 - <span class="pro">中医</span>  
37 - <span class="prod">服务</span>  
38 - <span> | 未病先防及既病防变,提高健康水平</span>  
39 - </div>  
40 - <div class="nurse_title" v-else-if="cid==6">  
41 - <span class="pro">母婴</span>  
42 - <span class="prod">服务</span>  
43 - <span> | 专业服务,度过美好而难忘的日子</span>  
44 - </div>  
45 - <div class="nurse_title" v-else>  
46 - <span class="pro">康复</span>  
47 - <span class="prod">服务</span>  
48 - <span> | 把握黄金康复期,提高健康质量</span>  
49 - </div>  
50 - <div class="swiper_list">  
51 - <div class="swiper_item nodata" v-if="goods.length==0">暂无信息</div>  
52 - <div class="swiper_item" v-else @click="openDoc(item.good_id)" v-for="(item,index) in goods">  
53 - <div class="swiper_item_img"><img :src="item.img" alt=""></div>  
54 - <div class="swiper_item_right">  
55 - <div class="swiper_item_title">{{item.post_title}}</div>  
56 - <div class="swiper_item_content">{{item.other_title}}</div>  
57 - <div class="swiper_item_type">  
58 - <div class="swiper_item_type1" v-for="(j,item2_index) in item.tag">  
59 - <div class="icon_img"><img :src="j.url" alt=""></div>  
60 - <span>{{j.text}}</span> 33 + <header id="header">
  34 + <div class="index_header white_bg">
  35 + <div class="close_left" onclick="closeWindow()"><span class="iconfont icon-fanhui"></span></div>
  36 + <div class="win_mid">{{winTitle}}</div>
  37 + <div></div>
  38 + </div>
  39 + </header>
  40 + <div class="warp">
  41 + <div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">
  42 + <!--<div class="nurse_text">{{name}}</div>-->
  43 + </div>
  44 + <div class="nurse_title" v-if="cid==3">
  45 + <span class="pro">中医</span>
  46 + <span class="prod">服务</span>
  47 + <span> | 未病先防及既病防变,提高健康水平</span>
  48 + </div>
  49 + <div class="nurse_title" v-else-if="cid==6">
  50 + <span class="pro">母婴</span>
  51 + <span class="prod">服务</span>
  52 + <span> | 专业服务,度过美好而难忘的日子</span>
  53 + </div>
  54 + <div class="nurse_title" v-else>
  55 + <span class="pro">康复</span>
  56 + <span class="prod">服务</span>
  57 + <span> | 把握黄金康复期,提高健康质量</span>
  58 + </div>
  59 + <div class="swiper_list">
  60 + <div class="swiper_item nodata" v-if="goods.length==0">暂无信息</div>
  61 + <div class="swiper_item" v-else @click="openDoc(item.good_id)" v-for="(item,index) in goods">
  62 + <div class="swiper_item_img"><img :src="item.img" alt=""></div>
  63 + <div class="swiper_item_right">
  64 + <div class="swiper_item_title">{{item.post_title}}</div>
  65 + <div class="swiper_item_content">{{item.other_title}}</div>
  66 + <div class="swiper_item_type">
  67 + <div class="swiper_item_type1" v-for="(j,item2_index) in item.tag">
  68 + <div class="icon_img"><img :src="j.url" alt=""></div>
  69 + <span>{{j.text}}</span>
  70 + </div>
61 </div> 71 </div>
  72 + <div class="swiper_item_money">¥{{item.real_price?item.real_price:0}}</div>
62 </div> 73 </div>
63 - <div class="swiper_item_money">¥{{item.real_price?item.real_price:0}}</div>  
64 </div> 74 </div>
65 </div> 75 </div>
66 - </div>  
67 - <div class="nurse_title"><span class="pro">相关</span><span  
68 - class="prod">服务</span><span> | 更多优质服务推介</span></div>  
69 - <div class="nurse_img_box ">  
70 - <div class="nurse_item bcg" @click="openDoc(item.goods_id)" v-for="(item,index) in related_service">  
71 - <div class="nurse_item_img">  
72 - <img :src="item.img" alt=""> 76 + <div class="nurse_title"><span class="pro">相关</span><span class="prod">服务</span><span> | 更多优质服务推介</span></div>
  77 + <div class="nurse_img_box ">
  78 + <div class="nurse_item bcg" @click="openDoc(item.goods_id)" v-for="(item,index) in related_service">
  79 + <div class="nurse_item_img">
  80 + <img :src="item.img" alt="">
  81 + </div>
  82 + <div class="nurse_item_title bold">{{item.name}}</div>
  83 + <div><span class="nurse_item_price">{{item.price}}</span></div>
73 </div> 84 </div>
74 - <div class="nurse_item_title bold">{{item.name}}</div>  
75 - <div><span class="nurse_item_price">{{item.price}}</span></div>  
76 </div> 85 </div>
77 </div> 86 </div>
  87 +
78 </div> 88 </div>
79 </body> 89 </body>
80 </html> 90 </html>
@@ -96,17 +106,13 @@ @@ -96,17 +106,13 @@
96 name: '', 106 name: '',
97 goods: [], 107 goods: [],
98 related_service: [], 108 related_service: [],
  109 + winTitle:''
99 }, 110 },
100 created: function () { 111 created: function () {
101 - apiready = function () {  
102 - app.cid = api.pageParam.cid;  
103 - app.cityname = api.pageParam.cityname;  
104 - app.getCatInfo2();  
105 - api.setFrameAttr({  
106 - name: 'disease_f',  
107 - bounces: true  
108 - });  
109 - } 112 + this.cid = localStorage.getItem('cid');
  113 + this.cityname = localStorage.getItem('cityName');
  114 + this.winTitle = localStorage.getItem('winTitle');
  115 + this.getCatInfo2();
110 }, 116 },
111 methods: { 117 methods: {
112 openDoc: function (id) { 118 openDoc: function (id) {
@@ -115,14 +121,14 @@ @@ -115,14 +121,14 @@
115 url: './care_w.html', 121 url: './care_w.html',
116 pageParam: { 122 pageParam: {
117 id: id, 123 id: id,
118 - cid: app.cid,  
119 - cityname: app.cityname 124 + cid: this.cid,
  125 + cityname: this.cityname
120 } 126 }
121 }) 127 })
122 }, 128 },
123 getCatInfo2: function () { 129 getCatInfo2: function () {
124 var post = { 130 var post = {
125 - cid: app.cid 131 + cid: this.cid
126 }; 132 };
127 var header = { 133 var header = {
128 "XX-Device-Type": getDevice(), 134 "XX-Device-Type": getDevice(),
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 <script src="../../assets/js/fontsize.js"></script> 10 <script src="../../assets/js/fontsize.js"></script>
11 <link rel="stylesheet" href="../../assets/css/api.css"/> 11 <link rel="stylesheet" href="../../assets/css/api.css"/>
12 <link rel="stylesheet" href="../../assets/css/index.css"> 12 <link rel="stylesheet" href="../../assets/css/index.css">
  13 + <link rel="stylesheet" href="../../assets/css/common_header.css">
13 <link rel="stylesheet" href="../../assets/css/swiper-3.4.2.min.css"> 14 <link rel="stylesheet" href="../../assets/css/swiper-3.4.2.min.css">
14 <link rel="stylesheet" href="../../assets/icon/iconfont.css"> 15 <link rel="stylesheet" href="../../assets/icon/iconfont.css">
15 <style> 16 <style>
@@ -67,52 +68,53 @@ @@ -67,52 +68,53 @@
67 </style> 68 </style>
68 </head> 69 </head>
69 <body> 70 <body>
  71 + <!-- 背景充满 -->
70 <div id="loadStart"></div> 72 <div id="loadStart"></div>
71 <div id="app" class="warp" > 73 <div id="app" class="warp" >
72 - {{JSON.stringify(banner)}}  
73 - <!--<div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">-->  
74 - <!--&lt;!&ndash;<div class="nurse_text">{{name}}</div>&ndash;&gt;-->  
75 - <!--</div>-->  
76 - <!--<div class="examination_box">-->  
77 - <!--<div class="examination_swiper">-->  
78 - <!--<div class="swiper-container">-->  
79 - <!--<div class="swiper-wrapper">-->  
80 - <!--<div class="swiper-slide" v-for="(item,index) in navs">-->  
81 - <!--<span v-text="item" :class="{'examination_active':index==ind}"-->  
82 - <!--@click="changeSwiper(index)"></span>-->  
83 - <!--</div>-->  
84 - <!--</div>-->  
85 - <!--</div>-->  
86 - <!--</div>-->  
87 - <!--<div class="examination_content_swiper">-->  
88 - <!--<div class="swiper-container ">-->  
89 - <!--<div class="swiper-wrapper">-->  
90 - <!--<div class="swiper-slide" v-for="(item,index) in goods">-->  
91 - <!--<div class="swiper_list">-->  
92 - <!--<div class="swiper_item nodata" v-if="item.goods.length==0">暂无信息</div>-->  
93 - <!--<div class="swiper_item" v-else @click="openDoc(i.good_id)"-->  
94 - <!--v-for="(i,iindex) in item.goods">-->  
95 - <!--<div class="swiper_item_img"><img :src="i.img" alt=""></div>-->  
96 - <!--<div class="swiper_item_right">-->  
97 - <!--<div class="swiper_item_title">{{i.post_title}}</div>-->  
98 - <!--<div class="swiper_item_content">{{i.other_title}}</div>-->  
99 - <!--<div class="swiper_item_type">-->  
100 - <!--<div class="swiper_item_type1" v-for="(j,item2_index) in i.tag">-->  
101 - <!--<div class="icon_img"><img :src="j.url" alt=""></div>-->  
102 - <!--<span>{{j.text}}</span>-->  
103 - <!--</div>-->  
104 - <!--</div>-->  
105 - <!--<div class="swiper_item_money"><span>¥{{i.real_price?i.real_price:0}}</span><span-->  
106 - <!--class="old_price">¥{{i.price?i.price:0}}</span>-->  
107 - <!--</div>-->  
108 - <!--</div>-->  
109 - <!--</div>-->  
110 - <!--</div>-->  
111 - <!--</div>-->  
112 - <!--</div>-->  
113 - <!--</div>-->  
114 - <!--</div>-->  
115 - <!--</div>--> 74 + <!-- {{JSON.stringify(banner)}} -->
  75 + <div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">
  76 + <div class="nurse_text">{{name}}</div>
  77 + </div>
  78 + <div class="examination_box">
  79 + <div class="examination_swiper">
  80 + <div class="swiper-container">
  81 + <div class="swiper-wrapper">
  82 + <div class="swiper-slide" v-for="(item,index) in navs">
  83 + <span v-text="item" :class="{'examination_active':index==ind}"
  84 + @click="changeSwiper(index)"></span>
  85 + </div>
  86 + </div>
  87 + </div>
  88 + </div>
  89 + <div class="examination_content_swiper">
  90 + <div class="swiper-container ">
  91 + <div class="swiper-wrapper">
  92 + <div class="swiper-slide" v-for="(item,index) in goods">
  93 + <div class="swiper_list">
  94 + <div class="swiper_item nodata" v-if="item.goods.length==0">暂无信息</div>
  95 + <div class="swiper_item" v-else @click="openDoc(i.good_id)"
  96 + v-for="(i,iindex) in item.goods">
  97 + <div class="swiper_item_img"><img :src="i.img" alt=""></div>
  98 + <div class="swiper_item_right">
  99 + <div class="swiper_item_title">{{i.post_title}}</div>
  100 + <div class="swiper_item_content">{{i.other_title}}</div>
  101 + <div class="swiper_item_type">
  102 + <div class="swiper_item_type1" v-for="(j,item2_index) in i.tag">
  103 + <div class="icon_img"><img :src="j.url" alt=""></div>
  104 + <span>{{j.text}}</span>
  105 + </div>
  106 + </div>
  107 + <div class="swiper_item_money"><span>¥{{i.real_price?i.real_price:0}}</span><span
  108 + class="old_price">¥{{i.price?i.price:0}}</span>
  109 + </div>
  110 + </div>
  111 + </div>
  112 + </div>
  113 + </div>
  114 + </div>
  115 + </div>
  116 + </div>
  117 + </div>
116 </div> 118 </div>
117 </body> 119 </body>
118 </html> 120 </html>
@@ -127,7 +129,6 @@ @@ -127,7 +129,6 @@
127 <script type="text/javascript" src="../../assets/js/axios.min.js"></script> 129 <script type="text/javascript" src="../../assets/js/axios.min.js"></script>
128 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script> 130 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
129 <script> 131 <script>
130 - alert(1);  
131 var app = new Vue({ 132 var app = new Vue({
132 el: '#app', 133 el: '#app',
133 data: { 134 data: {
@@ -147,30 +148,27 @@ @@ -147,30 +148,27 @@
147 goods: [] 148 goods: []
148 }, 149 },
149 created: function () { 150 created: function () {
150 - apiready = function () {  
151 - app.cid = api.pageParam.cid;  
152 - // alert(app.id)  
153 - app.getCatInfo3();  
154 - // //导航轮播  
155 - app.mySwiper = new Swiper('.examination_swiper .swiper-container', {  
156 - slidesPerView: 'auto',  
157 - slideToClickedSlide: true,  
158 - observer: true,  
159 - observeParents: true,  
160 - freeMode: true  
161 - });  
162 - //内容轮播  
163 - app.Swiper1 = new Swiper('.examination_content_swiper .swiper-container', {  
164 - observer: true,  
165 - observeParents: true,  
166 - autoHeight: true,  
167 - onTransitionEnd: function (swiper) {  
168 - app.ind = swiper.activeIndex;  
169 - app.mySwiper.slideTo(swiper.activeIndex, 500)  
170 - // alert(swiper.activeIndex);  
171 - }  
172 - });  
173 - } 151 + this.cid = localStorage.getItem('cid')
  152 + this.getCatInfo3();
  153 + this.mySwiper = new Swiper('.examination_swiper .swiper-container', {
  154 + slidesPerView: 'auto',
  155 + slideToClickedSlide: true,
  156 + observer: true,
  157 + observeParents: true,
  158 + freeMode: true
  159 + });
  160 + //内容轮播
  161 + this.Swiper1 = new Swiper('.examination_content_swiper .swiper-container', {
  162 + observer: true,
  163 + observeParents: true,
  164 + autoHeight: true,
  165 + onTransitionEnd: function (swiper) {
  166 + app.ind = swiper.activeIndex;
  167 + app.mySwiper.slideTo(swiper.activeIndex, 500)
  168 + // alert(swiper.activeIndex);
  169 + }
  170 + });
  171 +
174 }, 172 },
175 methods: { 173 methods: {
176 changeSwiper: function (index) { 174 changeSwiper: function (index) {
@@ -189,7 +187,7 @@ @@ -189,7 +187,7 @@
189 }, 187 },
190 getCatInfo3: function () { 188 getCatInfo3: function () {
191 var post = { 189 var post = {
192 - cid: app.cid 190 + cid: this.cid
193 }; 191 };
194 var header = { 192 var header = {
195 "XX-Device-Type": getDevice(), 193 "XX-Device-Type": getDevice(),
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html lang="en"> 2 <html lang="en">
  3 +
3 <head> 4 <head>
4 - <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"/>  
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>  
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/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"/>  
15 - <link rel="stylesheet" href="../../assets/css/index.css">  
16 - <link rel="stylesheet" href="../../assets/icon/iconfont.css">  
17 - <style>  
18 - header { 5 + <meta charset="UTF-8">
  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">
  8 + <title>慈界医养</title>
  9 + <script src="../../assets/js/fontsize.js"></script>
  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/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" />
  15 + <link rel="stylesheet" href="../../assets/css/index.css">
  16 + <link rel="stylesheet" href="../../assets/icon/iconfont.css">
  17 + <style>
  18 + header {
19 width: 100%; 19 width: 100%;
20 height: auto; 20 height: auto;
21 font-size: 20px; 21 font-size: 20px;
@@ -82,43 +82,44 @@ @@ -82,43 +82,44 @@
82 } 82 }
83 </style> 83 </style>
84 </head> 84 </head>
  85 +
85 <body> 86 <body>
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">  
117 - <div class="index_list" id="top"> 87 + <div id="app" v-cloak>
  88 + <div id="container"></div>
  89 + <header :class="index===0?'headers':''">
  90 + <div class="index_header" v-if="index==0">
  91 + <div class="index_left">
  92 + <div class="index_left_img">
  93 + <div class="iconfont icon-dizhi"></div>
  94 + </div>
  95 + <span @click.stop="goToCity">{{cityname?cityname:'定位中...'}}</span>
  96 + </div>
  97 + <span class="app_name">慈界医养</span>
  98 + <div class="index_right" @click="show_menu">
  99 + <img src="../../assets/image/plus.png" alt="" :class="[img_active?'img_transform':'img_transform1']">
  100 + </div>
  101 + </div>
  102 + <div class="index1" v-else-if="index==1">
  103 + <div class="index1_item index_on">
  104 + <!--<div class="index1_item index_on">-->
  105 + <div></div>
  106 + <div class="iconfont icon-fenxiang-tianchong"></div>
  107 + </div>
  108 + </div>
  109 + <div class="my_top_icon_box" v-else>
  110 + <span class="iconfont icon-xiaoxi" @click="my_news"></span>
  111 + <span class="dot" v-show="newList.length!=0"></span>
  112 + </div>
  113 + <div class="triangle_border_up" v-show="img_active">
  114 + <span></span>
  115 + </div>
  116 + </header>
  117 + <div class="warp">
  118 + <div class="index_list" id="top">
118 <div class="index_item" v-cloak v-for="(item,index) in cat_data" @click="openItem(item.id,item.name)"> 119 <div class="index_item" v-cloak v-for="(item,index) in cat_data" @click="openItem(item.id,item.name)">
119 <div class="index_img"><img :src="item.img?item.img:img_default" alt=""></div> 120 <div class="index_img"><img :src="item.img?item.img:img_default" alt=""></div>
120 <div>{{item.name}}</div> 121 <div>{{item.name}}</div>
121 - </div> 122 + </div>
122 <div class="menus" v-show="img_active"> 123 <div class="menus" v-show="img_active">
123 <div class="menus_item" @click="openOrder"><span class="iconfont icon-dingdan"></span><span>我的订单</span> 124 <div class="menus_item" @click="openOrder"><span class="iconfont icon-dingdan"></span><span>我的订单</span>
124 </div> 125 </div>
@@ -129,82 +130,85 @@ @@ -129,82 +130,85 @@
129 <!--<div class="menus_item" @click="openQrc"><span class="iconfont icon-saoyisao"></span><span>扫一扫</span></div>--> 130 <!--<div class="menus_item" @click="openQrc"><span class="iconfont icon-saoyisao"></span><span>扫一扫</span></div>-->
130 </div> 131 </div>
131 132
132 - <div class="banner_box" @click="openStrict"><img src="../../assets/image/banner.png" alt=""></div>  
133 - <div class="banner_nav_box">  
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" >  
136 - <span class="banner_item_title">{{item.title}}</span>  
137 - <span class="banner_item_content">{{item.describe}}</span>  
138 - </div>  
139 - <div class="banner_item_img">  
140 - <img :src="item.img?item.img:img_default" alt=""> 133 + <div class="banner_box" @click="openStrict"><img src="../../assets/image/banner.png" alt=""></div>
  134 + <div class="banner_nav_box">
  135 + <div class="banner_item" v-cloak @click="care(item.goods_id,item.title)" v-for="(item,index) in index_data">
  136 + <div class="banner_item_left">
  137 + <span class="banner_item_title">{{item.title}}</span>
  138 + <span class="banner_item_content">{{item.describe}}</span>
  139 + </div>
  140 + <div class="banner_item_img">
  141 + <img :src="item.img?item.img:img_default" alt="">
  142 + </div>
141 </div> 143 </div>
142 </div> 144 </div>
143 - </div>  
144 - <div class="swiper_title fixed_top" v-show="top_show">  
145 - <span></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>  
147 - <span class="change_slide">换一批<span class="iconfont icon-xunhuan101"></span></span>  
148 - </div>  
149 - <div class="swiper_box">  
150 - <div class="swiper_title" :class="{fixed_top:top_show}" id="main" v-show="!top_show"> 145 + <div class="swiper_title fixed_top" v-show="top_show">
151 <span></span> 146 <span></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> 147 + <span class="swiper_title_content"> <img src="../../assets/image/part4_03.jpg" alt=""><span>严选推介</span><img src="../../assets/image/part4_05.jpg"
  148 + alt=""></span>
153 <span class="change_slide">换一批<span class="iconfont icon-xunhuan101"></span></span> 149 <span class="change_slide">换一批<span class="iconfont icon-xunhuan101"></span></span>
154 </div> 150 </div>
155 - <div class="swiper-container">  
156 - <div class="swiper-wrapper">  
157 - <div class="swiper-slide" v-for="(item,index) in show_data">  
158 - <div class="swiper_item" @click="care(i.goods_id,i.title)" v-for="(i,item_index) in item">  
159 - <div class="swiper_item_img"><img :src="i.img" alt=""></div>  
160 - <!--&lt;!&ndash;<img src="../../assets/image/logo200.png" alt="">&ndash;&gt;-->  
161 - <div class="swiper_item_right">  
162 - <div class="swiper_item_title">{{i.title}}</div>  
163 - <div class="swiper_item_content">{{i.describe}}</div>  
164 - <div class="swiper_item_type">  
165 - <div class="swiper_item_type1" v-for="(j,item2_index) in i.icon">  
166 - <div class="icon_img"><img :src="j.url" alt=""></div>  
167 - <span>{{j.text}}</span> 151 + <div class="swiper_box">
  152 + <div class="swiper_title" :class="{fixed_top:top_show}" id="main" v-show="!top_show">
  153 + <span></span>
  154 + <span class="swiper_title_content"> <img src="../../assets/image/part4_03.jpg" alt=""><span>严选推介</span><img src="../../assets/image/part4_05.jpg"
  155 + alt=""></span>
  156 + <span class="change_slide">换一批<span class="iconfont icon-xunhuan101"></span></span>
  157 + </div>
  158 + <div class="swiper-container">
  159 + <div class="swiper-wrapper">
  160 + <div class="swiper-slide" v-for="(item,index) in show_data">
  161 + <div class="swiper_item" @click="care(i.goods_id,i.title)" v-for="(i,item_index) in item">
  162 + <div class="swiper_item_img"><img :src="i.img" alt=""></div>
  163 + <!--&lt;!&ndash;<img src="../../assets/image/logo200.png" alt="">&ndash;&gt;-->
  164 + <div class="swiper_item_right">
  165 + <div class="swiper_item_title">{{i.title}}</div>
  166 + <div class="swiper_item_content">{{i.describe}}</div>
  167 + <div class="swiper_item_type">
  168 + <div class="swiper_item_type1" v-for="(j,item2_index) in i.icon">
  169 + <div class="icon_img"><img :src="j.url" alt=""></div>
  170 + <span>{{j.text}}</span>
  171 + </div>
168 </div> 172 </div>
  173 + <div class="swiper_item_money">¥{{i.price}}</div>
169 </div> 174 </div>
170 - <div class="swiper_item_money">¥{{i.price}}</div>  
171 </div> 175 </div>
172 </div> 176 </div>
173 </div> 177 </div>
174 </div> 178 </div>
  179 + <div class="mold_index" v-show="img_active" @touchstart="hideMenu"></div>
175 </div> 180 </div>
176 - <div class="mold_index" v-show="img_active" @touchstart="hideMenu"></div>  
177 </div> 181 </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>  
196 -</div> 182 + </div>
  183 +
  184 + <footer>
  185 + <div class="footer_item" :class="{footer_item_active:index==0}" @click="changeTab(0)">
  186 + <i class="iconfont icon-yuanjiaojuxingkaobei"></i>
  187 + <span>严选</span>
  188 + </div>
  189 + <div class="footer_item" :class="{footer_item_active:index==1}" @click="changeTab(1)">
  190 + <i class="iconfont icon-xingzhuang"></i>
  191 + <span>投资</span>
  192 + </div>
  193 + <div class="footer_item" :class="{footer_item_active:index==2}" @click="changeTab(2)">
  194 + <i class="iconfont icon-wo"></i>
  195 + <span>我的</span>
  196 + </div>
  197 + <div class="mold_index" v-show="img_active" @click="hideMenu"></div>
  198 + </footer>
  199 + </div>
197 </body> 200 </body>
  201 +
198 </html> 202 </html>
199 <script> 203 <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); 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);
208 </script> 212 </script>
209 <script type="text/javascript" src="../../assets/js/api.js"></script> 213 <script type="text/javascript" src="../../assets/js/api.js"></script>
210 <script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script> 214 <script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script>
@@ -212,7 +216,7 @@ @@ -212,7 +216,7 @@
212 <script type="text/javascript" src="../../assets/js/public.js"></script> 216 <script type="text/javascript" src="../../assets/js/public.js"></script>
213 <script type="text/javascript" src="../../assets/js/fastclick.js"></script> 217 <script type="text/javascript" src="../../assets/js/fastclick.js"></script>
214 <script> 218 <script>
215 - new FastClick(document.body); 219 + new FastClick(document.body);
216 </script> 220 </script>
217 <script type="text/javascript" src="../../assets/js/vue.min.js"></script> 221 <script type="text/javascript" src="../../assets/js/vue.min.js"></script>
218 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script> 222 <script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
@@ -230,20 +234,20 @@ @@ -230,20 +234,20 @@
230 autoHeight: false, 234 autoHeight: false,
231 speed: 1500, 235 speed: 1500,
232 }); 236 });
233 - var app = new Vue({  
234 - el: "#app",  
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: [],  
246 - img_active: false, 237 + var app = new Vue({
  238 + el: "#app",
  239 + data: {
  240 + index: 0,
  241 + headerH: '',
  242 + footerH: '',
  243 + getlng: '',
  244 + getlat: '',
  245 + cityindex: '',
  246 + cityname: '',
  247 + img_active: false,
  248 + map: {},
  249 + newList: [],
  250 + img_active: false,
247 mySwiper: {}, 251 mySwiper: {},
248 scroll_top: '', 252 scroll_top: '',
249 top_show: false, 253 top_show: false,
@@ -251,104 +255,108 @@ @@ -251,104 +255,108 @@
251 index_data: [], 255 index_data: [],
252 show_data: [], 256 show_data: [],
253 img_default: '../../assets/image/logo200.png', 257 img_default: '../../assets/image/logo200.png',
254 - cityname: '', 258 + cityname: '天津',
255 rongYunToken: '', 259 rongYunToken: '',
256 - userId: '', 260 + userId: '',
257 user_info: [] 261 user_info: []
258 - },  
259 - created: function () {  
260 - this.cat(); //首页导航 262 + },
  263 + created: function () {
  264 + this.cat(); //首页导航
261 this.indexList(); //第三栏 265 this.indexList(); //第三栏
262 this.show(); //严选推荐 266 this.show(); //严选推荐
263 // 底部轮播图 267 // 底部轮播图
264 - },  
265 - mounted: function() { 268 + },
  269 + mounted: function () {
266 window.addEventListener('scroll', this.handleScroll) 270 window.addEventListener('scroll', this.handleScroll)
267 }, 271 },
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)  
284 - }  
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,  
297 - });  
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('定位中')  
320 - } else {  
321 - api.openWin({  
322 - name: 'city_win',  
323 - url: '../index/city_win.html',  
324 - pageParam: {  
325 - cityname: app.cityname  
326 - }  
327 - });  
328 - }  
329 - },  
330 - // 显示快捷菜单  
331 - show_menu: function () {  
332 - if (app.img_active == false) {  
333 - app.img_active = true  
334 - } else {  
335 - app.img_active = false  
336 - }  
337 - },  
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 - });  
347 - },  
348 -  
349 - //首页的数据  
350 - // 隐藏菜单  
351 - hideMenu: function() { 272 + methods: {
  273 + // 我的消息
  274 + my_news: function () {
  275 + openView('my_news', 'my/my_news', '消息通知', 'my_news', false, {
  276 + new_type: 0
  277 + })
  278 + },
  279 + // 有无消息判断
  280 + getNews: function () {
  281 + var header = {
  282 + "XX-Device-Type": getDevice(),
  283 + 'XX-Token': getToken()
  284 + };
  285 + getRequest('post', 'user/index/getUserMessageList', null, header).then(function (res) {
  286 + if (res.data.code == 1) {
  287 + app.newList = res.data.data.unread;
  288 + } else {
  289 + toastMsg(res.data.msg)
  290 + }
  291 + loadEnd();
  292 + })
  293 + },
  294 + // 定位当前城市
  295 + get_city: function () {
  296 + app.map = new AMap.Map('container', {});
  297 + app.map.plugin('AMap.Geolocation', function () {
  298 + var geolocation = new AMap.Geolocation({
  299 + // 是否使用高精度定位,默认:
  300 + enableHighAccuracy: true,
  301 + // 设置定位超时时间,默认:无穷大
  302 + timeout: 10000,
  303 + });
  304 + geolocation.getCurrentPosition();
  305 + AMap.event.addListener(geolocation, 'complete', onComplete)
  306 + AMap.event.addListener(geolocation, 'error', onError)
  307 +
  308 + function onComplete(data) {
  309 + console.log(JSON.stringify(data))
  310 + app.cityname = data.addressComponent.province
  311 + // data是具体的定位信息
  312 + }
  313 +
  314 + function onError(erro) {
  315 + // 定位出错
  316 + toastMsg('请开启定位功能')
  317 + }
  318 + })
  319 + },
  320 + // 切换底部导航
  321 + changeTab: function (res) {
  322 + //跳转页面
  323 + },
  324 + // 切换当前城市
  325 + goToCity: function () {
  326 + if (app.cityname == '') {
  327 + toastMsg('定位中')
  328 + } else {
  329 + api.openWin({
  330 + name: 'city_win',
  331 + url: '../index/city_win.html',
  332 + pageParam: {
  333 + cityname: app.cityname
  334 + }
  335 + });
  336 + }
  337 + },
  338 + // 显示快捷菜单
  339 + show_menu: function () {
  340 + if (app.img_active == false) {
  341 + app.img_active = true
  342 + } else {
  343 + app.img_active = false
  344 + }
  345 + },
  346 + // 隐藏快捷菜单
  347 + hideMenu: function () {
  348 + app.img_active = !app.img_active;
  349 + api.sendEvent({
  350 + name: 'show_menu',
  351 + extra: {
  352 + img_active: app.img_active
  353 + }
  354 + });
  355 + },
  356 +
  357 + //首页的数据
  358 + // 隐藏菜单
  359 + hideMenu: function () {
352 app.img_active = !app.img_active; 360 app.img_active = !app.img_active;
353 api.sendEvent({ 361 api.sendEvent({
354 name: 'hide_menu', 362 name: 'hide_menu',
@@ -358,22 +366,22 @@ @@ -358,22 +366,22 @@
358 }); 366 });
359 }, 367 },
360 // 严选推荐定位 368 // 严选推荐定位
361 - handleScroll: function() { 369 + handleScroll: function () {
362 var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; 370 var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
363 var offsetTop = document.querySelector('#main').offsetTop; 371 var offsetTop = document.querySelector('#main').offsetTop;
364 - console.log(scrollTop,offsetTop)  
365 - if(scrollTop > offsetTop) { 372 + console.log(scrollTop, offsetTop)
  373 + if (scrollTop > offsetTop) {
366 app.top_show = true 374 app.top_show = true
367 } else { 375 } else {
368 app.top_show = false 376 app.top_show = false
369 } 377 }
370 }, 378 },
371 // 严选推荐定位 379 // 严选推荐定位
372 - destroyed: function() { 380 + destroyed: function () {
373 window.removeEventListener('scroll', this.handleScroll) 381 window.removeEventListener('scroll', this.handleScroll)
374 }, 382 },
375 // 打开投资 383 // 打开投资
376 - openStrict: function() { 384 + openStrict: function () {
377 app.img_active = false; 385 app.img_active = false;
378 386
379 api.setFrameGroupIndex({ 387 api.setFrameGroupIndex({
@@ -382,7 +390,7 @@ @@ -382,7 +390,7 @@
382 }) 390 })
383 }, 391 },
384 // 打开订单 392 // 打开订单
385 - openOrder: function() { 393 + openOrder: function () {
386 app.img_active = false; 394 app.img_active = false;
387 openView('my_orderlist', 'my/my_orderlist', '我的订单', 'my_orderlist', false, false, false); 395 openView('my_orderlist', 'my/my_orderlist', '我的订单', 'my_orderlist', false, false, false);
388 api.sendEvent({ 396 api.sendEvent({
@@ -393,7 +401,7 @@ @@ -393,7 +401,7 @@
393 }); 401 });
394 }, 402 },
395 // 打开健康档案 403 // 打开健康档案
396 - openHealth: function() { 404 + openHealth: function () {
397 app.img_active = false; 405 app.img_active = false;
398 api.openWin({ 406 api.openWin({
399 name: 'my_health_w', 407 name: 'my_health_w',
@@ -410,19 +418,19 @@ @@ -410,19 +418,19 @@
410 }); 418 });
411 }, 419 },
412 // 打开客服 420 // 打开客服
413 - openSever: function() { 421 + openSever: function () {
414 app.img_active = false; 422 app.img_active = false;
415 app.getRongYunToken(); 423 app.getRongYunToken();
416 424
417 }, 425 },
418 // 获取客服token 426 // 获取客服token
419 - getRongYunToken: function() { 427 + getRongYunToken: function () {
420 var header = { 428 var header = {
421 "XX-Device-Type": getDevice(), 429 "XX-Device-Type": getDevice(),
422 'XX-Token': getToken() 430 'XX-Token': getToken()
423 }; 431 };
424 - getRequest('post', 'portal/RongYun/index', null, header).then(function(res) {  
425 - if(res.data.code == 1) { 432 + getRequest('post', 'portal/RongYun/index', null, header).then(function (res) {
  433 + if (res.data.code == 1) {
426 app.rongYunToken = res.data.data.token; 434 app.rongYunToken = res.data.data.token;
427 app.userId = res.data.data.userId; 435 app.userId = res.data.data.userId;
428 // app.rongyunInit(); 436 // app.rongyunInit();
@@ -430,7 +438,7 @@ @@ -430,7 +438,7 @@
430 }) 438 })
431 }, 439 },
432 // 轮播图跳转详情 440 // 轮播图跳转详情
433 - care: function(id, care_name) { 441 + care: function (id, care_name) {
434 api.openWin({ 442 api.openWin({
435 name: 'care_w', 443 name: 'care_w',
436 url: './care_w.html', 444 url: './care_w.html',
@@ -440,141 +448,137 @@ @@ -440,141 +448,137 @@
440 } 448 }
441 }) 449 })
442 }, 450 },
443 - getUserIndexInfo: function() { 451 + getUserIndexInfo: function () {
444 var header = { 452 var header = {
445 "XX-Device-Type": getDevice(), 453 "XX-Device-Type": getDevice(),
446 'XX-Token': getToken() 454 'XX-Token': getToken()
447 }; 455 };
448 - getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function(res) { 456 + getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function (res) {
449 // alert(JSON.stringify(res)) 457 // alert(JSON.stringify(res))
450 - if(res.data.code == 1) { 458 + if (res.data.code == 1) {
451 app.user_info = res.data.data; 459 app.user_info = res.data.data;
452 } else {} 460 } else {}
453 }) 461 })
454 }, 462 },
455 // 获取分类图标 463 // 获取分类图标
456 - cat: function() {  
457 - getRequest('post', 'portal/index/cat', null, null).then(function(res) {  
458 - if(res.data.code == 1) { 464 + cat: function () {
  465 + getRequest('post', 'portal/index/cat', null, null).then(function (res) {
  466 + if (res.data.code == 1) {
459 app.cat_data = res.data.data; 467 app.cat_data = res.data.data;
460 // loadEnd(); 468 // loadEnd();
461 } else {} 469 } else {}
462 }) 470 })
463 }, 471 },
464 // 跳转分类列表 472 // 跳转分类列表
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) { 473 + openItem: function (id, name) {
  474 + switch (id) {
468 case 1: 475 case 1:
469 url = 'nursing_f' 476 url = 'nursing_f'
470 - openView('nursing_f', 'index/nursing_f', name, 'nursing_f', false, {  
471 - cid: id,  
472 - cityname: app.cityname  
473 - }); 477 + // openView('nursing_f', 'index/nursing_f', name, 'nursing_f', false, {
  478 + // cid: id,
  479 + // cityname: app.cityname
  480 + // });
474 break; 481 break;
475 case 2: 482 case 2:
476 url = 'disease_f' 483 url = 'disease_f'
477 - openView('disease_f', 'index/disease_f', name, 'disease_f', false, {  
478 - cid: id,  
479 - cityname: app.cityname  
480 - }); 484 + // openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
  485 + // cid: id,
  486 + // cityname: app.cityname
  487 + // });
481 break; 488 break;
482 case 3: 489 case 3:
483 url = 'disease_f' 490 url = 'disease_f'
484 - openView('disease_f', 'index/disease_f', name, 'disease_f', false, {  
485 - cid: id,  
486 - cityname: app.cityname  
487 - }); 491 + // openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
  492 + // cid: id,
  493 + // cityname: app.cityname
  494 + // });
488 break; 495 break;
489 case 4: 496 case 4:
490 url = 'examination_f' 497 url = 'examination_f'
491 - openView('examination_f', 'index/examination_f', name, 'examination_f', false, {  
492 - cid: id,  
493 - cityname: app.cityname  
494 - }); 498 + // openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
  499 + // cid: id,
  500 + // cityname: app.cityname
  501 + // });
495 break; 502 break;
496 case 5: 503 case 5:
497 url = 'doc_home_w' 504 url = 'doc_home_w'
498 - api.openWin({  
499 - name: 'doc_home_w',  
500 - url: './doc_home_w.html',  
501 - pageParam: {  
502 - cid: id,  
503 - cityname: app.cityname  
504 - }  
505 - });  
506 break; 505 break;
507 case 6: 506 case 6:
508 url = 'disease_f' 507 url = 'disease_f'
509 - openView('disease_f', 'index/disease_f', name, 'disease_f', false, {  
510 - cid: id,  
511 - cityname: app.cityname  
512 - }); 508 + // openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
  509 + // cid: id,
  510 + // cityname: app.cityname
  511 + // });
513 break; 512 break;
514 case 7: 513 case 7:
515 url = 'examination_f' 514 url = 'examination_f'
516 - openView('examination_f', 'index/examination_f', name, 'examination_f', false, {  
517 - cid: id,  
518 - cityname: app.cityname  
519 - }); 515 + // openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
  516 + // cid: id,
  517 + // cityname: app.cityname
  518 + // });
520 break; 519 break;
521 case 8: 520 case 8:
522 url = 'examination_f' 521 url = 'examination_f'
523 - openView('examination_f', 'index/examination_f', name, 'examination_f', false, {  
524 - cid: id,  
525 - cityname: app.cityname  
526 - }); 522 + // openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
  523 + // cid: id,
  524 + // cityname: app.cityname
  525 + // });
527 break; 526 break;
528 case 9: 527 case 9:
529 url = 'examination_f' 528 url = 'examination_f'
530 - api.openWin({  
531 - name: 'Insurance_w',  
532 - url: './Insurance_w.html',  
533 - pageParam: {  
534 - cid: id,  
535 - cityname: app.cityname  
536 - }  
537 - }); 529 + // api.openWin({
  530 + // name: 'Insurance_w',
  531 + // url: './Insurance_w.html',
  532 + // pageParam: {
  533 + // cid: id,
  534 + // cityname: app.cityname
  535 + // }
  536 + // });
538 break; 537 break;
539 case 10: 538 case 10:
540 - api.openWin({  
541 - name: 'tral_w',  
542 - url: './tral_w.html',  
543 - pageParam: {  
544 - cid: id,  
545 - cityname: app.cityname  
546 - }  
547 - }); 539 + url = 'tral_w'
  540 + // api.openWin({
  541 + // name: 'tral_w',
  542 + // url: './tral_w.html',
  543 + // pageParam: {
  544 + // cid: id,
  545 + // cityname: app.cityname
  546 + // }
  547 + // });
548 break; 548 break;
549 // default: 549 // default:
550 // openView('nursing_f', 'index/nursing_f', name, 'nursing_f', false, {cid: id}); 550 // openView('nursing_f', 'index/nursing_f', name, 'nursing_f', false, {cid: id});
551 // return; 551 // return;
552 } 552 }
  553 + localStorage.setItem('cid', id)
  554 + localStorage.setItem('cityName', app.cityname)
  555 + localStorage.setItem('winTitle', name)
  556 + window.location.href = url + '.html'
553 }, 557 },
554 // 获取第三栏列表 558 // 获取第三栏列表
555 - indexList: function() {  
556 - getRequest('post', 'portal/index/index', null, null).then(function(res) {  
557 - if(res.data.code == 1) { 559 + indexList: function () {
  560 + getRequest('post', 'portal/index/index', null, null).then(function (res) {
  561 + if (res.data.code == 1) {
558 app.index_data = res.data.data; 562 app.index_data = res.data.data;
559 } else {} 563 } else {}
560 - 564 +
561 }) 565 })
562 }, 566 },
563 // 获取严选推荐列表 567 // 获取严选推荐列表
564 - show: function() {  
565 - getRequest('POST', 'portal/index/show', null, null).then(function(res) { 568 + show: function () {
  569 + getRequest('POST', 'portal/index/show', null, null).then(function (res) {
566 // alert(JSON.stringify(res)); 570 // alert(JSON.stringify(res));
567 - if(res.data.code == 1) { 571 + if (res.data.code == 1) {
568 app.show_data = res.data.data 572 app.show_data = res.data.data
569 } else {} 573 } else {}
570 }) 574 })
571 }, 575 },
572 //底部菜单跳转 576 //底部菜单跳转
573 - changeTab(index){  
574 - var url = index==0?'index_f.html':index == 1?'../strict/strict_f.html':'../my/my_f.html' 577 + changeTab(index) {
  578 + var url = index == 0 ? 'index_f.html' : index == 1 ? '../strict/strict_f.html' : '../my/my_f.html'
575 window.location.href = url 579 window.location.href = url
576 } 580 }
577 581
578 - }  
579 - }) 582 + }
  583 + })
580 </script> 584 </script>
1 <!doctype html> 1 <!doctype html>
2 <html lang="en"> 2 <html lang="en">
  3 +
3 <head> 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"> 6 + <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-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/api.css"/> 10 + <link rel="stylesheet" href="../../assets/css/api.css" />
11 <link rel="stylesheet" href="../../assets/css/index.css"> 11 <link rel="stylesheet" href="../../assets/css/index.css">
  12 + <link rel="stylesheet" href="../../assets/css/common_header.css">
12 <link rel="stylesheet" href="../../assets/icon/iconfont.css"> 13 <link rel="stylesheet" href="../../assets/icon/iconfont.css">
13 - <style>  
14 - body {  
15 - /*background-color: #efefef;*/  
16 - }  
17 - </style> 14 +
18 </head> 15 </head>
  16 +
19 <body> 17 <body>
20 -<div id="loadStart"></div>  
21 -<div id="app" v-cloak>  
22 - <div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">  
23 - <!--<div class="nurse_text">{{name}}</div>-->  
24 - </div>  
25 - <div class="nurse_title"><span class="pro">专业</span><span class="prod">护理</span><span>| 优质上门护理服务推荐</span></div>  
26 - <div class="nurse_img_box">  
27 - <div class="nurse_item" v-for="(item,index) in introduce" @click="care(item.goods_id)">  
28 - <!--<div class="nurse_item_title">{{item.name}}</div>-->  
29 - <!--<div><span class="nurse_item_price">{{item.price}}</span>元起</div>-->  
30 - <div class="nurse_item_img">  
31 - <img :src="item.img" alt=""> 18 + <div id="loadStart"></div>
  19 +
  20 + <div id="app" v-cloak>
  21 + <header id="header">
  22 + <div class="index_header white_bg" >
  23 + <div class="close_left" onclick="closeWindow()"><span class="iconfont icon-fanhui"></span></div>
  24 + <div class="win_mid">{{winTitle}}</div>
  25 + <div></div>
32 </div> 26 </div>
33 - </div>  
34 - </div>  
35 - <div class="business_box">  
36 - <div class="business_item" v-for="(item,index) in goods" @click="care(item.good_id)">  
37 - <div class="business_item_img"><img :src="item.icon" alt=""/></div>  
38 - <div class="business_item_right">  
39 - <div class="business_item_title clamp1">{{item.post_title}}</div>  
40 - <div class="business_content clamp1">{{item.other_title}}</div> 27 + </header>
  28 + <div class="warp">
  29 + <div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">
  30 + <!--<div class="nurse_text">{{name}}</div>-->
41 </div> 31 </div>
42 - </div>  
43 - </div>  
44 - <div class="nurse_title"><span class="pro">相关</span><span class="prod">服务</span><span>| 更多优质服务推介</span></div>  
45 - <div class="nurse_img_box">  
46 - <div class="nurse_item bcg" v-for='(item,index) in careList' @click="care(item.goods_id)">  
47 - <div class="nurse_item_img">  
48 - <img :src="item.img" alt=""> 32 + <div class="nurse_title"><span class="pro">专业</span><span class="prod">护理</span><span>| 优质上门护理服务推荐</span></div>
  33 + <div class="nurse_img_box">
  34 + <div class="nurse_item" v-for="(item,index) in introduce" @click="care(item.goods_id)">
  35 + <!--<div class="nurse_item_title">{{item.name}}</div>-->
  36 + <!--<div><span class="nurse_item_price">{{item.price}}</span>元起</div>-->
  37 + <div class="nurse_item_img">
  38 + <img :src="item.img" alt="">
  39 + </div>
  40 + </div>
  41 + </div>
  42 + <div class="business_box">
  43 + <div class="business_item" v-for="(item,index) in goods" @click="care(item.good_id)">
  44 + <div class="business_item_img"><img :src="item.icon" alt="" /></div>
  45 + <div class="business_item_right">
  46 + <div class="business_item_title clamp1">{{item.post_title}}</div>
  47 + <div class="business_content clamp1">{{item.other_title}}</div>
  48 + </div>
  49 + </div>
  50 + </div>
  51 + <div class="nurse_title"><span class="pro">相关</span><span class="prod">服务</span><span>| 更多优质服务推介</span></div>
  52 + <div class="nurse_img_box">
  53 + <div class="nurse_item bcg" v-for='(item,index) in careList' @click="care(item.goods_id)">
  54 + <div class="nurse_item_img">
  55 + <img :src="item.img" alt="">
  56 + </div>
  57 + <div class="nurse_item_title bold">{{item.name}}</div>
  58 + <div><span class="nurse_item_price">{{item.price}}</span>元起</div>
  59 + </div>
49 </div> 60 </div>
50 - <div class="nurse_item_title bold">{{item.name}}</div>  
51 - <div><span class="nurse_item_price">{{item.price}}</span>元起</div>  
52 </div> 61 </div>
53 </div> 62 </div>
54 -</div>  
55 </body> 63 </body>
  64 +
56 </html> 65 </html>
57 <script type="text/javascript" src="../../assets/js/api.js"></script> 66 <script type="text/javascript" src="../../assets/js/api.js"></script>
58 <script type="text/javascript" src="../../assets/js/public.js"></script> 67 <script type="text/javascript" src="../../assets/js/public.js"></script>
@@ -73,19 +82,14 @@ @@ -73,19 +82,14 @@
73 careList: [], 82 careList: [],
74 goods: [], 83 goods: [],
75 introduce: [], 84 introduce: [],
76 - cityname: '' 85 + cityname: '',
  86 + winTitle: ''
77 }, 87 },
78 created: function () { 88 created: function () {
79 - apiready = function () {  
80 - app.cid = api.pageParam.cid;  
81 - app.cityname = api.pageParam.cityname;  
82 - app.getCatInfo();  
83 - // alert(app.id)  
84 - api.setFrameAttr({  
85 - name: 'nursing_f',  
86 - bounces: true  
87 - });  
88 - } 89 + this.cid = localStorage.getItem('cid');
  90 + this.cityname = localStorage.getItem('cityName');
  91 + this.winTitle = localStorage.getItem('winTitle')
  92 + this.getCatInfo();
89 }, 93 },
90 methods: { 94 methods: {
91 care: function (id) { 95 care: function (id) {
@@ -101,7 +105,7 @@ @@ -101,7 +105,7 @@
101 // 获取分类信息 105 // 获取分类信息
102 getCatInfo: function () { 106 getCatInfo: function () {
103 var post = { 107 var post = {
104 - cid: app.cid 108 + cid: this.cid
105 }; 109 };
106 var header = { 110 var header = {
107 'XX-Device-Type': getDevice(), 111 'XX-Device-Type': getDevice(),
@@ -469,6 +469,7 @@ @@ -469,6 +469,7 @@
469 }, //底部菜单跳转 469 }, //底部菜单跳转
470 changeTab(index){ 470 changeTab(index){
471 var url = index==0?'../index/index_f.html':index == 1?'../strict/strict_f.html':'my_f.html' 471 var url = index==0?'../index/index_f.html':index == 1?'../strict/strict_f.html':'my_f.html'
  472 + console.log(url)
472 window.location.href = url 473 window.location.href = url
473 } 474 }
474 475