首页判断

This commit is contained in:
shidongli 2023-11-10 13:57:44 +08:00
parent 4ba7fd8919
commit c1c9243f30

View File

@ -59,6 +59,12 @@
服务记录 服务记录
</view> </view>
</view> </view>
<view class="home">
<!-- <image src="/static/pageC/health.png" mode=""></image>
<view class="name">
健康档案
</view> -->
</view>
</view> </view>
<view class="contentbottom"> <view class="contentbottom">
<view class="health"> <view class="health">
@ -104,7 +110,7 @@
this.openid = uni.getStorageSync('openid'); this.openid = uni.getStorageSync('openid');
if (uni.getStorageSync('userinfo')) { if (uni.getStorageSync('userinfo')) {
this.userinfo = uni.getStorageSync('userinfo') this.userinfo = uni.getStorageSync('userinfo')
this.cityCode = Number(this.userinfo.cityCode); // this.cityCode = this.userinfo.cityCode;
} }
if (this.address == '德州市') { if (this.address == '德州市') {
uni.setStorageSync("region", 1) uni.setStorageSync("region", 1)
@ -167,7 +173,7 @@
if (this.region == 3) { if (this.region == 3) {
this.family() this.family()
} else { } else {
if (this.cityCode == 1 || this.cityCode == 2) { if (this.region == 1 || this.region == 2) {
if (this.checkSign == "0") { if (this.checkSign == "0") {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '未签约,请先签约', title: '未签约,请先签约',
@ -198,7 +204,7 @@
if (this.region == 3) { if (this.region == 3) {
this.family() this.family()
} else { } else {
if (this.cityCode == 1 || this.cityCode == 2) { if (this.region == 1 || this.region == 2) {
if (this.checkSign == "0") { if (this.checkSign == "0") {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: this.infotitle, title: this.infotitle,
@ -210,7 +216,8 @@
title: this.infotitle, title: this.infotitle,
type: 'error', type: 'error',
}) })
} else { }
else {
uni.navigateTo({ uni.navigateTo({
url: '/pagesB/Behaviorpoints/Behaviorpoints' url: '/pagesB/Behaviorpoints/Behaviorpoints'
}) })
@ -272,10 +279,10 @@
if (!this.userinfo) { if (!this.userinfo) {
this.gologin(); this.gologin();
} else { } else {
// if (this.region == 3) { if (this.region == 3) {
// this.family() this.family()
// } else { } else {
// if (this.cityCode == 1 || this.cityCode == 2) { if (this.region == 1 || this.region == 2) {
if (this.checkSign == "0") { if (this.checkSign == "0") {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '未签约,请先签约', title: '未签约,请先签约',
@ -292,11 +299,10 @@
url: "/pagesC/ServiceAppointment/ServiceAppointment" url: "/pagesC/ServiceAppointment/ServiceAppointment"
}) })
} }
// } else { } else {
// this.family() this.family()
// } }
// } }
// }
} }
}, },
// //
@ -307,7 +313,7 @@
if (this.region == 3) { if (this.region == 3) {
this.family() this.family()
} else { } else {
if (this.cityCode == 1 || this.cityCode == 2) { if (this.region == 1 || this.region == 2) {
if (this.checkSign == "0") { if (this.checkSign == "0") {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '未签约,请先签约', title: '未签约,请先签约',
@ -338,7 +344,7 @@
if (this.region == 3) { if (this.region == 3) {
this.family() this.family()
} else { } else {
if (this.cityCode == 1 || this.cityCode == 2) { if (this.region == 1 || this.region == 2) {
if (this.checkSign == "0") { if (this.checkSign == "0") {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '未签约,请先签约', title: '未签约,请先签约',
@ -368,3 +374,4 @@
<style lang="scss"> <style lang="scss">
@import "./homepage.scss"; @import "./homepage.scss";
</style> </style>