From ae35d60f1200b157e753a68064469eddaa787f9b Mon Sep 17 00:00:00 2001 From: davy Date: Thu, 3 Apr 2025 22:18:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E9=80=80=E5=87=BA?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E5=90=8E=E7=9A=84=E8=B7=B3=E8=BD=AC=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E6=94=B9=E4=B8=BA=E8=B7=B3=E8=BD=AC=E5=88=B0?= =?UTF-8?q?=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/my.vue | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/pages/index/my.vue b/pages/index/my.vue index b397c6c..33b7f74 100644 --- a/pages/index/my.vue +++ b/pages/index/my.vue @@ -312,24 +312,19 @@ }, // 退出登录 logout() { - if (!this.isLoggedIn) return - uni.showModal({ title: '提示', content: '确定要退出登录吗?', success: (res) => { if (res.confirm) { - // 清除登录状态 + // 清除本地存储的用户信息 uni.removeStorageSync('token') uni.removeStorageSync('userInfo') - this.isLoggedIn = false - this.userInfo = null - this.barInfo = null - this.myScanData = null + uni.removeStorageSync('barInfo') - // 跳转到登录页 + // 跳转到首页 uni.reLaunch({ - url: '/pages/index/chooseLogin' + url: '/pages/index/index' }) } }