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) {