From a08afd0cfd53f7908e31efe376c867b291739519 Mon Sep 17 00:00:00 2001 From: kk <875203880@qq.com> Date: Sat, 11 Jul 2026 16:49:32 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95=E8=B7=B3?= =?UTF-8?q?=E5=88=B0=E6=89=AB=E7=A0=81=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index/index.vue | 1 + src/pages/index/scan.vue | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 6387c39..73d09fd 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -500,6 +500,7 @@ export default { uni.clearStorageSync(); uni.showToast({ title: '已退出登录', icon: 'success' }); setTimeout(() => { + uni.setStorageSync('__logout_flag', true); uni.reLaunch({ url: '/pages/index/scan' }); }, 1000); }, diff --git a/src/pages/index/scan.vue b/src/pages/index/scan.vue index 55208e0..6547c81 100644 --- a/src/pages/index/scan.vue +++ b/src/pages/index/scan.vue @@ -67,6 +67,12 @@ export default { }; }, onLoad(options) { + // 退出登录后跳转过来,清除标记,停留在扫码页 + if (uni.getStorageSync('__logout_flag')) { + uni.removeStorageSync('__logout_flag'); + return; + } + // 1. 检查 JWT(App.vue 已处理首次跳转,这里兜底) const token = uni.getStorageSync('token'); if (!token) {