|
|
|
|
@ -8,7 +8,7 @@
|
|
|
|
|
alt=""
|
|
|
|
|
></image>
|
|
|
|
|
<view class="top" :style="{ 'padding-right': menuButtonRight + 'px' }">
|
|
|
|
|
<view class="position" @click="toPage('/pages/CitySelect/CitySelect')">
|
|
|
|
|
<view class="position" @click="$u.route({ url: '/pages/CitySelect/CitySelect' })">
|
|
|
|
|
<u-icon name="map-fill"></u-icon>
|
|
|
|
|
<view>{{ vuex_location.city.replace(/(市|区|县)/,'') }}</view>
|
|
|
|
|
<u-icon name="arrow-down" size="22"></u-icon>
|
|
|
|
|
@ -93,7 +93,7 @@
|
|
|
|
|
<view class="right">
|
|
|
|
|
<view class="title">{{ item.name }}</view>
|
|
|
|
|
<view class="tag">
|
|
|
|
|
<view class="tag__item">三甲</view>
|
|
|
|
|
<view class="tag__item">{{ item.good_at }}</view>
|
|
|
|
|
<view class="tag__item">综合医院</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="description"> {{item.good_at}} </view>
|
|
|
|
|
@ -205,6 +205,8 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
hospitals: [],
|
|
|
|
|
banners: [],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
@ -219,6 +221,9 @@ export default {
|
|
|
|
|
uni.getMenuButtonBoundingClientRect().left +
|
|
|
|
|
10;
|
|
|
|
|
this.statusBarHeight = uni.getMenuButtonBoundingClientRect().top;
|
|
|
|
|
|
|
|
|
|
this.getHospital()
|
|
|
|
|
this.getBanner()
|
|
|
|
|
},
|
|
|
|
|
onPageScroll(e) {
|
|
|
|
|
this.isShowSticky = e.scrollTop > this.scrollTop
|
|
|
|
|
@ -260,23 +265,31 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
searchInput(e) {},
|
|
|
|
|
|
|
|
|
|
toPage (url, type='page') {
|
|
|
|
|
switch (type) {
|
|
|
|
|
case 'page':
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url
|
|
|
|
|
})
|
|
|
|
|
break
|
|
|
|
|
case 'tabbar':
|
|
|
|
|
uni.switchTab({
|
|
|
|
|
url
|
|
|
|
|
async getHospital() {
|
|
|
|
|
try {
|
|
|
|
|
const res = await this.$u.api.hospitalList({
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 10,
|
|
|
|
|
'show_relation[0]': 'site'
|
|
|
|
|
})
|
|
|
|
|
break
|
|
|
|
|
case 'back':
|
|
|
|
|
uni.navigateBack()
|
|
|
|
|
break
|
|
|
|
|
this.hospitals = res.data
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async getBanner() {
|
|
|
|
|
try {
|
|
|
|
|
const res = await this.$u.api.banner({
|
|
|
|
|
position: 1
|
|
|
|
|
})
|
|
|
|
|
this.banners = res.map(i => ({
|
|
|
|
|
...i,
|
|
|
|
|
url: i.image?.url
|
|
|
|
|
}))
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
@ -498,7 +511,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.description {
|
|
|
|
|
width: 320rpx;
|
|
|
|
|
max-width: 320rpx;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|