fix: 退出登录保留 openid/unionid — 微信匿名标识永久稳定,退出后跳 H5 不丢失身份
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user