2023-09-19 14:58:40 +08:00
|
|
|
<template>
|
2023-09-27 13:50:42 +08:00
|
|
|
<view class="app">
|
|
|
|
|
<view class="content">
|
|
|
|
|
<image src="/static/pageC/homepage.png" mode=""></image>
|
2023-10-09 13:29:39 +08:00
|
|
|
<view class="loginmount" @tap='gologin'>
|
2023-09-27 13:50:42 +08:00
|
|
|
<image src="/static/pageC/TAB.png" mode=""></image>
|
2023-09-28 17:06:51 +08:00
|
|
|
<text>你好,请登录</text>
|
2023-09-27 13:50:42 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="contentcenter">
|
2023-10-07 14:23:55 +08:00
|
|
|
<view class="home" @tap="goonline">
|
2023-09-27 13:50:42 +08:00
|
|
|
<image src="/static/pageC/qianyue.png" mode=""></image>
|
2023-09-27 14:05:46 +08:00
|
|
|
<view class="name">
|
2023-09-27 13:50:42 +08:00
|
|
|
家医签约
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-09-28 10:11:05 +08:00
|
|
|
<view class="home" @tap="goHealthrecords">
|
2023-09-27 13:50:42 +08:00
|
|
|
<image src="/static/pageC/health.png" mode=""></image>
|
2023-09-27 14:05:46 +08:00
|
|
|
<view class="name">
|
2023-09-27 13:50:42 +08:00
|
|
|
健康档案
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-09-28 10:11:05 +08:00
|
|
|
<view class="home" @tap="goappoint">
|
2023-09-27 14:24:06 +08:00
|
|
|
<image src="/static/pageC/serveappoint.png" mode=""></image>
|
2023-09-27 14:05:46 +08:00
|
|
|
<view class="name">
|
2023-09-27 13:50:42 +08:00
|
|
|
服务预约
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="home">
|
|
|
|
|
<image src="/static/pageC/exchange.png" mode=""></image>
|
2023-09-27 14:05:46 +08:00
|
|
|
<view class="name">
|
2023-09-27 13:50:42 +08:00
|
|
|
积分兑换
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-10-07 11:08:50 +08:00
|
|
|
<view class="home" @tap="myappointment">
|
2023-09-27 13:50:42 +08:00
|
|
|
<image src="/static/pageC/appointmen.png" mode=""></image>
|
2023-09-27 14:05:46 +08:00
|
|
|
<view class="name">
|
2023-09-27 13:50:42 +08:00
|
|
|
我的预约
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-10-07 11:08:50 +08:00
|
|
|
<view class="home" @tap="servicerecord">
|
2023-09-27 13:50:42 +08:00
|
|
|
<image src="/static/pageC/SERVERECOD.png" mode=""></image>
|
2023-09-27 14:05:46 +08:00
|
|
|
<view class="name">
|
2023-09-27 13:50:42 +08:00
|
|
|
服务记录
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="contentbottom">
|
|
|
|
|
<view class="health">
|
|
|
|
|
健康管理
|
|
|
|
|
</view>
|
|
|
|
|
<view class="item">
|
2023-10-08 13:19:49 +08:00
|
|
|
<view class="signmyself" @tap="sign">
|
2023-09-27 13:50:42 +08:00
|
|
|
<image src="/static/pageC/tizheng.png" mode=""></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="sign">
|
2023-10-08 17:03:35 +08:00
|
|
|
<image @tap="healthtest" src="/static/pageC/healthmyself.png" mode=""></image>
|
2023-09-28 10:11:05 +08:00
|
|
|
<image @tap="gorecords" src="/static/pageC/records.png" mode=""></image>
|
2023-09-27 13:50:42 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-09-19 14:58:40 +08:00
|
|
|
</view>
|
2023-10-09 13:29:39 +08:00
|
|
|
<u-toast ref="uToast" />
|
2023-09-19 14:58:40 +08:00
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-09-28 16:55:50 +08:00
|
|
|
import {
|
|
|
|
|
getOpenId,
|
|
|
|
|
getCurrentUser
|
|
|
|
|
} from '@/api/pages/homepage/homepage.js'
|
2023-09-19 14:58:40 +08:00
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2023-10-09 13:29:39 +08:00
|
|
|
openid: null,
|
2023-09-19 14:58:40 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad() {
|
2023-10-09 13:29:39 +08:00
|
|
|
// this.login()
|
|
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
this.openid = uni.getStorageSync('openid');
|
2023-09-19 14:58:40 +08:00
|
|
|
},
|
|
|
|
|
methods: {
|
2023-10-09 13:29:39 +08:00
|
|
|
nologin() {
|
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
|
title: '您未登录,请先登录',
|
|
|
|
|
type: 'error',
|
|
|
|
|
duration: '1000',
|
|
|
|
|
url: '/pages/login/login'
|
2023-10-07 14:23:55 +08:00
|
|
|
})
|
|
|
|
|
},
|
2023-10-09 13:29:39 +08:00
|
|
|
//家医签约
|
|
|
|
|
goonline() {
|
|
|
|
|
if (this.openid) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pagesB/mysigning/mysigning'
|
|
|
|
|
})
|
|
|
|
|
// uni.navigateTo({
|
|
|
|
|
// url: '/pagesC/Onlinesigning/Onlinesigning'
|
|
|
|
|
// })
|
|
|
|
|
} else {
|
|
|
|
|
this.nologin()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//健康档案
|
2023-09-28 10:11:05 +08:00
|
|
|
goHealthrecords() {
|
2023-10-09 13:29:39 +08:00
|
|
|
if (this.openid) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pagesC/Healthrecords/Healthrecords'
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.nologin()
|
|
|
|
|
}
|
2023-09-28 10:11:05 +08:00
|
|
|
},
|
2023-10-08 14:51:24 +08:00
|
|
|
// 筛查记录
|
2023-09-28 10:11:05 +08:00
|
|
|
gorecords() {
|
2023-10-09 13:29:39 +08:00
|
|
|
if (this.openid) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pagesC/Screeningrecords/Screeningrecords'
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.nologin()
|
|
|
|
|
}
|
2023-09-28 10:11:05 +08:00
|
|
|
},
|
2023-10-07 15:14:34 +08:00
|
|
|
// 健康自评
|
|
|
|
|
healthtest() {
|
2023-10-09 13:29:39 +08:00
|
|
|
if (this.openid) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pagesC/healthtest/healthtest'
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.nologin()
|
|
|
|
|
}
|
2023-10-07 15:14:34 +08:00
|
|
|
},
|
2023-10-08 13:19:49 +08:00
|
|
|
// 体征检测
|
2023-10-08 17:03:35 +08:00
|
|
|
sign() {
|
2023-10-09 13:29:39 +08:00
|
|
|
if (this.openid) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pagesC/Physicalexamination/Physicalexamination'
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.nologin()
|
|
|
|
|
}
|
2023-10-08 13:19:49 +08:00
|
|
|
},
|
2023-10-07 15:14:34 +08:00
|
|
|
// 服务预约
|
2023-09-27 16:26:09 +08:00
|
|
|
goappoint() {
|
2023-10-09 13:29:39 +08:00
|
|
|
if (this.openid) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pagesC/ServiceAppointment/ServiceAppointment'
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.nologin()
|
|
|
|
|
}
|
2023-09-27 16:26:09 +08:00
|
|
|
},
|
2023-10-07 11:08:50 +08:00
|
|
|
// 服务记录
|
2023-10-08 17:03:35 +08:00
|
|
|
servicerecord() {
|
2023-10-09 13:29:39 +08:00
|
|
|
if (this.openid) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pagesC/servicerecord/servicerecord'
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.nologin()
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-07 11:08:50 +08:00
|
|
|
},
|
|
|
|
|
// 我的预约
|
2023-10-08 17:03:35 +08:00
|
|
|
myappointment() {
|
2023-10-09 13:29:39 +08:00
|
|
|
if (this.openid) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: '/pagesC/Myappointment/Myappointment'
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.nologin()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
gologin() {
|
2023-10-07 11:08:50 +08:00
|
|
|
uni.navigateTo({
|
2023-10-09 13:29:39 +08:00
|
|
|
url: '/pages/login/login'
|
2023-10-07 11:08:50 +08:00
|
|
|
})
|
|
|
|
|
},
|
2023-09-26 11:09:18 +08:00
|
|
|
login() {
|
|
|
|
|
const _this = this
|
|
|
|
|
uni.login({
|
|
|
|
|
success(res) {
|
|
|
|
|
getOpenId(res.code).then(Res => {
|
2023-09-27 13:50:42 +08:00
|
|
|
if (Res.code == 200) {
|
2023-09-26 11:09:18 +08:00
|
|
|
_this.isWxBing(Res.msg, '1')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
isWxBing(openid, cityCode) {
|
|
|
|
|
getCurrentUser(openid, cityCode).then(res => {
|
|
|
|
|
console.log(res);
|
2023-09-27 13:50:42 +08:00
|
|
|
if (!res.data) {
|
2023-09-26 11:09:18 +08:00
|
|
|
// 注册
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
2023-09-19 14:58:40 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
2023-09-27 13:50:42 +08:00
|
|
|
<style lang="scss">
|
|
|
|
|
@import "./homepage.scss";
|
2023-10-09 13:29:39 +08:00
|
|
|
</style>
|