正在显示
11 个修改的文件
包含
201 行增加
和
216 行删除
@@ -301,7 +301,6 @@ footer { | @@ -301,7 +301,6 @@ footer { | ||
301 | align-items: center; | 301 | align-items: center; |
302 | justify-content: center; | 302 | justify-content: center; |
303 | margin-right: 0.22rem; | 303 | margin-right: 0.22rem; |
304 | - overflow: hidden; | ||
305 | border-radius: 0.1rem; | 304 | border-radius: 0.1rem; |
306 | float: left; | 305 | float: left; |
307 | padding: 0.28rem 0 0 0; | 306 | padding: 0.28rem 0 0 0; |
@@ -135,8 +135,8 @@ function fixIos7Bar(t) { | @@ -135,8 +135,8 @@ function fixIos7Bar(t) { | ||
135 | } | 135 | } |
136 | 136 | ||
137 | function getToken() { | 137 | function getToken() { |
138 | - if ($api.getStorage('token')) { | ||
139 | - return $api.getStorage('token') | 138 | + if (localStorage.getItem('token')) { |
139 | + return localStorage.getItem('token') | ||
140 | } else { | 140 | } else { |
141 | return null; | 141 | return null; |
142 | } | 142 | } |
@@ -167,7 +167,6 @@ function isLogin(_this, callback) { | @@ -167,7 +167,6 @@ function isLogin(_this, callback) { | ||
167 | }); | 167 | }); |
168 | } | 168 | } |
169 | 169 | ||
170 | - | ||
171 | function loadEnd() { | 170 | function loadEnd() { |
172 | var ele = document.getElementById('loadStart'); | 171 | var ele = document.getElementById('loadStart'); |
173 | if (ele) { | 172 | if (ele) { |
@@ -178,10 +177,9 @@ function loadEnd() { | @@ -178,10 +177,9 @@ function loadEnd() { | ||
178 | } | 177 | } |
179 | } | 178 | } |
180 | 179 | ||
181 | - | ||
182 | function getcity() { | 180 | function getcity() { |
183 | - if ($api.getStorage('city')) { | ||
184 | - return $api.getStorage('city') | 181 | + if (localStorage.getItem('city')) { |
182 | + return localStorage.getItem('city') | ||
185 | } else { | 183 | } else { |
186 | return null; | 184 | return null; |
187 | } | 185 | } |
@@ -355,11 +353,10 @@ function getRequest(type, url, params, header) { | @@ -355,11 +353,10 @@ function getRequest(type, url, params, header) { | ||
355 | params: params, | 353 | params: params, |
356 | headers: header, | 354 | headers: header, |
357 | }).then(function (res) { | 355 | }).then(function (res) { |
358 | - // alert(JSON.stringify(res)) | ||
359 | if (res.data.code == 502) { | 356 | if (res.data.code == 502) { |
360 | - setTimeout(() => { | ||
361 | - window.location.href = '/html/login/login_index.html' | ||
362 | - }, 2000); | 357 | + // setTimeout(() => { |
358 | + // window.location.href = '../../html/login/login_index.html' | ||
359 | + // }, 2000); | ||
363 | // openView('login_index', 'login/login_index', '登录', 'login_index', false, false, false) | 360 | // openView('login_index', 'login/login_index', '登录', 'login_index', false, false, false) |
364 | } else { | 361 | } else { |
365 | resolve(res) | 362 | resolve(res) |
@@ -46,21 +46,15 @@ | @@ -46,21 +46,15 @@ | ||
46 | url: '' | 46 | url: '' |
47 | }, | 47 | }, |
48 | created: function () { | 48 | created: function () { |
49 | - apiready = function () { | ||
50 | - api.setWinAttr({ | ||
51 | - slidBackEnabled: false | ||
52 | - }); | ||
53 | - app.id = api.pageParam.id; | ||
54 | - app.cid = api.pageParam.cid; | ||
55 | - app.proCareInfoInfo(); | ||
56 | - app.cityname = api.pageParam.cityname; | ||
57 | - $api.fixStatusBar($api.dom('header')); | ||
58 | - app.headerH = $api.offset($api.dom('header')).h; | ||
59 | - | ||
60 | - } | 49 | + var app = this; |
50 | + app.id = localStorage.getItem('id'); | ||
51 | + app.cid = localStorage.getItem('cid'); | ||
52 | + app.proCareInfoInfo(); | ||
53 | + app.cityname = localStorage.getItem('cityName'); | ||
61 | }, | 54 | }, |
62 | methods: { | 55 | methods: { |
63 | proCareInfoInfo: function () { | 56 | proCareInfoInfo: function () { |
57 | + var app = this; | ||
64 | var post = { | 58 | var post = { |
65 | id: app.id | 59 | id: app.id |
66 | }; | 60 | }; |
@@ -92,6 +86,7 @@ | @@ -92,6 +86,7 @@ | ||
92 | }) | 86 | }) |
93 | }, | 87 | }, |
94 | share: function () { | 88 | share: function () { |
89 | + var app = this; | ||
95 | api.openFrame({ | 90 | api.openFrame({ |
96 | bgColor: 'rgba(0,0,0,0.05)', | 91 | bgColor: 'rgba(0,0,0,0.05)', |
97 | name: 'share', | 92 | name: 'share', |
@@ -21,7 +21,12 @@ | @@ -21,7 +21,12 @@ | ||
21 | .examination_swiper { | 21 | .examination_swiper { |
22 | background-color: #fff; | 22 | background-color: #fff; |
23 | } | 23 | } |
24 | - | 24 | + .swiper-slide{ |
25 | + /*display: none;*/ | ||
26 | + } | ||
27 | + .swiper-slide.swiper-slide-active{ | ||
28 | + display: block; | ||
29 | + } | ||
25 | .examination_swiper .swiper-slide { | 30 | .examination_swiper .swiper-slide { |
26 | width: auto; | 31 | width: auto; |
27 | /*min-width: 23%;*/ | 32 | /*min-width: 23%;*/ |
@@ -43,7 +48,6 @@ | @@ -43,7 +48,6 @@ | ||
43 | 48 | ||
44 | .examination_box { | 49 | .examination_box { |
45 | flex:1; | 50 | flex:1; |
46 | - height: 100%; | ||
47 | margin: 0.1rem 0; | 51 | margin: 0.1rem 0; |
48 | background-color: #fff; | 52 | background-color: #fff; |
49 | box-shadow: 0.01rem 0.02rem 0.05rem #C8C6C6; | 53 | box-shadow: 0.01rem 0.02rem 0.05rem #C8C6C6; |
@@ -72,9 +76,9 @@ | @@ -72,9 +76,9 @@ | ||
72 | display: -webkit-box; | 76 | display: -webkit-box; |
73 | flex-flow: column; | 77 | flex-flow: column; |
74 | -webkit-flex-flow: column; | 78 | -webkit-flex-flow: column; |
75 | - -webkit-box-orient: vertical; | ||
76 | overflow-x: hidden; | 79 | overflow-x: hidden; |
77 | } | 80 | } |
81 | + | ||
78 | 82 | ||
79 | 83 | ||
80 | </style> | 84 | </style> |
@@ -109,7 +113,7 @@ | @@ -109,7 +113,7 @@ | ||
109 | </div> | 113 | </div> |
110 | </div> | 114 | </div> |
111 | <div class="examination_content_swiper warp"> | 115 | <div class="examination_content_swiper warp"> |
112 | - <div class="swiper-container "> | 116 | + <div class="swiper-container"> |
113 | <div class="swiper-wrapper"> | 117 | <div class="swiper-wrapper"> |
114 | <div class="swiper-slide" v-for="(item,index) in goods"> | 118 | <div class="swiper-slide" v-for="(item,index) in goods"> |
115 | <div class="swiper_list"> | 119 | <div class="swiper_list"> |
@@ -176,45 +180,32 @@ | @@ -176,45 +180,32 @@ | ||
176 | goods: [] | 180 | goods: [] |
177 | }, | 181 | }, |
178 | created: function () { | 182 | created: function () { |
183 | + var app = this; | ||
179 | this.cid = localStorage.getItem('cid') | 184 | this.cid = localStorage.getItem('cid') |
180 | this.winTitle = localStorage.getItem('winTitle') | 185 | this.winTitle = localStorage.getItem('winTitle') |
181 | this.getCatInfo3(); | 186 | this.getCatInfo3(); |
182 | - this.mySwiper = new Swiper('.examination_swiper .swiper-container', { | ||
183 | - slidesPerView: 'auto', | ||
184 | - slideToClickedSlide: true, | ||
185 | - observer: true, | ||
186 | - observeParents: true, | ||
187 | - freeMode: true | ||
188 | - }); | ||
189 | - //内容轮播 | ||
190 | - this.Swiper1 = new Swiper('.examination_content_swiper .swiper-container', { | ||
191 | - observer: true, | ||
192 | - observeParents: true, | ||
193 | - autoHeight: true, | ||
194 | - onTransitionEnd: function (swiper) { | ||
195 | - app.ind = swiper.activeIndex; | ||
196 | - app.mySwiper.slideTo(swiper.activeIndex, 500) | ||
197 | - // alert(swiper.activeIndex); | ||
198 | - } | ||
199 | - }); | 187 | + |
200 | 188 | ||
201 | }, | 189 | }, |
202 | methods: { | 190 | methods: { |
203 | changeSwiper: function (index) { | 191 | changeSwiper: function (index) { |
192 | + var app = this; | ||
204 | app.Swiper1.slideTo(index, 500); | 193 | app.Swiper1.slideTo(index, 500); |
205 | app.ind = index | 194 | app.ind = index |
206 | }, | 195 | }, |
207 | openDoc: function (id) { | 196 | openDoc: function (id) { |
208 | - api.openWin({ | ||
209 | - name: 'care_w', | ||
210 | - url: './care_w.html', | ||
211 | - pageParam: { | ||
212 | - id: id, | ||
213 | - cid: app.cid | ||
214 | - } | ||
215 | - }) | 197 | + var app = this; |
198 | + // api.openWin({ | ||
199 | + // name: 'care_w', | ||
200 | + // url: './care_w.html', | ||
201 | + // pageParam: { | ||
202 | + // id: id, | ||
203 | + // cid: app.cid | ||
204 | + // } | ||
205 | + // }) | ||
216 | }, | 206 | }, |
217 | getCatInfo3: function () { | 207 | getCatInfo3: function () { |
208 | + var app = this; | ||
218 | var post = { | 209 | var post = { |
219 | cid: this.cid | 210 | cid: this.cid |
220 | }; | 211 | }; |
@@ -232,9 +223,7 @@ | @@ -232,9 +223,7 @@ | ||
232 | for(var i=0;i<app.goods.length;i++){ | 223 | for(var i=0;i<app.goods.length;i++){ |
233 | nav.push(app.goods[i].name) | 224 | nav.push(app.goods[i].name) |
234 | } | 225 | } |
235 | - | ||
236 | app.navs = nav; | 226 | app.navs = nav; |
237 | - | ||
238 | loadEnd() | 227 | loadEnd() |
239 | } else { | 228 | } else { |
240 | toastMsg(res.data.msg) | 229 | toastMsg(res.data.msg) |
@@ -242,6 +231,37 @@ | @@ -242,6 +231,37 @@ | ||
242 | }) | 231 | }) |
243 | } | 232 | } |
244 | 233 | ||
234 | + }, | ||
235 | + mounted(){ | ||
236 | + var app = this; | ||
237 | + app.mySwiper = new Swiper('.examination_swiper .swiper-container', { | ||
238 | + slidesPerView: 'auto', | ||
239 | + slideToClickedSlide: true, | ||
240 | + observer: true, | ||
241 | + observeParents: true, | ||
242 | + freeMode: true, | ||
243 | + onTransitionEnd: function (swiper) { | ||
244 | + | ||
245 | + } | ||
246 | + }); | ||
247 | + this.$nextTick(function(){ | ||
248 | + app.Swiper1 = new Swiper('.examination_content_swiper .swiper-container', { | ||
249 | + observer: true, | ||
250 | + observeParents: true, | ||
251 | + autoHeight: true, | ||
252 | + onTouchStart: function(swiper){ | ||
253 | + console.log(swiper) | ||
254 | + }, | ||
255 | + onTransitionEnd: function (swiper) { | ||
256 | + console.log(this.activeIndex); | ||
257 | + app.ind = swiper.activeIndex; | ||
258 | + app.mySwiper.slideTo(swiper.activeIndex, 500) | ||
259 | + // alert(swiper.activeIndex); | ||
260 | + } | ||
261 | + }); | ||
262 | + }) | ||
263 | + //内容轮播 | ||
264 | + | ||
245 | } | 265 | } |
246 | }) | 266 | }) |
247 | </script> | 267 | </script> |
@@ -358,12 +358,6 @@ | @@ -358,12 +358,6 @@ | ||
358 | // 隐藏菜单 | 358 | // 隐藏菜单 |
359 | hideMenu: function () { | 359 | hideMenu: function () { |
360 | app.img_active = !app.img_active; | 360 | app.img_active = !app.img_active; |
361 | - api.sendEvent({ | ||
362 | - name: 'hide_menu', | ||
363 | - extra: { | ||
364 | - img_active: app.img_active | ||
365 | - } | ||
366 | - }); | ||
367 | }, | 361 | }, |
368 | // 严选推荐定位 | 362 | // 严选推荐定位 |
369 | handleScroll: function () { | 363 | handleScroll: function () { |
@@ -93,17 +93,12 @@ | @@ -93,17 +93,12 @@ | ||
93 | }, | 93 | }, |
94 | methods: { | 94 | methods: { |
95 | care: function (id) { | 95 | care: function (id) { |
96 | - api.openWin({ | ||
97 | - name: 'care_w', | ||
98 | - url: './care_w.html', | ||
99 | - pageParam: { | ||
100 | - id: id, | ||
101 | - cityname: app.cityname | ||
102 | - } | ||
103 | - }) | 96 | + localStorage.setItem('id',id); |
97 | + window.location.href = 'care_f.html'; | ||
104 | }, | 98 | }, |
105 | // 获取分类信息 | 99 | // 获取分类信息 |
106 | getCatInfo: function () { | 100 | getCatInfo: function () { |
101 | + var app = this; | ||
107 | var post = { | 102 | var post = { |
108 | cid: this.cid | 103 | cid: this.cid |
109 | }; | 104 | }; |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | <link rel="stylesheet" href="../../assets/css/doc.css"> | 14 | <link rel="stylesheet" href="../../assets/css/doc.css"> |
15 | <link rel="stylesheet" href="../../assets/css/pay_form_f.css"> | 15 | <link rel="stylesheet" href="../../assets/css/pay_form_f.css"> |
16 | <link rel="stylesheet" href="../../assets/icon/iconfont.css"> | 16 | <link rel="stylesheet" href="../../assets/icon/iconfont.css"> |
17 | - <style> | 17 | + <style> |
18 | body { | 18 | body { |
19 | background-color: #f2f2f2; | 19 | background-color: #f2f2f2; |
20 | padding-bottom: 1.5rem; | 20 | padding-bottom: 1.5rem; |
@@ -328,89 +328,84 @@ | @@ -328,89 +328,84 @@ | ||
328 | 328 | ||
329 | }, | 329 | }, |
330 | created: function () { | 330 | created: function () { |
331 | - apiready = function () { | ||
332 | - app.getUserIndexInfo(); | ||
333 | - $api.rmStorage('city'); | ||
334 | - app.id = api.pageParam.id; | ||
335 | - app.applyInfo(); | ||
336 | - app.cityname = api.pageParam.cityname; | ||
337 | - api.setFrameAttr({ | ||
338 | - name: 'pay_form', | ||
339 | - reload: true | ||
340 | - }); | ||
341 | - api.addEventListener({ | ||
342 | - name: 'choose_city' | ||
343 | - }, function (ret, err) { | ||
344 | - // console.log(JSON.stringify(ret)) | ||
345 | - // alert(JSON.stringify(ret)); | ||
346 | - // app.user_address = ret.value.city + ' ' + ret.value.address; | ||
347 | - app.user_address = ret.value.address; | ||
348 | - app.user_address_detail = ret.value.name; | ||
349 | - app.lon = ret.value.longitude; | ||
350 | - app.lat = ret.value.latitude; | ||
351 | - }); | ||
352 | - api.addEventListener({ | ||
353 | - name: 'meal' | ||
354 | - }, function (ret, err) { | ||
355 | - app.meal = ret.value.meal + ret.value.num + app.unit; | ||
356 | - app.num = ret.value.num; | ||
357 | - app.price = parseFloat(ret.value.price) * (ret.value.num); | ||
358 | - app.attribute_id = ret.value.attribute_id | ||
359 | - // alert(JSON.stringify(ret.value)); | ||
360 | - }); | ||
361 | - api.addEventListener({ | ||
362 | - name: 'room' | ||
363 | - }, function (ret, err) { | ||
364 | - // alert(JSON.stringify(ret)); | ||
365 | - app.meal = ret.value.name_left + ',' + ret.value.name_right + ',' + ret.value.num + '个月'; | ||
366 | - app.num = ret.value.num; | ||
367 | - app.price = parseFloat(ret.value.price) * (ret.value.num); | ||
368 | - app.attribute_id = ret.value.attribute_id | ||
369 | - // alert(JSON.stringify(ret.value)); | ||
370 | - }); | ||
371 | - // 上传证明事件 | ||
372 | - api.addEventListener({ | ||
373 | - name: 'prove' | ||
374 | - }, function (ret, err) { | ||
375 | - // alert(JSON.stringify(ret.value)); | ||
376 | - app.diagnosis = ret.value.diagnosis; | ||
377 | - app.drug_recipe = ret.value.drug_recipe; | ||
378 | - app.drug = ret.value.drug; | ||
379 | - app.ill_case = ret.value.ill_case; | ||
380 | - }); | ||
381 | - var client_h = window.innerHeight; | ||
382 | - window.addEventListener('resize', function () { | ||
383 | - if (window.innerHeight < client_h) { | ||
384 | - app.pos = 'relative' | ||
385 | - } else { | ||
386 | - app.pos = 'fixed' | ||
387 | - } | ||
388 | - }, false); | ||
389 | - api.addEventListener({ | ||
390 | - name: 'sev_time' | ||
391 | - }, function (ret, err) { | ||
392 | - if (ret) { | ||
393 | - app.date_info = ret.value.dateinfo; | ||
394 | - } else { | ||
395 | - toastMsg('请重试') | ||
396 | - } | ||
397 | - }); | ||
398 | - api.addEventListener({ | ||
399 | - name: 'bro_time' | ||
400 | - }, function (ret, err) { | ||
401 | - if (ret) { | ||
402 | - app.broth_info = ret.value.broinfo; | ||
403 | - } else { | ||
404 | - toastMsg('请重试') | ||
405 | - } | ||
406 | - }); | 331 | + var app = this; |
332 | + app.getUserIndexInfo(); | ||
333 | + $api.rmStorage('city'); | ||
334 | + app.id = localStorage.getItem('id'); | ||
335 | + app.applyInfo(); | ||
336 | + app.cityname = localStorage.getItem('cityName'); | ||
337 | + | ||
338 | + // api.addEventListener({ | ||
339 | + // name: 'choose_city' | ||
340 | + // }, function (ret, err) { | ||
341 | + // // console.log(JSON.stringify(ret)) | ||
342 | + // // alert(JSON.stringify(ret)); | ||
343 | + // // app.user_address = ret.value.city + ' ' + ret.value.address; | ||
344 | + // app.user_address = ret.value.address; | ||
345 | + // app.user_address_detail = ret.value.name; | ||
346 | + // app.lon = ret.value.longitude; | ||
347 | + // app.lat = ret.value.latitude; | ||
348 | + // }); | ||
349 | + // api.addEventListener({ | ||
350 | + // name: 'meal' | ||
351 | + // }, function (ret, err) { | ||
352 | + // app.meal = ret.value.meal + ret.value.num + app.unit; | ||
353 | + // app.num = ret.value.num; | ||
354 | + // app.price = parseFloat(ret.value.price) * (ret.value.num); | ||
355 | + // app.attribute_id = ret.value.attribute_id | ||
356 | + // // alert(JSON.stringify(ret.value)); | ||
357 | + // }); | ||
358 | + // api.addEventListener({ | ||
359 | + // name: 'room' | ||
360 | + // }, function (ret, err) { | ||
361 | + // // alert(JSON.stringify(ret)); | ||
362 | + // app.meal = ret.value.name_left + ',' + ret.value.name_right + ',' + ret.value.num + '个月'; | ||
363 | + // app.num = ret.value.num; | ||
364 | + // app.price = parseFloat(ret.value.price) * (ret.value.num); | ||
365 | + // app.attribute_id = ret.value.attribute_id | ||
366 | + // // alert(JSON.stringify(ret.value)); | ||
367 | + // }); | ||
368 | + // 上传证明事件 | ||
369 | + // api.addEventListener({ | ||
370 | + // name: 'prove' | ||
371 | + // }, function (ret, err) { | ||
372 | + // // alert(JSON.stringify(ret.value)); | ||
373 | + // app.diagnosis = ret.value.diagnosis; | ||
374 | + // app.drug_recipe = ret.value.drug_recipe; | ||
375 | + // app.drug = ret.value.drug; | ||
376 | + // app.ill_case = ret.value.ill_case; | ||
377 | + // }); | ||
378 | + var client_h = window.innerHeight; | ||
379 | + window.addEventListener('resize', function () { | ||
380 | + if (window.innerHeight < client_h) { | ||
381 | + app.pos = 'relative' | ||
382 | + } else { | ||
383 | + app.pos = 'fixed' | ||
384 | + } | ||
385 | + }, false); | ||
386 | + // api.addEventListener({ | ||
387 | + // name: 'sev_time' | ||
388 | + // }, function (ret, err) { | ||
389 | + // if (ret) { | ||
390 | + // app.date_info = ret.value.dateinfo; | ||
391 | + // } else { | ||
392 | + // toastMsg('请重试') | ||
393 | + // } | ||
394 | + // }); | ||
395 | + // api.addEventListener({ | ||
396 | + // name: 'bro_time' | ||
397 | + // }, function (ret, err) { | ||
398 | + // if (ret) { | ||
399 | + // app.broth_info = ret.value.broinfo; | ||
400 | + // } else { | ||
401 | + // toastMsg('请重试') | ||
402 | + // } | ||
403 | + // }); | ||
407 | // app.name=api.pageParam.name; | 404 | // app.name=api.pageParam.name; |
408 | - } | ||
409 | }, | 405 | }, |
410 | methods: { | 406 | methods: { |
411 | // 选择服务日期 | 407 | // 选择服务日期 |
412 | dateSelect: function () { | 408 | dateSelect: function () { |
413 | - | ||
414 | api.openWin({ | 409 | api.openWin({ |
415 | name: 'getSev_w', | 410 | name: 'getSev_w', |
416 | url: '../common/getSev_w.html' | 411 | url: '../common/getSev_w.html' |
@@ -427,12 +422,10 @@ | @@ -427,12 +422,10 @@ | ||
427 | // 上传证明 | 422 | // 上传证明 |
428 | openProve: function () { | 423 | openProve: function () { |
429 | openView('prove', 'index/prove', '上传就医证明','prove',false,false,false) | 424 | openView('prove', 'index/prove', '上传就医证明','prove',false,false,false) |
430 | - } | ||
431 | - , | 425 | + }, |
432 | // 获取订单详情 | 426 | // 获取订单详情 |
433 | applyInfo: function () { | 427 | applyInfo: function () { |
434 | - | ||
435 | - | 428 | + var app = this; |
436 | var post = { | 429 | var post = { |
437 | gid: app.id | 430 | gid: app.id |
438 | }; | 431 | }; |
@@ -443,7 +436,6 @@ | @@ -443,7 +436,6 @@ | ||
443 | console.log(header); | 436 | console.log(header); |
444 | 437 | ||
445 | getRequest('post', 'portal/Goods/applyInfo', post, header).then(function (res) { | 438 | getRequest('post', 'portal/Goods/applyInfo', post, header).then(function (res) { |
446 | - alert(res) | ||
447 | console.log(JSON.stringify(res)); | 439 | console.log(JSON.stringify(res)); |
448 | // alert(JSON.stringify(res)) | 440 | // alert(JSON.stringify(res)) |
449 | if (res.data.code == 1) { | 441 | if (res.data.code == 1) { |
@@ -462,10 +454,10 @@ | @@ -462,10 +454,10 @@ | ||
462 | toastMsg(res.msg) | 454 | toastMsg(res.msg) |
463 | } | 455 | } |
464 | }) | 456 | }) |
465 | - } | ||
466 | - , | 457 | + }, |
467 | // 切换亲友信息 | 458 | // 切换亲友信息 |
468 | tab_person: function (index, rid) { | 459 | tab_person: function (index, rid) { |
460 | + var app = this; | ||
469 | if (app.ind == index) { | 461 | if (app.ind == index) { |
470 | app.ind = -1; | 462 | app.ind = -1; |
471 | app.user_name = ''; | 463 | app.user_name = ''; |
@@ -484,7 +476,6 @@ | @@ -484,7 +476,6 @@ | ||
484 | 'XX-Token': getToken() | 476 | 'XX-Token': getToken() |
485 | }; | 477 | }; |
486 | getRequest('post', 'portal/Goods/getPersonal', post, header).then(function (res) { | 478 | getRequest('post', 'portal/Goods/getPersonal', post, header).then(function (res) { |
487 | - // alert(JSON.stringify(res)); | ||
488 | if (res.data.code == 1) { | 479 | if (res.data.code == 1) { |
489 | app.user_name = res.data.data.name; | 480 | app.user_name = res.data.data.name; |
490 | app.checked_male = res.data.data.sex == 1 ? true : false; | 481 | app.checked_male = res.data.data.sex == 1 ? true : false; |
@@ -497,8 +488,7 @@ | @@ -497,8 +488,7 @@ | ||
497 | } | 488 | } |
498 | }) | 489 | }) |
499 | } | 490 | } |
500 | - } | ||
501 | - , | 491 | + }, |
502 | // 选择套餐 | 492 | // 选择套餐 |
503 | chooseMeal: function () { | 493 | chooseMeal: function () { |
504 | if (app.attribute_type == 1) { | 494 | if (app.attribute_type == 1) { |
@@ -535,42 +525,41 @@ | @@ -535,42 +525,41 @@ | ||
535 | } | 525 | } |
536 | }); | 526 | }); |
537 | } | 527 | } |
538 | - } | ||
539 | - , | 528 | + }, |
540 | // 选择服务地址 | 529 | // 选择服务地址 |
541 | openMap: function () { | 530 | openMap: function () { |
542 | openView('choose_address', 'common/choose_address', '选择服务地址', 'choose_address', false, {cityname: app.cityname}); | 531 | openView('choose_address', 'common/choose_address', '选择服务地址', 'choose_address', false, {cityname: app.cityname}); |
543 | - } | ||
544 | - , | 532 | + }, |
545 | // 获取协议 | 533 | // 获取协议 |
546 | openIsPro: function () { | 534 | openIsPro: function () { |
535 | + var app = this; | ||
547 | app.isPro = !app.isPro; | 536 | app.isPro = !app.isPro; |
548 | - api.openFrame({ | ||
549 | - bgColor: 'rgba(0,0,0,0.05)', | ||
550 | - name: 'tool_fm', | ||
551 | - url: '../common/tool_fm.html', | ||
552 | - bounces: false, | ||
553 | - animation: { | ||
554 | - type: "push", | ||
555 | - subType: "from_bottom", | ||
556 | - duration: 300 | ||
557 | - }, | ||
558 | - rect: { | ||
559 | - x: 0, | ||
560 | - y: 0, | ||
561 | - w: 'auto', | ||
562 | - h: 'auto' | ||
563 | - }, | ||
564 | - }) | ||
565 | - } | ||
566 | - , | 537 | + window.location.href = '../common/tool_fm.html'; |
538 | + // api.openFrame({ | ||
539 | + // bgColor: 'rgba(0,0,0,0.05)', | ||
540 | + // name: 'tool_fm', | ||
541 | + // url: '../common/tool_fm.html', | ||
542 | + // bounces: false, | ||
543 | + // animation: { | ||
544 | + // type: "push", | ||
545 | + // subType: "from_bottom", | ||
546 | + // duration: 300 | ||
547 | + // }, | ||
548 | + // rect: { | ||
549 | + // x: 0, | ||
550 | + // y: 0, | ||
551 | + // w: 'auto', | ||
552 | + // h: 'auto' | ||
553 | + // } | ||
554 | + // }) | ||
555 | + }, | ||
567 | // 去协议 | 556 | // 去协议 |
568 | getAgreement: function (name, id) { | 557 | getAgreement: function (name, id) { |
569 | openView('agree_content', 'common/agree_content', name, 'agree_content', false, {id: id}) | 558 | openView('agree_content', 'common/agree_content', name, 'agree_content', false, {id: id}) |
570 | - } | ||
571 | - , | 559 | + }, |
572 | // 去预约 | 560 | // 去预约 |
573 | appointment: function () { | 561 | appointment: function () { |
562 | + var app = this; | ||
574 | // alert(app.date_info); | 563 | // alert(app.date_info); |
575 | if (app.user_name == '') { | 564 | if (app.user_name == '') { |
576 | toastMsg('请输入服务对象') | 565 | toastMsg('请输入服务对象') |
@@ -583,9 +572,11 @@ | @@ -583,9 +572,11 @@ | ||
583 | } | 572 | } |
584 | else if (app.broth_info == '') { | 573 | else if (app.broth_info == '') { |
585 | toastMsg('请选择出生日期') | 574 | toastMsg('请选择出生日期') |
586 | - } else if (app.user_address_detail == '' && app.user_address == '') { | 575 | + } |
576 | + else if (app.user_address_detail == '' && app.user_address == '') { | ||
587 | toastMsg('请输入详细地址') | 577 | toastMsg('请输入详细地址') |
588 | - } else if (!id_card.test(app.user_id_card) && app.is_idcard == 1) { | 578 | + } |
579 | + else if (!id_card.test(app.user_id_card) && app.is_idcard == 1) { | ||
589 | toastMsg('身份证号码不正确') | 580 | toastMsg('身份证号码不正确') |
590 | } | 581 | } |
591 | else if (app.meal == '' && app.num == '' && app.attribute_id == '') { | 582 | else if (app.meal == '' && app.num == '' && app.attribute_id == '') { |
@@ -593,7 +584,8 @@ | @@ -593,7 +584,8 @@ | ||
593 | } | 584 | } |
594 | else if (app.user_content == '') { | 585 | else if (app.user_content == '') { |
595 | toastMsg('请描述疑问和症状') | 586 | toastMsg('请描述疑问和症状') |
596 | - } else if (app.is_prove == 1 && app.diagnosis == '' && app.drug_recipe == '' && app.drug == '') { | 587 | + } |
588 | + else if (app.is_prove == 1 && app.diagnosis == '' && app.drug_recipe == '' && app.drug == '') { | ||
597 | toastMsg('请上传证明') | 589 | toastMsg('请上传证明') |
598 | } | 590 | } |
599 | else if (app.push_btn == false) { | 591 | else if (app.push_btn == false) { |
@@ -642,13 +634,11 @@ | @@ -642,13 +634,11 @@ | ||
642 | } | 634 | } |
643 | }) | 635 | }) |
644 | } | 636 | } |
645 | - } | ||
646 | - , | 637 | + }, |
647 | // 客服 | 638 | // 客服 |
648 | openSever: function () { | 639 | openSever: function () { |
649 | 640 | ||
650 | - } | ||
651 | - , | 641 | + }, |
652 | // 获取个人信息 | 642 | // 获取个人信息 |
653 | getUserIndexInfo: function () { | 643 | getUserIndexInfo: function () { |
654 | var header = { | 644 | var header = { |
@@ -662,8 +652,7 @@ | @@ -662,8 +652,7 @@ | ||
662 | toastMsg(res.data.msg) | 652 | toastMsg(res.data.msg) |
663 | } | 653 | } |
664 | }) | 654 | }) |
665 | - } | ||
666 | - , | 655 | + }, |
667 | 656 | ||
668 | } | 657 | } |
669 | }) | 658 | }) |
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | <link rel="stylesheet" href="../../assets/icon/iconfont.css"> | 13 | <link rel="stylesheet" href="../../assets/icon/iconfont.css"> |
14 | </head> | 14 | </head> |
15 | <body> | 15 | <body> |
16 | -<div id="app"> | 16 | +<div id="app" v-cloak> |
17 | <!--<div class="login_loading" v-show="isLogin">--> | 17 | <!--<div class="login_loading" v-show="isLogin">--> |
18 | <!--<div class="login_img"><img src="../../assets/image/loading.gif" alt=""></div>--> | 18 | <!--<div class="login_img"><img src="../../assets/image/loading.gif" alt=""></div>--> |
19 | <!--<span>正在登录...</span>--> | 19 | <!--<span>正在登录...</span>--> |
@@ -136,9 +136,9 @@ | @@ -136,9 +136,9 @@ | ||
136 | 'XX-Device-Type': getDevice() | 136 | 'XX-Device-Type': getDevice() |
137 | }; | 137 | }; |
138 | getRequest('post', 'home/index/checkSMS', post, header).then(function (res) { | 138 | getRequest('post', 'home/index/checkSMS', post, header).then(function (res) { |
139 | - console.log(res) | 139 | + alert(JSON.stringify(res)) |
140 | if (res.data.code == 1) { | 140 | if (res.data.code == 1) { |
141 | - $api.setStorage('token', res.data.data.token); | 141 | + localStorage.setItem('token', res.data.data.token); |
142 | window.location.href = '../index/index_f.html' | 142 | window.location.href = '../index/index_f.html' |
143 | } else { | 143 | } else { |
144 | toastMsg(res.data.msg) | 144 | toastMsg(res.data.msg) |
@@ -168,11 +168,8 @@ | @@ -168,11 +168,8 @@ | ||
168 | getRequest('post', 'home/index/loginByPass', post, header).then(function (res) { | 168 | getRequest('post', 'home/index/loginByPass', post, header).then(function (res) { |
169 | // alert(JSON.stringify(res.data.data.token)); | 169 | // alert(JSON.stringify(res.data.data.token)); |
170 | if (res.data.code == 1) { | 170 | if (res.data.code == 1) { |
171 | - $api.setStorage('token', res.data.data.token); | ||
172 | - api.openWin({ | ||
173 | - name: 'index_win', | ||
174 | - url: '../common/index_win.html', | ||
175 | - }); | 171 | + localStorage.setItem('token', res.data.data.token); |
172 | + window.location.href = '../index/index_f.html' | ||
176 | } else { | 173 | } else { |
177 | toastMsg(res.data.msg) | 174 | toastMsg(res.data.msg) |
178 | } | 175 | } |
@@ -145,7 +145,7 @@ | @@ -145,7 +145,7 @@ | ||
145 | </div> | 145 | </div> |
146 | <div class="cons_item_bottom" v-else> | 146 | <div class="cons_item_bottom" v-else> |
147 | <span>{{item.post_title}}</span> | 147 | <span>{{item.post_title}}</span> |
148 | - <span class="bottom_btn">不可使用</span> | 148 | + <!--<span class="bottom_btn">不可使用</span>--> |
149 | </div> | 149 | </div> |
150 | </div> | 150 | </div> |
151 | <div class="save_btn" @click="noUse">不使用消费金</div> | 151 | <div class="save_btn" @click="noUse">不使用消费金</div> |
@@ -482,6 +482,7 @@ | @@ -482,6 +482,7 @@ | ||
482 | getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function(res) { | 482 | getRequest('post', 'user/index/getUserIndexInfo', null, header).then(function(res) { |
483 | // alert(JSON.stringify(res)); | 483 | // alert(JSON.stringify(res)); |
484 | if(res.data.code == 1) { | 484 | if(res.data.code == 1) { |
485 | + res.data.data.avatar = 'http://wx.cijievip.com'+res.data.data.avatar | ||
485 | app.user_type = res.data.data; | 486 | app.user_type = res.data.data; |
486 | } else {} | 487 | } else {} |
487 | loadEnd() | 488 | loadEnd() |
@@ -489,7 +490,6 @@ | @@ -489,7 +490,6 @@ | ||
489 | }, //底部菜单跳转 | 490 | }, //底部菜单跳转 |
490 | changeTab(index){ | 491 | changeTab(index){ |
491 | var url = index==0?'../index/index_f.html':index == 1?'../strict/strict_f.html':'my_f.html' | 492 | var url = index==0?'../index/index_f.html':index == 1?'../strict/strict_f.html':'my_f.html' |
492 | - console.log(url) | ||
493 | window.location.href = url | 493 | window.location.href = url |
494 | } | 494 | } |
495 | 495 |
@@ -306,28 +306,25 @@ | @@ -306,28 +306,25 @@ | ||
306 | </div> | 306 | </div> |
307 | </body> | 307 | </body> |
308 | </html> | 308 | </html> |
309 | -<script> | ||
310 | - window.onLoad = function () { | ||
311 | - var map = new AMap.Map('container'); | ||
312 | - } | ||
313 | - var url = 'https://webapi.amap.com/maps?v=1.4.8&key=ef53760bd959a4df08b7d4587280e642&callback=onLoad'; | ||
314 | - var jsapi = document.createElement('script'); | ||
315 | - jsapi.charset = 'utf-8'; | ||
316 | - jsapi.src = url; | ||
317 | - document.head.appendChild(jsapi); | ||
318 | -</script> | ||
319 | <script type="text/javascript" src="../../assets/js/api.js"></script> | 309 | <script type="text/javascript" src="../../assets/js/api.js"></script> |
320 | <script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script> | 310 | <script type="text/javascript" src="../../assets/js/swiper-3.4.2.min.js"></script> |
321 | <script type="text/javascript" src="../../assets/js/weui.min.js"></script> | 311 | <script type="text/javascript" src="../../assets/js/weui.min.js"></script> |
322 | <script type="text/javascript" src="../../assets/js/public.js"></script> | 312 | <script type="text/javascript" src="../../assets/js/public.js"></script> |
323 | <script type="text/javascript" src="../../assets/js/fastclick.js"></script> | 313 | <script type="text/javascript" src="../../assets/js/fastclick.js"></script> |
324 | -<script> | ||
325 | - new FastClick(document.body); | ||
326 | -</script> | ||
327 | <script type="text/javascript" src="../../assets/js/vue.min.js"></script> | 314 | <script type="text/javascript" src="../../assets/js/vue.min.js"></script> |
328 | <script type="text/javascript" src="../../assets/icon/iconfont.js"></script> | 315 | <script type="text/javascript" src="../../assets/icon/iconfont.js"></script> |
329 | <script type="text/javascript" src="../../assets/js/axios.min.js"></script> | 316 | <script type="text/javascript" src="../../assets/js/axios.min.js"></script> |
330 | <script> | 317 | <script> |
318 | + // window.onLoad = function () { | ||
319 | + // var map = new AMap.Map('container'); | ||
320 | + // }; | ||
321 | + // var url = 'https://webapi.amap.com/maps?v=1.4.8&key=ef53760bd959a4df08b7d4587280e642&callback=onLoad'; | ||
322 | + // var jsapi = document.createElement('script'); | ||
323 | + // jsapi.charset = 'utf-8'; | ||
324 | + // jsapi.src = url; | ||
325 | + // document.head.appendChild(jsapi); | ||
326 | + new FastClick(document.body); | ||
327 | + | ||
331 | 328 | ||
332 | var app = new Vue({ | 329 | var app = new Vue({ |
333 | el: "#app", | 330 | el: "#app", |
@@ -349,6 +346,7 @@ | @@ -349,6 +346,7 @@ | ||
349 | }, | 346 | }, |
350 | created: function () { | 347 | created: function () { |
351 | this.crowd(); //第三栏 | 348 | this.crowd(); //第三栏 |
349 | + alert(1) | ||
352 | }, | 350 | }, |
353 | mounted: function() { | 351 | mounted: function() { |
354 | window.addEventListener('scroll', this.handleScroll) | 352 | window.addEventListener('scroll', this.handleScroll) |
@@ -418,12 +416,13 @@ | @@ -418,12 +416,13 @@ | ||
418 | }, | 416 | }, |
419 | // 获取详情 | 417 | // 获取详情 |
420 | crowd: function() { | 418 | crowd: function() { |
419 | + var app = this; | ||
421 | var header = { | 420 | var header = { |
422 | "XX-Device-Type": getDevice(), | 421 | "XX-Device-Type": getDevice(), |
423 | 'XX-Token': getToken() | 422 | 'XX-Token': getToken() |
424 | }; | 423 | }; |
425 | getRequest('post', 'portal/Goods/crowd', null, header).then(function(res) { | 424 | getRequest('post', 'portal/Goods/crowd', null, header).then(function(res) { |
426 | - // alert(JSON.stringify(res)); | 425 | + alert(JSON.stringify(res)); |
427 | if(res.data.code == 1) { | 426 | if(res.data.code == 1) { |
428 | app.banner = res.data.data.banner; | 427 | app.banner = res.data.data.banner; |
429 | app.state = res.data.data.state; | 428 | app.state = res.data.data.state; |
-
请 注册 或 登录 后发表评论