278 lines
7.1 KiB
Vue
278 lines
7.1 KiB
Vue
<template>
|
|
<view class="app">
|
|
<view class="address">
|
|
<!-- <image src="@/static/address.png" mode=""></image>
|
|
<text>
|
|
{{location?location:''}}
|
|
</text> -->
|
|
</view>
|
|
<view class="topbar">
|
|
<image :src="baseurl+ '/profile/weChatPicture/wenzhenpingtai.png'" @tap=" goconsultationplatform" />
|
|
<image :src="baseurl+ '/profile/weChatPicture/hulifuwu.png'" @tap="gosite" />
|
|
</view>
|
|
<view class="title">
|
|
常用服务
|
|
</view>
|
|
<view class="centerbar topbar">
|
|
<image :src="baseurl+ '/profile/weChatPicture/yuyueshaicha.png'" @tap="goAppointmentscreening" />
|
|
<image :src="baseurl+ '/profile/weChatPicture/shaichajieguo.png'" @tap="result" />
|
|
<image :src="baseurl+ '/profile/weChatPicture/jiankangshangcheng.png'" @tap="goshopping" />
|
|
<image :src="baseurl+ '/profile/weChatPicture/xinrenfuli.png'" @tap="gomaterialbenefits" />
|
|
</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 {
|
|
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 {
|
|
baseurl: '',
|
|
pageNum: 1,
|
|
pageSize: 5,
|
|
informationCategoryVOList: [], //咨询信息
|
|
patientId: '',
|
|
userInfo: null,
|
|
location: null,
|
|
cardNo: null,
|
|
};
|
|
},
|
|
onShow() {
|
|
this.pageNum = 1
|
|
this.patientId = uni.getStorageSync('patientId');
|
|
this.userInfo = uni.getStorageSync('userinfo')
|
|
this.cardNo = this.userInfo.cardNo
|
|
this.location = uni.getStorageSync('location')
|
|
this.getHeathHousing();
|
|
},
|
|
onLoad() {
|
|
this.baseurl = baseurl
|
|
},
|
|
methods: {
|
|
// 第一种 直接映射
|
|
...mapActions(["openPopup"]),
|
|
goAppointmentscreening() {
|
|
this.openPopup();
|
|
setTimeout(e => {
|
|
// 筛查预约
|
|
if (!this.userInfo) {
|
|
this.$refs.uToast.show({
|
|
title: res.msg,
|
|
type: '您未登录,请前往我的页面进行登录',
|
|
})
|
|
} else {
|
|
getScreening(this.cardNo).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}`
|
|
})
|
|
}
|
|
} else {
|
|
this.$refs.uToast.show({
|
|
title: res.msg,
|
|
type: 'error',
|
|
})
|
|
}
|
|
})
|
|
}
|
|
}, 0)
|
|
},
|
|
//跳转健康常识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',
|
|
})
|
|
}
|
|
},
|
|
// 健康常识
|
|
getHeathHousing() {
|
|
getHeathHousingList(this.pageNum, this.pageSize, uni.getStorageSync('userinfo').cardNo).then(res => {
|
|
if (res.rows) {
|
|
res.rows.forEach(e => {
|
|
e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl
|
|
})
|
|
}
|
|
this.informationCategoryVOList = res.rows
|
|
})
|
|
},
|
|
//新人福利
|
|
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',
|
|
})
|
|
}
|
|
}, 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',
|
|
})
|
|
}
|
|
}, 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',
|
|
})
|
|
}
|
|
},
|
|
// 筛查结果
|
|
result() {
|
|
this.openPopup();
|
|
setTimeout(e => {
|
|
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',
|
|
})
|
|
}
|
|
}, 50)
|
|
},
|
|
//跳转商城
|
|
goshopping() {
|
|
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',
|
|
})
|
|
}
|
|
}, 0)
|
|
},
|
|
//问诊平台
|
|
goconsultationplatform() {
|
|
this.openPopup();
|
|
setTimeout(e => {
|
|
const value = uni.getStorageSync('openid');
|
|
const value2 = uni.getStorageSync('patientId');
|
|
if (value && value2) {
|
|
uni.navigateTo({
|
|
url: '/pagesB/consultationplatform/consultationplatform',
|
|
})
|
|
} else {
|
|
this.$refs.uToast.show({
|
|
title: '您未登录,请前往我的页面进行登录',
|
|
type: 'error',
|
|
duration: '1000',
|
|
})
|
|
}
|
|
}, 0)
|
|
},
|
|
},
|
|
//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> |