diff --git a/pages/myinformation/myinformation.vue b/pages/myinformation/myinformation.vue index ba249dd..8db9679 100644 --- a/pages/myinformation/myinformation.vue +++ b/pages/myinformation/myinformation.vue @@ -513,15 +513,27 @@ }, // 切换家庭成员 homeshow() { - this.showhome = true - this.getpersnoal() - // this.myInfo() + const value = uni.getStorageSync('userinfo'); + const value2 = uni.getStorageSync('patientId'); + if (value && value2) { + this.showhome = true + this.getpersnoal() + // this.myInfo() + } else { + this.gologin(); + } }, //管理家庭成员 gomanagefamily() { - uni.navigateTo({ - url: '/pagesB/managefamily/managefamily' - }) + const value = uni.getStorageSync('userinfo'); + const value2 = uni.getStorageSync('patientId'); + if (value && value2) { + uni.navigateTo({ + url: '/pagesB/managefamily/managefamily' + }) + } else { + this.gologin(); + } }, // 添加家庭成员 addFamilyItem() { diff --git a/pagesB/location/location.vue b/pagesB/location/location.vue index 52dea86..2d04e36 100644 --- a/pagesB/location/location.vue +++ b/pagesB/location/location.vue @@ -53,7 +53,9 @@ }, onLoad() { this.address = uni.getStorageSync('location') - this.getAddress() + if (!uni.getStorageSync('location')) { + this.getAddress() + } }, methods: { searchChange(value) {