...
|
...
|
@@ -214,18 +214,7 @@ |
|
|
<script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
|
|
|
<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
|
|
|
<script>
|
|
|
new Swiper('.swiper-container', {
|
|
|
observer: true,
|
|
|
observeParents: true,
|
|
|
slidesPerView: 1,
|
|
|
// autoplayDisableOnInteraction: false,
|
|
|
loop: true,
|
|
|
navigation: {
|
|
|
nextEl: '.change_slide',
|
|
|
},
|
|
|
autoHeight: false,
|
|
|
speed: 1500,
|
|
|
});
|
|
|
|
|
|
var app = new Vue({
|
|
|
el: "#app",
|
|
|
data: {
|
...
|
...
|
@@ -265,11 +254,35 @@ |
|
|
},
|
|
|
mounted: function () {
|
|
|
window.addEventListener('scroll', this.handleScroll)
|
|
|
// new Swiper('.swiper-container', {
|
|
|
// autoplay: true,
|
|
|
// observer: true,
|
|
|
// observeParents: true,
|
|
|
// slidesPerView: 1,
|
|
|
// autoplayDisableOnInteraction: false,
|
|
|
// loop: true,
|
|
|
// autoHeight: false,
|
|
|
// speed: 1500
|
|
|
// });
|
|
|
new Swiper('.swiper-container', {
|
|
|
initialSlide :0,
|
|
|
autoplay: 2000,
|
|
|
observer: true,
|
|
|
observeParents: true,
|
|
|
slidesPerView: 1,
|
|
|
autoplayDisableOnInteraction: false,
|
|
|
loop: true,
|
|
|
navigation: {
|
|
|
nextEl: '.change_slide',
|
|
|
},
|
|
|
autoHeight: false,
|
|
|
speed: 1500
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
// 我的消息
|
|
|
my_news: function () {
|
|
|
openView('my_news', 'my/my_news', '消息通知', 'my_news', false, {
|
|
|
openView('my_news', '../my/my_news', '消息通知', 'my_news', false, {
|
|
|
new_type: 0
|
|
|
})
|
|
|
},
|
...
|
...
|
@@ -339,9 +352,7 @@ |
|
|
// });
|
|
|
// });
|
|
|
}
|
|
|
|
|
|
function onError(erro) {
|
|
|
console.log(erro)
|
|
|
// 定位出错
|
|
|
toastMsg('请开启定位功能')
|
|
|
}
|
...
|
...
|
@@ -456,10 +467,7 @@ |
|
|
},
|
|
|
// 轮播图跳转详情
|
|
|
care: function (id, care_name) {
|
|
|
window.location.href = 'care_f.html';
|
|
|
localStorage.removeItem('cid');
|
|
|
localStorage.setItem('id',id);
|
|
|
localStorage.setItem('care_name',care_name);
|
|
|
var app = this ;
|
|
|
// api.openWin({
|
|
|
// name: 'care_w',
|
|
|
// url: './care_w.html',
|
...
|
...
|
@@ -468,6 +476,22 @@ |
|
|
// care_name: care_name
|
|
|
// }
|
|
|
// })
|
|
|
if(care_name.indexOf('旅游') == -1){
|
|
|
localStorage.removeItem('cid');
|
|
|
openWin({
|
|
|
name: 'care_w',
|
|
|
url: './care_f.html',
|
|
|
pageParam: {
|
|
|
id: id,
|
|
|
care_name: care_name
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
localStorage.setItem('cid',id);
|
|
|
localStorage.setItem('cityName',app.cityname);
|
|
|
window.location.href = 'tral_f.html';
|
|
|
|
|
|
}
|
|
|
},
|
|
|
getUserIndexInfo: function () {
|
|
|
var header = {
|
...
|
...
|
@@ -494,59 +518,59 @@ |
|
|
openItem: function (id, name) {
|
|
|
switch (id) {
|
|
|
case 1:
|
|
|
url = 'nursing_f'
|
|
|
url = 'nursing_f';
|
|
|
// openView('nursing_f', 'index/nursing_f', name, 'nursing_f', false, {
|
|
|
// cid: id,
|
|
|
// cityname: app.cityname
|
|
|
// });
|
|
|
break;
|
|
|
case 2:
|
|
|
url = 'disease_f'
|
|
|
url = 'disease_f';
|
|
|
// openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
|
|
|
// cid: id,
|
|
|
// cityname: app.cityname
|
|
|
// });
|
|
|
break;
|
|
|
case 3:
|
|
|
url = 'disease_f'
|
|
|
url = 'disease_f';
|
|
|
// openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
|
|
|
// cid: id,
|
|
|
// cityname: app.cityname
|
|
|
// });
|
|
|
break;
|
|
|
case 4:
|
|
|
url = 'examination_f'
|
|
|
url = 'examination_f';
|
|
|
// openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
|
|
|
// cid: id,
|
|
|
// cityname: app.cityname
|
|
|
// });
|
|
|
break;
|
|
|
case 5:
|
|
|
url = 'doc_home_f'
|
|
|
url = 'doc_home_f';
|
|
|
break;
|
|
|
case 6:
|
|
|
url = 'disease_f'
|
|
|
url = 'disease_f';
|
|
|
// openView('disease_f', 'index/disease_f', name, 'disease_f', false, {
|
|
|
// cid: id,
|
|
|
// cityname: app.cityname
|
|
|
// });
|
|
|
break;
|
|
|
case 7:
|
|
|
url = 'examination_f'
|
|
|
url = 'examination_f';
|
|
|
// openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
|
|
|
// cid: id,
|
|
|
// cityname: app.cityname
|
|
|
// });
|
|
|
break;
|
|
|
case 8:
|
|
|
url = 'examination_f'
|
|
|
url = 'examination_f';
|
|
|
// openView('examination_f', 'index/examination_f', name, 'examination_f', false, {
|
|
|
// cid: id,
|
|
|
// cityname: app.cityname
|
|
|
// });
|
|
|
break;
|
|
|
case 9:
|
|
|
url = 'Insurance'
|
|
|
url = 'Insurance';
|
|
|
// api.openWin({
|
|
|
// name: 'Insurance_w',
|
|
|
// url: './Insurance_w.html',
|
...
|
...
|
@@ -557,7 +581,7 @@ |
|
|
// });
|
|
|
break;
|
|
|
case 10:
|
|
|
url = 'tral_f'
|
|
|
url = 'tral_f';
|
|
|
// api.openWin({
|
|
|
// name: 'tral_w',
|
|
|
// url: './tral_w.html',
|
...
|
...
|
@@ -587,10 +611,11 @@ |
|
|
},
|
|
|
// 获取严选推荐列表
|
|
|
show: function () {
|
|
|
var app = this;
|
|
|
getRequest('POST', 'portal/index/show', null, null).then(function (res) {
|
|
|
// alert(JSON.stringify(res));
|
|
|
if (res.data.code == 1) {
|
|
|
app.show_data = res.data.data
|
|
|
app.show_data = res.data.data;
|
|
|
} else {}
|
|
|
})
|
|
|
},
|
...
|
...
|
@@ -598,8 +623,24 @@ |
|
|
changeTab(index) {
|
|
|
var url = index == 0 ? 'index_f.html' : index == 1 ? '../strict/strict_f.html' : '../my/my_f.html'
|
|
|
window.location.href = url
|
|
|
},
|
|
|
// 初始化轮播
|
|
|
initSwiper() {
|
|
|
new Swiper('.swiper-container', {
|
|
|
autoplay: true,
|
|
|
observer: true,
|
|
|
observeParents: true,
|
|
|
autoplayDisableOnInteraction: true,
|
|
|
loop: true,
|
|
|
nextButton: '.change_slide',
|
|
|
autoHeight: true,
|
|
|
speed: 1500,
|
|
|
lazyLoading: true
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
})
|
|
|
</script> |
...
|
...
|
|