419 lines
10 KiB
Vue
419 lines
10 KiB
Vue
<template>
|
|
<view class="app">
|
|
<view class="content">
|
|
<!-- <image src="/static/pageC/homepage.png" mode=""></image> -->
|
|
<image :src="baseurl+ '/profile/weChatPicture/mainPage.png'" mode=""></image>
|
|
<view class="loginmount" @tap="city">
|
|
<image src="../../static/pages/address.png" mode=""></image>
|
|
<text>
|
|
{{address?address:'请选择城市'}}
|
|
</text>
|
|
</view>
|
|
</view>
|
|
<view class="contentcenter" :style="Number(region)==2?'':'height:500rpx'">
|
|
<view class="home" @tap="goonline">
|
|
<image src="@/static/qianyue.png" mode=""></image>
|
|
<view class="name">
|
|
家医签约
|
|
</view>
|
|
</view>
|
|
<view class="home" @tap="goHealthrecords">
|
|
<image src="@/static/health.png" mode=""></image>
|
|
<view class="name">
|
|
健康档案
|
|
</view>
|
|
</view>
|
|
<view class="home" @tap="goappoint">
|
|
<image src="@/static/serveappoint.png" mode=""></image>
|
|
<view class="name">
|
|
服务预约
|
|
</view>
|
|
</view>
|
|
<view class="home" @tap="count" v-if='region==2'>
|
|
<image src="@/static/dyexchange.png" mode=""></image>
|
|
<view class="name">
|
|
东营市健康银行
|
|
</view>
|
|
</view>
|
|
<view class="home" @tap="count" v-if='region!=2'>
|
|
<image src="@/static/exchange.png" mode=""></image>
|
|
<view class="name">
|
|
积分兑换
|
|
</view>
|
|
</view>
|
|
<view class="home" @tap="myappointment">
|
|
<image src="@/static/appointmen.png" mode=""></image>
|
|
<view class="name">
|
|
我的预约
|
|
</view>
|
|
</view>
|
|
<view class="home" @tap="servicerecord">
|
|
<image src="@/static/SERVERECOD.png" mode=""></image>
|
|
<view class="name">
|
|
服务记录
|
|
</view>
|
|
</view>
|
|
<view class="home" @tap='gointegration' v-if="Number(region)==2">
|
|
<image src="@/static/zhaohufangan.png" mode=""></image>
|
|
<view class="name">
|
|
一体化照护方案
|
|
</view>
|
|
</view>
|
|
<view class="home" @tap='gonurseRecord' v-if="Number(region)==2">
|
|
<image src="@/static/zhaohujilu.png" mode=""></image>
|
|
<view class="name">
|
|
照护记录
|
|
</view>
|
|
</view>
|
|
<view class="home" v-if="Number(region)==2">
|
|
</view>
|
|
</view>
|
|
<view class="contentbottom">
|
|
<view class="health">
|
|
健康管理
|
|
</view>
|
|
<view class="item">
|
|
<view class="signmyself" @tap="sign">
|
|
<image src="@/static/tizheng.png" mode=""></image>
|
|
</view>
|
|
<view class="sign">
|
|
<image @tap="healthtest" src="@/static/healthmyself.png" mode=""></image>
|
|
<image @tap="gorecords" src="@/static/records.png" mode=""></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<u-toast ref="uToast" />
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
getOpenId,
|
|
detail,
|
|
checkSignApply
|
|
} from '@/api/pages/homepage/homepage.js'
|
|
import {
|
|
mapActions
|
|
} from "vuex";
|
|
import baseurl from '@/api/baseurl.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
userinfo: null,
|
|
infotitle: null,
|
|
region: '',
|
|
checkSign: null,
|
|
address: '',
|
|
openid: '',
|
|
baseurl: '',
|
|
}
|
|
},
|
|
onLoad() {},
|
|
onShow() {
|
|
this.baseurl = baseurl
|
|
this.userinfo = uni.getStorageSync('userinfo')
|
|
this.address = uni.getStorageSync('location')
|
|
this.openid = uni.getStorageSync('openid');
|
|
this.region = Number(uni.getStorageSync('region'))
|
|
if (this.userinfo && this.region != 3) {
|
|
checkSignApply(this.userinfo.cardNo).then(res => {
|
|
if (res.data) {
|
|
this.checkSign = res.data.code
|
|
this.infotitle = res.data.info
|
|
}
|
|
})
|
|
} else {}
|
|
},
|
|
methods: {
|
|
...mapActions(["openPopup"]),
|
|
//跳转选择地址
|
|
city() {
|
|
uni.navigateTo({
|
|
url: '/pagesB/location/location'
|
|
})
|
|
},
|
|
// 登录
|
|
login() {
|
|
uni.navigateTo({
|
|
url: "/pages/login/login"
|
|
})
|
|
},
|
|
//照护方案
|
|
gointegration() {
|
|
if (!this.userinfo) {
|
|
this.gologin();
|
|
} else {
|
|
uni.navigateTo({
|
|
url: '/pagesC/integration/integration'
|
|
})
|
|
}
|
|
},
|
|
// 照护记录
|
|
gonurseRecord() {
|
|
if (!this.userinfo) {
|
|
this.gologin();
|
|
} else {
|
|
uni.navigateTo({
|
|
url: '/pagesC/nurseRecord/nurseRecord'
|
|
})
|
|
}
|
|
},
|
|
gologin() {
|
|
this.$refs.uToast.show({
|
|
title: '您未登录,请先登录',
|
|
type: 'error',
|
|
duration: '1000',
|
|
url: '/pages/login/login'
|
|
})
|
|
},
|
|
// 家医功能提示
|
|
family() {
|
|
this.$refs.uToast.show({
|
|
title: '当前绑定地市不支持,请点击左上角选择城市',
|
|
type: 'error',
|
|
duration: '1500',
|
|
})
|
|
},
|
|
// 家医签约
|
|
goonline() {
|
|
this.openPopup();
|
|
setTimeout(e => {
|
|
if (!this.userinfo) {
|
|
this.gologin();
|
|
} else if (this.userinfo) {
|
|
if (this.region == 3) {
|
|
this.family()
|
|
} else {
|
|
if (this.region == 1 || this.region == 2) {
|
|
if (this.checkSign == "0") {
|
|
uni.navigateTo({
|
|
url: `/pagesC/Onlinesigning/Onlinesigning?checkSign=${this.checkSign}`,
|
|
})
|
|
// this.$refs.uToast.show({
|
|
// title: '未签约,请先签约',
|
|
// type: 'error',
|
|
// duration:'1500',
|
|
// url: "/pagesC/Onlinesigning/Onlinesigning"
|
|
// })
|
|
} else if (this.checkSign == "01") {
|
|
this.$refs.uToast.show({
|
|
title: this.infotitle,
|
|
duration: '1500',
|
|
type: 'error',
|
|
})
|
|
} else {
|
|
uni.navigateTo({
|
|
url: "/pagesB/mysigning/mysigning"
|
|
})
|
|
}
|
|
} else {
|
|
this.family()
|
|
}
|
|
}
|
|
}
|
|
}, 50)
|
|
},
|
|
// 积分兑换
|
|
count() {
|
|
if (!this.userinfo) {
|
|
this.gologin();
|
|
} else {
|
|
if (this.region == 3) {
|
|
this.family()
|
|
} else {
|
|
if (this.region == 1 || this.region == 2) {
|
|
if (this.checkSign == "0") {
|
|
uni.navigateTo({
|
|
url: `/pagesC/Onlinesigning/Onlinesigning?checkSign=${this.checkSign}`,
|
|
})
|
|
// this.$refs.uToast.show({
|
|
// title: '未签约,请先签约',
|
|
// type: 'error',
|
|
// duration:'1500',
|
|
// url: "/pagesC/Onlinesigning/Onlinesigning"
|
|
// })
|
|
} else if (this.checkSign == "01") {
|
|
this.$refs.uToast.show({
|
|
title: this.infotitle,
|
|
type: 'error',
|
|
duration: '1500',
|
|
})
|
|
} else {
|
|
uni.navigateTo({
|
|
url: '/pagesB/Behaviorpoints/Behaviorpoints'
|
|
})
|
|
}
|
|
} else {
|
|
this.family()
|
|
}
|
|
}
|
|
}
|
|
},
|
|
// 健康档案
|
|
goHealthrecords() {
|
|
if (!this.userinfo) {
|
|
this.gologin();
|
|
} else {
|
|
if (this.region == 3) {
|
|
this.family()
|
|
} else {
|
|
uni.navigateTo({
|
|
url: "/pagesC/Healthrecords/Healthrecords"
|
|
})
|
|
}
|
|
}
|
|
},
|
|
// 筛查记录
|
|
gorecords() {
|
|
uni.navigateTo({
|
|
url: "/pagesC/Screeningrecords/Screeningrecords"
|
|
})
|
|
// if (!this.userinfo) {
|
|
// this.gologin();
|
|
// } else {
|
|
// uni.navigateTo({
|
|
// url: "/pagesC/Screeningrecords/Screeningrecords"
|
|
// })
|
|
// }
|
|
},
|
|
// 健康自评
|
|
healthtest() {
|
|
if (!this.userinfo) {
|
|
this.gologin();
|
|
} else {
|
|
uni.navigateTo({
|
|
url: "/pagesC/healthtest/healthtest"
|
|
})
|
|
}
|
|
},
|
|
// 体征检测
|
|
sign() {
|
|
uni.navigateTo({
|
|
url: "/pagesC/Physicalexamination/Physicalexamination"
|
|
})
|
|
// if (!this.userinfo) {
|
|
// this.gologin();
|
|
// } else {
|
|
// uni.navigateTo({
|
|
// url: "/pagesC/Physicalexamination/Physicalexamination"
|
|
// })
|
|
// }
|
|
},
|
|
// 服务预约
|
|
goappoint() {
|
|
this.openPopup();
|
|
setTimeout(e => {
|
|
if (!this.userinfo) {
|
|
this.gologin();
|
|
} else {
|
|
if (this.region == 3) {
|
|
this.family()
|
|
} else {
|
|
if (this.region == 1 || this.region == 2) {
|
|
if (this.checkSign == "0") {
|
|
uni.navigateTo({
|
|
url: `/pagesC/Onlinesigning/Onlinesigning?checkSign=${this.checkSign}`,
|
|
})
|
|
// this.$refs.uToast.show({
|
|
// title: '未签约,请先签约',
|
|
// type: 'error',
|
|
// duration:'1500',
|
|
// url: "/pagesC/Onlinesigning/Onlinesigning"
|
|
// })
|
|
} else if (this.checkSign == "01") {
|
|
this.$refs.uToast.show({
|
|
title: this.infotitle,
|
|
duration: '1500',
|
|
type: 'error',
|
|
})
|
|
} else {
|
|
uni.navigateTo({
|
|
url: "/pagesC/ServiceAppointment/ServiceAppointment"
|
|
})
|
|
}
|
|
} else {
|
|
this.family()
|
|
}
|
|
}
|
|
}
|
|
}, 50)
|
|
},
|
|
// 服务记录
|
|
servicerecord() {
|
|
if (!this.userinfo) {
|
|
this.gologin();
|
|
} else {
|
|
if (this.region == 3) {
|
|
this.family()
|
|
} else {
|
|
if (this.region == 1 || this.region == 2) {
|
|
if (this.checkSign == "0") {
|
|
uni.navigateTo({
|
|
url: `/pagesC/Onlinesigning/Onlinesigning?checkSign=${this.checkSign}`,
|
|
})
|
|
// this.$refs.uToast.show({
|
|
// title: '未签约,请先签约',
|
|
// duration:'1500',
|
|
// type: 'error',
|
|
// url: "/pagesC/Onlinesigning/Onlinesigning"
|
|
// })
|
|
} else if (this.checkSign == "01") {
|
|
this.$refs.uToast.show({
|
|
title: this.infotitle,
|
|
type: 'error',
|
|
duration: '1500',
|
|
})
|
|
} else {
|
|
uni.navigateTo({
|
|
url: "/pagesC/servicerecord/servicerecord"
|
|
})
|
|
}
|
|
} else {
|
|
this.family()
|
|
}
|
|
}
|
|
}
|
|
},
|
|
// 我的预约
|
|
myappointment() {
|
|
if (!this.userinfo) {
|
|
this.gologin();
|
|
} else {
|
|
if (this.region == 3) {
|
|
this.family()
|
|
} else {
|
|
if (this.region == 1 || this.region == 2) {
|
|
if (this.checkSign == "0") {
|
|
uni.navigateTo({
|
|
url: `/pagesC/Onlinesigning/Onlinesigning?checkSign=${this.checkSign}`,
|
|
})
|
|
// this.$refs.uToast.show({
|
|
// title: '未签约,请先签约',
|
|
// type: 'error',
|
|
// duration:'1500',
|
|
// url: "/pagesC/Onlinesigning/Onlinesigning"
|
|
// })
|
|
} else if (this.checkSign == "01") {
|
|
this.$refs.uToast.show({
|
|
title: this.infotitle,
|
|
type: 'error',
|
|
duration: '1500',
|
|
})
|
|
} else {
|
|
uni.navigateTo({
|
|
url: "/pagesC/Myappointment/Myappointment"
|
|
})
|
|
}
|
|
} else {
|
|
this.family()
|
|
}
|
|
}
|
|
}
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
@import "./homepage.scss";
|
|
</style> |