xinelu-applet-ui/pages/medicalservice/medicalservice.vue

207 lines
4.9 KiB
Vue
Raw Normal View History

2023-09-20 10:42:44 +08:00
<template>
2023-09-22 11:30:57 +08:00
<view class="app">
2023-09-26 14:56:42 +08:00
<view class="address">
<image src="../../static/pages/address.png" mode=""></image>
<text>
济南市
</text>
2023-09-22 11:30:57 +08:00
</view>
2023-09-26 14:56:42 +08:00
<view class="topbar">
2023-09-26 16:42:18 +08:00
<image src="../../static/pages/wenzhenpingtai.png" mode="" @tap="goconsultationplatform"></image>
2023-09-26 15:39:25 +08:00
<image src="../../static/pages/hulifuwu.png" mode="" @tap="gosite"></image>
2023-09-22 11:30:57 +08:00
</view>
2023-09-26 15:27:19 +08:00
<view class="title">
常用服务
</view>
<view class="centerbar topbar">
2023-10-08 16:16:18 +08:00
<image src="../../static/pages/yuyueshaicha.png" mode="" @tap="goAppointmentscreening"></image>
2023-10-08 14:48:39 +08:00
<image src="../../static/pages/shaichajieguo.png" mode="" @tap="result"></image>
2023-09-26 15:39:25 +08:00
<image src="../../static/pages/jiankangshangcheng.png" mode="" @tap="goshopping"></image>
<image src="../../static/pages/xinrenfuli.png" mode="" @tap="gomaterialbenefits"></image>
2023-09-26 15:27:19 +08:00
</view>
<view class="title">
<text>健康咨询</text>
2023-09-26 15:39:25 +08:00
<view class="" @tap='gohealth'>
2023-09-26 15:27:19 +08:00
<text>
查看更多
</text>
<image src="../../static/huijiantou.png" mode=""></image>
</view>
</view>
<view class="list">
2023-09-26 15:39:25 +08:00
<view class="item" v-for="(item,index) in informationCategoryVOList" :key="index" @tap='gohealthitem(item)'>
2023-09-26 15:27:19 +08:00
<view class="text">
2023-09-26 15:39:25 +08:00
{{item.informationTitle}}
2023-09-26 15:27:19 +08:00
</view>
<view class="author"></view>
2023-09-26 15:39:25 +08:00
<image :src="item.leadThumbnailUrl" mode=""></image>
2023-09-26 15:27:19 +08:00
</view>
</view>
2023-09-20 10:42:44 +08:00
</view>
</template>
<script>
2023-09-26 15:39:25 +08:00
import {
mapState,
mapActions
} from "vuex";
import {
2023-10-10 14:01:25 +08:00
getPoserInfoListByType,
getScreening
2023-09-26 15:39:25 +08:00
} from '@/api/pages/medicalservice/index.js'
import {
getHeathHousingList
} from '@/api/pagesB/Healthknowledge/index.js'
import baseurl from '../../api/baseurl';
2023-09-20 10:42:44 +08:00
export default {
data() {
return {
2023-09-26 15:39:25 +08:00
pageNum: 1,
pageSize: 5,
informationCategoryVOList: [], //咨询信息
2023-10-12 11:24:37 +08:00
patientId: '',
userInfo: null,
2023-09-20 10:42:44 +08:00
};
2023-09-26 15:39:25 +08:00
},
onShow() {
this.pageNum = 1
2023-10-12 11:24:37 +08:00
this.patientId = uni.getStorageSync('patientId');
this.userInfo = uni.getStorageSync('userinfo')
2023-09-26 15:39:25 +08:00
this.getHeathHousing();
},
methods: {
2023-10-12 11:24:37 +08:00
goAppointmentscreening() {
2023-10-10 14:01:25 +08:00
// 筛查预约
2023-10-12 11:24:37 +08:00
if (!this.userInfo) {
uni.showModal({
title: "提示",
content: "您还未注册,是否去注册?",
confirmText: '是',
cancelText: '否',
success(res) {
if (res.confirm) {
uni.redirectTo({
url: "/pages/register/register"
})
} else {
wx.exitMiniProgram()
2023-10-10 14:01:25 +08:00
}
2023-10-12 11:24:37 +08:00
},
})
} else {
getScreening(this.patientId).then(res => {
if (res.code == 200) {
2023-10-13 15:41:07 +08:00
let userinfo = JSON.stringify(this.userInfo)
if (!res.data||res.data==null) {
2023-10-12 11:24:37 +08:00
uni.navigateTo({
url: `/pagesB/screenorder/screenorder?userinfo=${userinfo}`
})
} else {
uni.navigateTo({
url: `/pagesB/orderlist/orderlist?userinfo=${userinfo}`
})
}
}
})
}
2023-10-10 14:01:25 +08:00
// uni.navigateTo({
// url: '/pagesB/screenorder/screenorder'
// })
2023-10-10 17:15:30 +08:00
// uni.navigateTo({
// url: '/pagesB/orderlist/orderlist'
// })
2023-10-08 16:16:18 +08:00
},
2023-09-26 15:39:25 +08:00
//跳转健康常识item
gohealthitem(item) {
uni.navigateTo({
url: `/pagesB/Healthitem/Healthitem?item=${encodeURIComponent(JSON.stringify(item))}`
})
},
// 健康常识
getHeathHousing() {
getHeathHousingList(this.pageNum, this.pageSize).then(res => {
if (res.rows) {
res.rows.forEach(e => {
2023-10-13 15:41:07 +08:00
e.leadThumbnailUrl = baseurl+ e.leadThumbnailUrl
2023-09-26 15:39:25 +08:00
})
}
this.informationCategoryVOList = res.rows
})
},
//新人福利
// 第一种 直接映射
...mapActions(["openPopup"]),
gomaterialbenefits() {
// 第二种引入
// this.$store.dispatch("openPopup");
2023-10-09 10:40:10 +08:00
// this.openPopup();
2023-09-26 15:39:25 +08:00
setTimeout(e => {
uni.navigateTo({
url: '/pagesB/materialbenefits/materialbenefits'
})
}, 0)
},
//跳转护理站页面
gosite() {
2023-10-09 10:40:10 +08:00
// this.openPopup();
2023-09-26 15:39:25 +08:00
setTimeout(e => {
uni.navigateTo({
url: '/pagesB/site/site'
})
}, 0)
},
//健康常识
gohealth() {
uni.navigateTo({
url: '/pagesB/Healthknowledge/Healthknowledge'
})
2023-10-08 14:48:39 +08:00
},
// 筛查结果
2023-10-12 11:24:37 +08:00
result() {
2023-10-09 10:40:10 +08:00
uni.navigateTo({
2023-10-10 17:35:36 +08:00
url: '/pagesB/SelectItem/SelectItem'
2023-10-09 10:40:10 +08:00
})
2023-10-08 16:16:18 +08:00
2023-09-26 15:39:25 +08:00
},
//跳转商城
goshopping() {
2023-10-09 10:40:10 +08:00
// this.openPopup();
2023-09-26 15:39:25 +08:00
setTimeout(e => {
uni.navigateTo({
url: '/pagesB/shopping/shopping'
})
}, 0)
},
2023-09-26 16:42:18 +08:00
//问诊平台
goconsultationplatform() {
uni.navigateTo({
url: '/pagesB/consultationplatform/consultationplatform',
})
},
2023-09-26 15:39:25 +08:00
},
//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,
}
},
2023-09-20 10:42:44 +08:00
}
</script>
2023-09-26 14:56:42 +08:00
2023-09-20 10:42:44 +08:00
<style lang="scss">
2023-09-26 15:27:19 +08:00
@import "./medicalservice.scss";
2023-10-13 15:41:07 +08:00
</style>