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

280 lines
7.2 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">
2024-06-25 18:25:50 +08:00
<!-- <image src="@/static/address.png" mode=""></image>
2023-09-26 14:56:42 +08:00
<text>
2023-10-16 11:54:32 +08:00
{{location?location:''}}
2023-10-23 16:51:32 +08:00
</text> -->
2023-09-22 11:30:57 +08:00
</view>
2023-09-26 14:56:42 +08:00
<view class="topbar">
2024-06-25 18:25:50 +08:00
<image :src="baseurl+ '/profile/weChatPicture/wenzhenpingtai.png'" @tap=" goconsultationplatform" />
<image :src="baseurl+ '/profile/weChatPicture/hulifuwu.png'" @tap="gosite" />
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">
2024-06-25 18:25:50 +08:00
<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" />
2023-09-26 15:27:19 +08:00
</view>
<view class="title">
2023-11-14 10:26:10 +08:00
<text>健康资讯</text>
2023-09-26 15:39:25 +08:00
<view class="" @tap='gohealth'>
2023-09-26 15:27:19 +08:00
<text>
查看更多
</text>
2024-06-25 18:25:50 +08:00
<image src="@/static/huijiantou.png" mode=""></image>
2023-09-26 15:27:19 +08:00
</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-11-09 15:55:25 +08:00
<u-toast ref="uToast" />
2023-09-20 10:42:44 +08:00
</view>
</template>
<script>
2023-09-26 15:39:25 +08:00
import {
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 {
2024-06-25 18:25:50 +08:00
baseurl: '',
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-10-16 11:54:32 +08:00
location: null,
2024-02-20 10:49:16 +08:00
cardNo: 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')
2024-02-20 10:49:16 +08:00
this.cardNo = this.userInfo.cardNo
2023-10-16 11:54:32 +08:00
this.location = uni.getStorageSync('location')
2023-09-26 15:39:25 +08:00
this.getHeathHousing();
},
2024-06-25 18:25:50 +08:00
onLoad() {
this.baseurl = baseurl
},
2023-09-26 15:39:25 +08:00
methods: {
2023-11-15 14:14:12 +08:00
// 第一种 直接映射
...mapActions(["openPopup"]),
2023-10-12 11:24:37 +08:00
goAppointmentscreening() {
2023-11-15 14:14:12 +08:00
this.openPopup();
setTimeout(e => {
// 筛查预约
if (!this.userInfo) {
2024-07-10 09:10:50 +08:00
this.$refs.uToast.show({
title: res.msg,
type: '您未登录,请前往我的页面进行登录',
2023-11-15 14:14:12 +08:00
})
} else {
2024-02-05 11:27:19 +08:00
getScreening(this.cardNo).then(res => {
2023-11-15 14:14:12 +08:00
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}`
})
}
2024-05-12 08:49:21 +08:00
} else {
this.$refs.uToast.show({
title: res.msg,
type: 'error',
})
2023-11-15 10:47:50 +08:00
}
2023-11-15 14:14:12 +08:00
})
}
}, 0)
2023-10-08 16:16:18 +08:00
},
2023-09-26 15:39:25 +08:00
//跳转健康常识item
gohealthitem(item) {
2023-11-09 15:55:25 +08:00
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({
2024-05-17 09:30:34 +08:00
title: '您未登录,请前往我的页面进行登录',
2023-11-09 15:55:25 +08:00
type: 'error',
duration: '1000',
})
}
2023-09-26 15:39:25 +08:00
},
// 健康常识
getHeathHousing() {
2024-11-14 16:36:12 +08:00
getHeathHousingList(this.pageNum, this.pageSize, uni.getStorageSync('userinfo').cardNo).then(res => {
2023-09-26 15:39:25 +08:00
if (res.rows) {
2024-11-15 16:44:26 +08:00
if (uni.getStorageSync('region') != 1) {
res.rows.forEach(e => {
e.leadThumbnailUrl = baseurl + e.leadThumbnailUrl
})
}
2023-09-26 15:39:25 +08:00
}
this.informationCategoryVOList = res.rows
})
},
//新人福利
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 => {
2023-11-09 15:55:25 +08:00
const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
url: '/pagesB/materialbenefits/materialbenefits'
})
} else {
this.$refs.uToast.show({
2024-05-17 09:30:34 +08:00
title: '您未登录,请前往我的页面进行登录',
2023-11-09 15:55:25 +08:00
type: 'error',
duration: '1000',
})
}
2023-09-26 15:39:25 +08:00
}, 0)
},
//跳转护理站页面
gosite() {
2023-10-09 10:40:10 +08:00
// this.openPopup();
2023-09-26 15:39:25 +08:00
setTimeout(e => {
2023-11-09 15:55:25 +08:00
const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
url: '/pagesB/site/site'
})
} else {
this.$refs.uToast.show({
2024-05-17 09:30:34 +08:00
title: '您未登录,请前往我的页面进行登录',
2023-11-09 15:55:25 +08:00
type: 'error',
duration: '1000',
})
}
2023-09-26 15:39:25 +08:00
}, 0)
},
//健康常识
gohealth() {
2023-11-09 15:55:25 +08:00
const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
url: '/pagesB/Healthknowledge/Healthknowledge'
})
} else {
this.$refs.uToast.show({
2024-05-17 09:30:34 +08:00
title: '您未登录,请前往我的页面进行登录',
2023-11-09 15:55:25 +08:00
type: 'error',
duration: '1000',
})
}
2023-10-08 14:48:39 +08:00
},
// 筛查结果
2023-10-12 11:24:37 +08:00
result() {
2023-11-15 14:14:12 +08:00
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({
2024-05-17 09:30:34 +08:00
title: '您未登录,请前往我的页面进行登录',
2023-11-15 14:14:12 +08:00
type: 'error',
duration: '1000',
})
}
}, 50)
2023-09-26 15:39:25 +08:00
},
//跳转商城
goshopping() {
setTimeout(e => {
2023-11-09 15:55:25 +08:00
const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId');
if (value && value2) {
uni.navigateTo({
url: '/pagesB/shopping/shopping'
})
} else {
this.$refs.uToast.show({
2024-05-17 09:30:34 +08:00
title: '您未登录,请前往我的页面进行登录',
2023-11-09 15:55:25 +08:00
type: 'error',
duration: '1000',
})
}
2023-09-26 15:39:25 +08:00
}, 0)
},
2023-09-26 16:42:18 +08:00
//问诊平台
goconsultationplatform() {
2023-11-15 14:14:12 +08:00
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({
2024-05-17 09:30:34 +08:00
title: '您未登录,请前往我的页面进行登录',
2023-11-15 14:14:12 +08:00
type: 'error',
duration: '1000',
})
}
}, 0)
2023-09-26 16:42:18 +08:00
},
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-11-15 14:14:12 +08:00
</style>