From aa67806030d2186fe284e1ad911322d273ffa6e0 Mon Sep 17 00:00:00 2001 From: Karlcarlo Date: Fri, 31 Jul 2026 14:46:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E4=BF=9D=E7=95=99=20openid/unionid=20=E2=80=94=20=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=8C=BF=E5=90=8D=E6=A0=87=E8=AF=86=E6=B0=B8=E4=B9=85?= =?UTF-8?q?=E7=A8=B3=E5=AE=9A=EF=BC=8C=E9=80=80=E5=87=BA=E5=90=8E=E8=B7=B3?= =?UTF-8?q?=20H5=20=E4=B8=8D=E4=B8=A2=E5=A4=B1=E8=BA=AB=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- store/modules/app.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/store/modules/app.js b/store/modules/app.js index 3c85b11..e6d422f 100644 --- a/store/modules/app.js +++ b/store/modules/app.js @@ -159,12 +159,10 @@ const mutations = { Cache.clear(UID); Cache.clear(USER_INFO); Cache.clear('newcomerGift'); - Cache.clear('OPENID'); - Cache.clear('UNIONID'); + // 保留 openid/unionid:微信匿名标识,wx.login 静默获取,同小程序内永久稳定 + // 退出登录不应清除,否则用户退出后(不重启)跳 H5 会丢失身份 state.token = undefined; state.uid = undefined; - state.openid = ''; - state.unionid = ''; state.userInfo = {} }, BACKGROUND_COLOR(state, color) {