315 lines
6.4 KiB
Vue
315 lines
6.4 KiB
Vue
<template>
|
|
<view class="app">
|
|
<u-swiper :list="swiperImgUrls" effect3d='true' height='400' interval='5000' duration='2000'></u-swiper>
|
|
<view class="items">
|
|
<view class="item" @tap="gosite">
|
|
<image src="../../static/hlz.png" mode=""></image>
|
|
<view class="title">
|
|
护理站
|
|
</view>
|
|
</view>
|
|
<view class="item" @tap="gomedicine">
|
|
<image src="../../static/jkzx.png" mode=""></image>
|
|
<view class="title">
|
|
健康咨询
|
|
</view>
|
|
</view>
|
|
<view class="item" @tap='godiseasemanagement'>
|
|
<image src="../../static/zbgl.png" mode=""></image>
|
|
<view class="title">
|
|
专病管理
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="Welfarecustomerservice">
|
|
<image src="../../static/fuli.png" mode=""></image>
|
|
<image src="../../static/kefu.png" mode=""></image>
|
|
</view>
|
|
<view class="Healthknowledge">
|
|
<view class="title">
|
|
健康常识
|
|
</view>
|
|
<view class="more" @tap='gohealth'>
|
|
<view class="title">
|
|
查看更多
|
|
</view>
|
|
<image src="../../static/huijiantou.png" mode=""></image>
|
|
</view>
|
|
<view class="list">
|
|
<view class="item" v-for="(item,index) in informationCategoryVOList" :key="index"
|
|
@tap='gohealthitem(item)'>
|
|
<view class="text">
|
|
{{item.informationTitle}}
|
|
</view>
|
|
<view class="author"></view>
|
|
<image :src="item.leadThumbnailUrl" mode=""></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<u-toast ref="uToast" />
|
|
<u-back-top :scroll-top="scrollTop"></u-back-top>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
getPoserInfoListByType
|
|
} from '@/api/homepage/index.js'
|
|
import {
|
|
getHeathHousingList
|
|
} from '@/api/Healthknowledge/index.js'
|
|
import baseurl from '../../api/baseurl';
|
|
export default {
|
|
data() {
|
|
return {
|
|
swiperImgUrls: [],
|
|
currentIndex: 0,
|
|
informationCategoryVOList: [], //咨询信息
|
|
informationCategorytotal: 0,
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
scrollTop: 0,
|
|
};
|
|
},
|
|
onShow() {
|
|
this.getPoserInfo();
|
|
this.getHeathHousing();
|
|
},
|
|
methods: {
|
|
//跳转健康咨询item
|
|
gohealthitem(item) {
|
|
uni.navigateTo({
|
|
url: `/pages/Healthitem/Healthitem?item=${encodeURIComponent(JSON.stringify(item))}`
|
|
})
|
|
},
|
|
//健康咨询
|
|
getHeathHousing() {
|
|
getHeathHousingList(this.pageNum, this.pageSize).then(res => {
|
|
if (res.rows) {
|
|
res.rows.forEach(e => {
|
|
e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl
|
|
})
|
|
}
|
|
this.informationCategoryVOList = res.rows
|
|
this.informationCategorytotal = res.total
|
|
})
|
|
},
|
|
//海报
|
|
getPoserInfo() {
|
|
getPoserInfoListByType().then(res => {
|
|
if (res.code == 200) {
|
|
if (res.data.poserInfoList) {
|
|
res.data.poserInfoList.forEach(e => {
|
|
e.image = baseurl + e.posterPictureUrl
|
|
})
|
|
this.swiperImgUrls = res.data.poserInfoList
|
|
}
|
|
}
|
|
})
|
|
},
|
|
swiperChange(event) {
|
|
this.currentIndex = event.detail.current
|
|
},
|
|
//专病管理
|
|
godiseasemanagement() {
|
|
uni.navigateTo({
|
|
url: '/pages/diseasemanagement/diseasemanagement'
|
|
})
|
|
},
|
|
//健康咨询
|
|
gomedicine() {
|
|
uni.navigateTo({
|
|
url: '/pages/medicine/medicine'
|
|
})
|
|
},
|
|
//跳转护理站页面
|
|
gosite() {
|
|
uni.navigateTo({
|
|
url: '/pages/site/site'
|
|
})
|
|
},
|
|
//健康常识
|
|
gohealth() {
|
|
uni.navigateTo({
|
|
url: '/pages/Healthknowledge/Healthknowledge'
|
|
})
|
|
},
|
|
},
|
|
onReachBottom() { //下滑加载
|
|
if (this.informationCategoryVOList.length >= this.informationCategorytotal) {} else {
|
|
this.pageNum++
|
|
getHeathHousingList(this.pageNum, this.pageSize).then(res => {
|
|
if (res.rows) {
|
|
res.rows.forEach(e => {
|
|
e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl
|
|
this.informationCategoryVOList.push(e)
|
|
})
|
|
}
|
|
})
|
|
}
|
|
},
|
|
onPullDownRefresh() { //下拉刷新
|
|
this.pageNum = 1;
|
|
this.getHeathHousing();
|
|
setTimeout(function() {
|
|
uni.stopPullDownRefresh();
|
|
}, 1000);
|
|
},
|
|
//1.分享给朋友
|
|
onShareAppMessage(res) {
|
|
let pages = getCurrentPages();
|
|
let url = pages[pages.length - 1].$page.fullPath
|
|
return {
|
|
title: '泉医到家',
|
|
path: url,
|
|
}
|
|
},
|
|
//2.分享到朋友圈
|
|
onShareTimeline(res) {
|
|
let pages = getCurrentPages();
|
|
let url = pages[pages.length - 1].$page.fullPath
|
|
return {
|
|
title: '泉医到家',
|
|
path: url,
|
|
}
|
|
},
|
|
onPageScroll(e) {
|
|
this.scrollTop = e.scrollTop;
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.app {
|
|
padding: 100rpx 0 0 0;
|
|
|
|
.Healthknowledge {
|
|
width: 100%;
|
|
padding: 40rpx 50rpx 50rpx;
|
|
background-color: #fff;
|
|
position: relative;
|
|
line-height: 46rpx;
|
|
|
|
.more {
|
|
position: absolute;
|
|
right: 20rpx;
|
|
top: 40rpx;
|
|
height: 46rpx;
|
|
width: 30%;
|
|
|
|
.title {
|
|
position: absolute;
|
|
right: 30rpx;
|
|
top: 50%;
|
|
text-align: right;
|
|
transform: translateY(-50%);
|
|
font-size: 26rpx;
|
|
font-family: Adobe Heiti Std;
|
|
font-weight: normal;
|
|
color: #969494;
|
|
}
|
|
|
|
image {
|
|
position: absolute;
|
|
right: 0;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
width: 15rpx;
|
|
height: 25rpx;
|
|
}
|
|
}
|
|
|
|
.list {
|
|
width: 100%;
|
|
margin: 20rpx auto 0;
|
|
|
|
.item {
|
|
width: 100%;
|
|
height: 200rpx;
|
|
position: relative;
|
|
border-bottom: 2rpx solid #CDC9C9;
|
|
|
|
image {
|
|
position: absolute;
|
|
right: 0;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
width: 253rpx;
|
|
height: 164rpx;
|
|
border-radius: 10rpx;
|
|
}
|
|
|
|
.author {
|
|
position: absolute;
|
|
bottom: 20rpx;
|
|
left: 0;
|
|
font-size: 20rpx;
|
|
color: #969494;
|
|
}
|
|
|
|
.text {
|
|
position: absolute;
|
|
top: 20rpx;
|
|
left: 0;
|
|
width: 50%;
|
|
font-size: 30rpx;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
}
|
|
}
|
|
|
|
.title {
|
|
font-size: 38rpx;
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
|
|
.Welfarecustomerservice {
|
|
display: flex;
|
|
justify-content: center;
|
|
background-color: #fff;
|
|
width: 100%;
|
|
padding: 30rpx 0;
|
|
margin-bottom: 20rpx;
|
|
|
|
image:nth-child(1) {
|
|
margin: 0 5rpx 0 0;
|
|
}
|
|
|
|
image:nth-child(2) {
|
|
margin: 0 0 0 5rpx;
|
|
}
|
|
|
|
image {
|
|
width: 350rpx;
|
|
height: 200rpx;
|
|
}
|
|
}
|
|
|
|
.items {
|
|
background-color: #fff;
|
|
padding: 30rpx 80rpx 20px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-bottom: 20rpx;
|
|
|
|
.item {
|
|
image {
|
|
width: 150rpx;
|
|
height: 150rpx;
|
|
display: block;
|
|
margin: 0 auto 20rpx;
|
|
}
|
|
|
|
.title {
|
|
font-size: 40rpx;
|
|
font-weight: 550;
|
|
text-align: center;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|