From 25036a77610eb26ff5be7c1d03a73172a2b0c2d5 Mon Sep 17 00:00:00 2001 From: H1d3rOne Date: Tue, 10 Mar 2026 17:29:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=97=B6=E4=BF=9D=E7=95=99deviceId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - logout时先保存deviceId,清除缓存后恢复 - 确保同一设备退出登录后再次登录不会创建新用户 --- xuan-deduct-uniapp/src/pages/mine/account.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xuan-deduct-uniapp/src/pages/mine/account.vue b/xuan-deduct-uniapp/src/pages/mine/account.vue index 652824f..8b93b73 100644 --- a/xuan-deduct-uniapp/src/pages/mine/account.vue +++ b/xuan-deduct-uniapp/src/pages/mine/account.vue @@ -135,7 +135,11 @@ export default { content: '确定要退出登录吗?', success: (res) => { if (res.confirm) { + const deviceId = uni.getStorageSync('deviceId') uni.clearStorageSync() + if (deviceId) { + uni.setStorageSync('deviceId', deviceId) + } uni.setStorageSync('isLoggedIn', false) uni.showToast({ title: '已退出登录',