From 05236e188ce166eca2982f7f72b1d32ce2395866 Mon Sep 17 00:00:00 2001 From: dengjie <209192278@qq.com> Date: Tue, 31 Jan 2023 00:24:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/myAvatar/myAvatar.vue | 8 -------- pages/my/my.vue | 14 +++----------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/components/myAvatar/myAvatar.vue b/components/myAvatar/myAvatar.vue index 298ca33..35c394e 100644 --- a/components/myAvatar/myAvatar.vue +++ b/components/myAvatar/myAvatar.vue @@ -52,14 +52,6 @@ this.showEdit = false } this.getUser() - if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) { - this.isLoad = false - // uni.navigateTo({ - // url: '../../pages/my/login/login' - // }) - return - } - this.isLoad = true }, options: { styleIsolation: 'shared', // 解除样式隔离 diff --git a/pages/my/my.vue b/pages/my/my.vue index d62e5f8..2c0cabc 100644 --- a/pages/my/my.vue +++ b/pages/my/my.vue @@ -61,16 +61,6 @@ } this.isLoad = true }, - onLoad() { - if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) { - this.isLoad = false - // uni.navigateTo({ - // url: '../../pages/my/login/login' - // }) - return - } - this.isLoad = true - }, methods: { //跳转到绑定公司页面 bindCompany() { @@ -135,7 +125,9 @@ return } this.isLoad = true - this.$refs.myavatar.getUser() + if (this.isLoad) { + this.$refs.myavatar.getUser() + } }, failToLoad() { // uni.navigateBack({