首页修改+签约信息跳转

This commit is contained in:
shidongli 2023-10-31 10:20:40 +08:00
parent a0c54b7d99
commit 55c14baf4d
2 changed files with 156 additions and 50 deletions

View File

@ -81,7 +81,6 @@
<script> <script>
import { import {
getOpenId, getOpenId,
getCurrentUser,
detail, detail,
checkSignApply checkSignApply
} from '@/api/pages/homepage/homepage.js' } from '@/api/pages/homepage/homepage.js'
@ -89,10 +88,14 @@
data() { data() {
return { return {
patientName: '', patientName: '',
userinfo: null, userinfo: {
cityCode: "",
},
region: '', region: '',
checkSign: null, checkSign: null,
address: '', address: '',
openid: '',
} }
}, },
onLoad() { onLoad() {
@ -100,6 +103,10 @@
}, },
onShow() { onShow() {
this.address = uni.getStorageSync('location') this.address = uni.getStorageSync('location')
this.userinfo = uni.getStorageSync('userinfo')
this.openid = uni.getStorageSync('openid');
this.cityCode = this.userinfo.cityCode;
if (this.address == '德州市') { if (this.address == '德州市') {
uni.setStorageSync("region", 1) uni.setStorageSync("region", 1)
} else if (this.address == '东营市') { } else if (this.address == '东营市') {
@ -107,7 +114,16 @@
} else if (this.address == '济南市') { } else if (this.address == '济南市') {
uni.setStorageSync("region", 3) uni.setStorageSync("region", 3)
} }
this.userinfo = uni.getStorageSync('userinfo'); this.region = uni.getStorageSync('region')
if (this.region) {
if (this.region == "1" || this.region == "2") {
} else {
this.family()
}
}
if (this.userinfo) { if (this.userinfo) {
this.patientName = this.userinfo.patientName this.patientName = this.userinfo.patientName
checkSignApply(this.userinfo.cardNo).then(res => { checkSignApply(this.userinfo.cardNo).then(res => {
@ -123,6 +139,7 @@
} }
}, },
methods: { methods: {
city() { city() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/location/location' url: '/pages/location/location'
@ -134,6 +151,7 @@
url: "/pages/login/login" url: "/pages/login/login"
}) })
}, },
gologin() { gologin() {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '您未登录,请先登录', title: '您未登录,请先登录',
@ -142,11 +160,25 @@
url: '/pages/login/login' url: '/pages/login/login'
}) })
}, },
//
family() {
this.$refs.uToast.show({
title: '请切换城市,再操作家医相关功能',
type: 'error',
duration: '3000',
})
},
// //
goonline() { goonline() {
if (!this.userinfo) { if (!this.userinfo) {
this.gologin(); this.gologin();
} else { } else {
if (this.region == "3") {
this.family()
} else{
if (this.cityCode == "1" || this.cityCode == "2") {
if (!this.checkSign) { if (!this.checkSign) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '未签约,请先签约', title: '未签约,请先签约',
@ -159,6 +191,14 @@
url: "/pagesB/mysigning/mysigning" url: "/pagesB/mysigning/mysigning"
}) })
} }
} else {
this.family()
}
}
} }
}, },
// //
@ -166,6 +206,10 @@
if (!this.userinfo) { if (!this.userinfo) {
this.gologin(); this.gologin();
} else { } else {
if (this.region == "3") {
this.family()
} else{
if (this.cityCode == "1" || this.cityCode == "2") {
if (!this.checkSign) { if (!this.checkSign) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '未签约,请先签约', title: '未签约,请先签约',
@ -178,6 +222,16 @@
url: '/pagesB/Behaviorpoints/Behaviorpoints' url: '/pagesB/Behaviorpoints/Behaviorpoints'
}) })
} }
} else {
this.family()
}
}
} }
}, },
// //
@ -188,6 +242,9 @@
uni.navigateTo({ uni.navigateTo({
url: "/pagesC/Healthrecords/Healthrecords" url: "/pagesC/Healthrecords/Healthrecords"
}) })
} }
}, },
// //
@ -231,6 +288,10 @@
if (!this.userinfo) { if (!this.userinfo) {
this.gologin(); this.gologin();
} else { } else {
if (this.region == "3") {
this.family()
} else {
if (this.cityCode == "1" || this.cityCode == "2") {
if (!this.checkSign) { if (!this.checkSign) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '未签约,请先签约', title: '未签约,请先签约',
@ -243,6 +304,20 @@
url: "/pagesC/ServiceAppointment/ServiceAppointment" url: "/pagesC/ServiceAppointment/ServiceAppointment"
}) })
} }
} else {
this.family()
}
}
// }
} }
}, },
// //
@ -250,9 +325,21 @@
if (!this.userinfo) { if (!this.userinfo) {
this.gologin(); this.gologin();
} else { } else {
if (this.region == "3") {
this.family()
} else{
if (this.cityCode == "1" || this.cityCode == "2") {
uni.navigateTo({ uni.navigateTo({
url: "/pagesC/servicerecord/servicerecord" url: "/pagesC/servicerecord/servicerecord"
}) })
} else {
this.family()
}
}
} }
}, },
// //
@ -260,6 +347,10 @@
if (!this.userinfo) { if (!this.userinfo) {
this.gologin(); this.gologin();
} else { } else {
if (this.region == "3") {
this.family()
} else{
if (this.cityCode == "1" || this.cityCode == "2") {
if (!this.checkSign) { if (!this.checkSign) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '未签约,请先签约', title: '未签约,请先签约',
@ -272,6 +363,15 @@
url: "/pagesC/Myappointment/Myappointment" url: "/pagesC/Myappointment/Myappointment"
}) })
} }
} else {
this.family()
}
}
} }
}, },
} }

View File

@ -139,7 +139,7 @@
<image src="../../static/huijiantou.png" mode=""></image> <image src="../../static/huijiantou.png" mode=""></image>
</view> </view>
</view> </view>
<view class="myorder titles"> <view class="myorder titles" @tap="Signing">
<view class="title"> <view class="title">
签约信息 签约信息
</view> </view>
@ -350,6 +350,12 @@
}) })
}, },
//
Signing(){
uni.navigateTo({
url:'/pagesB/mysigning/mysigning'
})
},
// //
gologin() { gologin() {
this.$refs.uToast.show({ this.$refs.uToast.show({