作者 朱振飞

修改登录判断

  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,7 +10,9 @@ @@ -10,7 +10,9 @@
10 padding: 0.3rem 0.4rem; 10 padding: 0.3rem 0.4rem;
11 font-size: 15px; 11 font-size: 15px;
12 } 12 }
13 - 13 +.white_bg{
  14 + background-color: #FFF;
  15 +}
14 .index_left { 16 .index_left {
15 display: flex; 17 display: flex;
16 align-items: center; 18 align-items: center;
@@ -52,16 +52,8 @@ function openView(fmName, fmUrl, winTitle, winName, winUrl, fmParams, winParams) @@ -52,16 +52,8 @@ 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) {
@@ -359,7 +351,10 @@ function getRequest(type, url, params, header) { @@ -359,7 +351,10 @@ 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 }
@@ -367,7 +362,7 @@ function getRequest(type, url, params, header) { @@ -367,7 +362,7 @@ function getRequest(type, url, params, header) {
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,6 +30,14 @@ @@ -29,6 +30,14 @@
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>
  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">
32 <div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}"> 41 <div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">
33 <!--<div class="nurse_text">{{name}}</div>--> 42 <!--<div class="nurse_text">{{name}}</div>-->
34 </div> 43 </div>
@@ -64,8 +73,7 @@ @@ -64,8 +73,7 @@
64 </div> 73 </div>
65 </div> 74 </div>
66 </div> 75 </div>
67 - <div class="nurse_title"><span class="pro">相关</span><span  
68 - class="prod">服务</span><span> | 更多优质服务推介</span></div> 76 + <div class="nurse_title"><span class="pro">相关</span><span class="prod">服务</span><span> | 更多优质服务推介</span></div>
69 <div class="nurse_img_box "> 77 <div class="nurse_img_box ">
70 <div class="nurse_item bcg" @click="openDoc(item.goods_id)" v-for="(item,index) in related_service"> 78 <div class="nurse_item bcg" @click="openDoc(item.goods_id)" v-for="(item,index) in related_service">
71 <div class="nurse_item_img"> 79 <div class="nurse_item_img">
@@ -75,6 +83,8 @@ @@ -75,6 +83,8 @@
75 <div><span class="nurse_item_price">{{item.price}}</span></div> 83 <div><span class="nurse_item_price">{{item.price}}</span></div>
76 </div> 84 </div>
77 </div> 85 </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,12 +148,9 @@ @@ -147,12 +148,9 @@
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', { 151 + this.cid = localStorage.getItem('cid')
  152 + this.getCatInfo3();
  153 + this.mySwiper = new Swiper('.examination_swiper .swiper-container', {
156 slidesPerView: 'auto', 154 slidesPerView: 'auto',
157 slideToClickedSlide: true, 155 slideToClickedSlide: true,
158 observer: true, 156 observer: true,
@@ -160,7 +158,7 @@ @@ -160,7 +158,7 @@
160 freeMode: true 158 freeMode: true
161 }); 159 });
162 //内容轮播 160 //内容轮播
163 - app.Swiper1 = new Swiper('.examination_content_swiper .swiper-container', { 161 + this.Swiper1 = new Swiper('.examination_content_swiper .swiper-container', {
164 observer: true, 162 observer: true,
165 observeParents: true, 163 observeParents: true,
166 autoHeight: true, 164 autoHeight: true,
@@ -170,7 +168,7 @@ @@ -170,7 +168,7 @@
170 // alert(swiper.activeIndex); 168 // alert(swiper.activeIndex);
171 } 169 }
172 }); 170 });
173 - } 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 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"/> 11 + <link rel="stylesheet" href="../../assets/css/api.css" />
12 <link rel="stylesheet" href="../../assets/css/swiper-3.4.2.min.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">--> 13 <!--<link rel="stylesheet" href="http://at.alicdn.com/t/font_641470_jg64l6ijsg4lsor.css">-->
14 - <link rel="stylesheet" href="../../assets/css/my_f.css"/> 14 + <link rel="stylesheet" href="../../assets/css/my_f.css" />
15 <link rel="stylesheet" href="../../assets/css/index.css"> 15 <link rel="stylesheet" href="../../assets/css/index.css">
16 <link rel="stylesheet" href="../../assets/icon/iconfont.css"> 16 <link rel="stylesheet" href="../../assets/icon/iconfont.css">
17 <style> 17 <style>
@@ -82,12 +82,13 @@ @@ -82,12 +82,13 @@
82 } 82 }
83 </style> 83 </style>
84 </head> 84 </head>
  85 +
85 <body> 86 <body>
86 -<div id="app" v-cloak> 87 + <div id="app" v-cloak>
87 <div id="container"></div> 88 <div id="container"></div>
88 <header :class="index===0?'headers':''"> 89 <header :class="index===0?'headers':''">
89 <div class="index_header" v-if="index==0"> 90 <div class="index_header" v-if="index==0">
90 - <div class="index_left" > 91 + <div class="index_left">
91 <div class="index_left_img"> 92 <div class="index_left_img">
92 <div class="iconfont icon-dizhi"></div> 93 <div class="iconfont icon-dizhi"></div>
93 </div> 94 </div>
@@ -132,7 +133,7 @@ @@ -132,7 +133,7 @@
132 <div class="banner_box" @click="openStrict"><img src="../../assets/image/banner.png" alt=""></div> 133 <div class="banner_box" @click="openStrict"><img src="../../assets/image/banner.png" alt=""></div>
133 <div class="banner_nav_box"> 134 <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" v-cloak @click="care(item.goods_id,item.title)" v-for="(item,index) in index_data">
135 - <div class="banner_item_left" > 136 + <div class="banner_item_left">
136 <span class="banner_item_title">{{item.title}}</span> 137 <span class="banner_item_title">{{item.title}}</span>
137 <span class="banner_item_content">{{item.describe}}</span> 138 <span class="banner_item_content">{{item.describe}}</span>
138 </div> 139 </div>
@@ -143,13 +144,15 @@ @@ -143,13 +144,15 @@
143 </div> 144 </div>
144 <div class="swiper_title fixed_top" v-show="top_show"> 145 <div class="swiper_title fixed_top" v-show="top_show">
145 <span></span> 146 <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="swiper_title_content"> <img src="../../assets/image/part4_03.jpg" alt=""><span>严选推介</span><img src="../../assets/image/part4_05.jpg"
  148 + alt=""></span>
147 <span class="change_slide">换一批<span class="iconfont icon-xunhuan101"></span></span> 149 <span class="change_slide">换一批<span class="iconfont icon-xunhuan101"></span></span>
148 </div> 150 </div>
149 <div class="swiper_box"> 151 <div class="swiper_box">
150 <div class="swiper_title" :class="{fixed_top:top_show}" id="main" v-show="!top_show"> 152 <div class="swiper_title" :class="{fixed_top:top_show}" id="main" v-show="!top_show">
151 <span></span> 153 <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> 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>
153 <span class="change_slide">换一批<span class="iconfont icon-xunhuan101"></span></span> 156 <span class="change_slide">换一批<span class="iconfont icon-xunhuan101"></span></span>
154 </div> 157 </div>
155 <div class="swiper-container"> 158 <div class="swiper-container">
@@ -193,8 +196,9 @@ @@ -193,8 +196,9 @@
193 </div> 196 </div>
194 <div class="mold_index" v-show="img_active" @click="hideMenu"></div> 197 <div class="mold_index" v-show="img_active" @click="hideMenu"></div>
195 </footer> 198 </footer>
196 -</div> 199 + </div>
197 </body> 200 </body>
  201 +
198 </html> 202 </html>
199 <script> 203 <script>
200 window.onLoad = function () { 204 window.onLoad = function () {
@@ -251,7 +255,7 @@ @@ -251,7 +255,7 @@
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: []
@@ -262,13 +266,15 @@ @@ -262,13 +266,15 @@
262 this.show(); //严选推荐 266 this.show(); //严选推荐
263 // 底部轮播图 267 // 底部轮播图
264 }, 268 },
265 - mounted: function() { 269 + mounted: function () {
266 window.addEventListener('scroll', this.handleScroll) 270 window.addEventListener('scroll', this.handleScroll)
267 }, 271 },
268 methods: { 272 methods: {
269 // 我的消息 273 // 我的消息
270 my_news: function () { 274 my_news: function () {
271 - openView('my_news', 'my/my_news', '消息通知', 'my_news', false, {new_type: 0}) 275 + openView('my_news', 'my/my_news', '消息通知', 'my_news', false, {
  276 + new_type: 0
  277 + })
272 }, 278 },
273 // 有无消息判断 279 // 有无消息判断
274 getNews: function () { 280 getNews: function () {
@@ -298,11 +304,13 @@ @@ -298,11 +304,13 @@
298 geolocation.getCurrentPosition(); 304 geolocation.getCurrentPosition();
299 AMap.event.addListener(geolocation, 'complete', onComplete) 305 AMap.event.addListener(geolocation, 'complete', onComplete)
300 AMap.event.addListener(geolocation, 'error', onError) 306 AMap.event.addListener(geolocation, 'error', onError)
  307 +
301 function onComplete(data) { 308 function onComplete(data) {
302 console.log(JSON.stringify(data)) 309 console.log(JSON.stringify(data))
303 app.cityname = data.addressComponent.province 310 app.cityname = data.addressComponent.province
304 // data是具体的定位信息 311 // data是具体的定位信息
305 } 312 }
  313 +
306 function onError(erro) { 314 function onError(erro) {
307 // 定位出错 315 // 定位出错
308 toastMsg('请开启定位功能') 316 toastMsg('请开启定位功能')
@@ -348,7 +356,7 @@ @@ -348,7 +356,7 @@
348 356
349 //首页的数据 357 //首页的数据
350 // 隐藏菜单 358 // 隐藏菜单
351 - hideMenu: function() { 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,138 +448,134 @@ @@ -440,138 +448,134 @@
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
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> 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>
  26 + </div>
  27 + </header>
  28 + <div class="warp">
22 <div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}"> 29 <div class="nurse_banner" :style="{backgroundImage:'url(' + banner + ')'}">
23 <!--<div class="nurse_text">{{name}}</div>--> 30 <!--<div class="nurse_text">{{name}}</div>-->
24 </div> 31 </div>
@@ -34,7 +41,7 @@ @@ -34,7 +41,7 @@
34 </div> 41 </div>
35 <div class="business_box"> 42 <div class="business_box">
36 <div class="business_item" v-for="(item,index) in goods" @click="care(item.good_id)"> 43 <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> 44 + <div class="business_item_img"><img :src="item.icon" alt="" /></div>
38 <div class="business_item_right"> 45 <div class="business_item_right">
39 <div class="business_item_title clamp1">{{item.post_title}}</div> 46 <div class="business_item_title clamp1">{{item.post_title}}</div>
40 <div class="business_content clamp1">{{item.other_title}}</div> 47 <div class="business_content clamp1">{{item.other_title}}</div>
@@ -51,8 +58,10 @@ @@ -51,8 +58,10 @@
51 <div><span class="nurse_item_price">{{item.price}}</span>元起</div> 58 <div><span class="nurse_item_price">{{item.price}}</span>元起</div>
52 </div> 59 </div>
53 </div> 60 </div>
54 -</div> 61 + </div>
  62 + </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