304 lines
7.4 KiB
Vue
304 lines
7.4 KiB
Vue
<template>
|
|
<view class="app">
|
|
<view class="address">
|
|
<!-- <image src="../../static/pages/address.png" mode=""></image>
|
|
<text>
|
|
{{location?location:''}}
|
|
</text> -->
|
|
</view>
|
|
<view class="topbar">
|
|
<image src="../../static/pages/wenzhenpingtai.png" mode="" @tap="goconsultationplatform"></image>
|
|
<image src="../../static/pages/hulifuwu.png" mode="" @tap="gosite"></image>
|
|
</view>
|
|
<view class="title">
|
|
常用服务
|
|
</view>
|
|
<view class="centerbar topbar">
|
|
<image src="../../static/pages/yuyueshaicha.png" mode="" @tap="goAppointmentscreening"></image>
|
|
<image src="../../static/pages/shaichajieguo.png" mode="" @tap="result"></image>
|
|
<image src="../../static/pages/jiankangshangcheng.png" mode="" @tap="goshopping"></image>
|
|
<image src="../../static/pages/xinrenfuli.png" mode="" @tap="gomaterialbenefits"></image>
|
|
</view>
|
|
<view class="title">
|
|
<text>健康资讯</text>
|
|
<view class="" @tap='gohealth'>
|
|
<text>
|
|
查看更多
|
|
</text>
|
|
<image src="../../static/huijiantou.png" mode=""></image>
|
|
</view>
|
|
</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>
|
|
<u-toast ref="uToast" />
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
mapState,
|
|
mapActions
|
|
} from "vuex";
|
|
import {
|
|
getPoserInfoListByType,
|
|
getScreening
|
|
} from '@/api/pages/medicalservice/index.js'
|
|
import {
|
|
getHeathHousingList
|
|
} from '@/api/pagesB/Healthknowledge/index.js'
|
|
import baseurl from '../../api/baseurl';
|
|
export default {
|
|
data() {
|
|
return {
|
|
pageNum: 1,
|
|
pageSize: 5,
|
|
informationCategoryVOList: [], //咨询信息
|
|
patientId: '',
|
|
userInfo: null,
|
|
location: null,
|
|
};
|
|
},
|
|
onShow() {
|
|
this.pageNum = 1
|
|
this.patientId = uni.getStorageSync('patientId');
|
|
this.userInfo = uni.getStorageSync('userinfo')
|
|
this.location = uni.getStorageSync('location')
|
|
this.getHeathHousing();
|
|
},
|
|
methods: {
|
|
goAppointmentscreening() {
|
|
// 筛查预约
|
|
|
|
if (!this.userInfo) {
|
|
uni.showModal({
|
|
title: "提示",
|
|
content: "您还未注册,是否去注册?",
|
|
confirmText: '是',
|
|
cancelText: '否',
|
|
success(res) {
|
|
if (res.confirm) {
|
|
uni.redirectTo({
|
|
url: "/pages/register/register"
|
|
})
|
|
} else {
|
|
wx.exitMiniProgram()
|
|
}
|
|
},
|
|
})
|
|
}
|
|
else {
|
|
getScreening(this.patientId).then(res => {
|
|
if (res.code == 200) {
|
|
let userinfo = JSON.stringify(this.userInfo)
|
|
if (!res.data || res.data == null) {
|
|
uni.navigateTo({
|
|
url: `/pagesB/screenorder/screenorder?userinfo=${userinfo}`
|
|
})
|
|
} else {
|
|
uni.navigateTo({
|
|
url: `/pagesB/orderlist/orderlist?userinfo=${userinfo}`
|
|
})
|
|
}
|
|
}
|
|
})
|
|
}
|
|
// uni.navigateTo({
|
|
// url: '/pagesB/screenorder/screenorder'
|
|
// })
|
|
// uni.navigateTo({
|
|
// url: '/pagesB/orderlist/orderlist'
|
|
// })
|
|
},
|
|
//跳转健康常识item
|
|
gohealthitem(item) {
|
|
const value = uni.getStorageSync('openid');
|
|
const value2 = uni.getStorageSync('patientId');
|
|
if (value && value2) {
|
|
uni.navigateTo({
|
|
url: `/pagesB/Healthitem/Healthitem?item=${encodeURIComponent(JSON.stringify(item))}`
|
|
})
|
|
} else {
|
|
this.$refs.uToast.show({
|
|
title: '您未登录,请先登录',
|
|
type: 'error',
|
|
duration: '1000',
|
|
url: '/pages/login/login'
|
|
})
|
|
}
|
|
|
|
},
|
|
// 健康常识
|
|
getHeathHousing() {
|
|
getHeathHousingList(this.pageNum, this.pageSize).then(res => {
|
|
if (res.rows) {
|
|
res.rows.forEach(e => {
|
|
e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl
|
|
})
|
|
}
|
|
this.informationCategoryVOList = res.rows
|
|
})
|
|
},
|
|
//新人福利
|
|
// 第一种 直接映射
|
|
...mapActions(["openPopup"]),
|
|
gomaterialbenefits() {
|
|
// 第二种引入
|
|
// this.$store.dispatch("openPopup");
|
|
// this.openPopup();
|
|
setTimeout(e => {
|
|
const value = uni.getStorageSync('openid');
|
|
const value2 = uni.getStorageSync('patientId');
|
|
if (value && value2) {
|
|
uni.navigateTo({
|
|
url: '/pagesB/materialbenefits/materialbenefits'
|
|
})
|
|
} else {
|
|
this.$refs.uToast.show({
|
|
title: '您未登录,请先登录',
|
|
type: 'error',
|
|
duration: '1000',
|
|
url: '/pages/login/login'
|
|
})
|
|
}
|
|
|
|
}, 0)
|
|
},
|
|
//跳转护理站页面
|
|
gosite() {
|
|
// this.openPopup();
|
|
setTimeout(e => {
|
|
const value = uni.getStorageSync('openid');
|
|
const value2 = uni.getStorageSync('patientId');
|
|
if (value && value2) {
|
|
uni.navigateTo({
|
|
url: '/pagesB/site/site'
|
|
})
|
|
} else {
|
|
this.$refs.uToast.show({
|
|
title: '您未登录,请先登录',
|
|
type: 'error',
|
|
duration: '1000',
|
|
url: '/pages/login/login'
|
|
})
|
|
}
|
|
|
|
}, 0)
|
|
},
|
|
//健康常识
|
|
gohealth() {
|
|
const value = uni.getStorageSync('openid');
|
|
const value2 = uni.getStorageSync('patientId');
|
|
if (value && value2) {
|
|
uni.navigateTo({
|
|
url: '/pagesB/Healthknowledge/Healthknowledge'
|
|
})
|
|
} else {
|
|
this.$refs.uToast.show({
|
|
title: '您未登录,请先登录',
|
|
type: 'error',
|
|
duration: '1000',
|
|
url: '/pages/login/login'
|
|
})
|
|
}
|
|
|
|
},
|
|
// 筛查结果
|
|
result() {
|
|
const value = uni.getStorageSync('openid');
|
|
const value2 = uni.getStorageSync('patientId');
|
|
if (value && value2) {
|
|
uni.navigateTo({
|
|
url: '/pagesB/SelectItem/SelectItem'
|
|
})
|
|
} else {
|
|
this.$refs.uToast.show({
|
|
title: '您未登录,请先登录',
|
|
type: 'error',
|
|
duration: '1000',
|
|
url: '/pages/login/login'
|
|
})
|
|
}
|
|
|
|
|
|
|
|
},
|
|
//跳转商城
|
|
goshopping() {
|
|
// this.openPopup();
|
|
setTimeout(e => {
|
|
const value = uni.getStorageSync('openid');
|
|
const value2 = uni.getStorageSync('patientId');
|
|
if (value && value2) {
|
|
uni.navigateTo({
|
|
url: '/pagesB/shopping/shopping'
|
|
})
|
|
} else {
|
|
this.$refs.uToast.show({
|
|
title: '您未登录,请先登录',
|
|
type: 'error',
|
|
duration: '1000',
|
|
url: '/pages/login/login'
|
|
})
|
|
}
|
|
|
|
}, 0)
|
|
},
|
|
//问诊平台
|
|
goconsultationplatform() {
|
|
const value = uni.getStorageSync('openid');
|
|
const value2 = uni.getStorageSync('patientId');
|
|
const value3 = uni.getStorageSync('region');
|
|
if (value && value2 &&value3!=3) {
|
|
uni.navigateTo({
|
|
url: '/pagesB/consultationplatform/consultationplatform',
|
|
})
|
|
} else if(!value && !value2) {
|
|
this.$refs.uToast.show({
|
|
title: '您未登录,请先登录',
|
|
type: 'error',
|
|
duration: '1000',
|
|
url: '/pages/login/login'
|
|
})
|
|
}else if(value3==3){
|
|
this.$refs.uToast.show({
|
|
title: '请重新选择区域',
|
|
type: 'error',
|
|
duration: '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,
|
|
}
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
@import "./medicalservice.scss";
|
|
</style>
|