网络请求报错提示去除

This commit is contained in:
18401019693 2022-08-24 11:45:55 +08:00
parent 0b78fad8bb
commit 14581ffebc

View File

@ -84,10 +84,12 @@ public class IMLoginManager extends BaseCacheManager {
if (null == userInfo) { if (null == userInfo) {
userInfo = new Gson().fromJson( userInfo = new Gson().fromJson(
getString(KEY_USER_INFO), IMLoginModel.class); getString(KEY_USER_INFO), IMLoginModel.class);
if (userInfo != null) if (userInfo != null){
token = userInfo.getToken(); token = userInfo.getToken();
userInfo.setGiftEffect(getBoolean(GiftEffect, false)); userInfo.setGiftEffect(getBoolean(GiftEffect, false));
userInfo.setMountEffect(getBoolean(MountEffect, false)); userInfo.setMountEffect(getBoolean(MountEffect, false));
}
} }
return userInfo; return userInfo;
@ -150,7 +152,6 @@ public class IMLoginManager extends BaseCacheManager {
} }
userInfo.setGiftEffect(getBoolean(GiftEffect, false)); userInfo.setGiftEffect(getBoolean(GiftEffect, false));
userInfo.setMountEffect(getBoolean(MountEffect, false)); userInfo.setMountEffect(getBoolean(MountEffect, false));
deleteByKey(KEY_USER_INFO);
put(KEY_USER_INFO, new Gson().toJson(userInfo)); put(KEY_USER_INFO, new Gson().toJson(userInfo));
//兼容老模块(之后要把用户维护的类更换掉 //兼容老模块(之后要把用户维护的类更换掉
SpUtil.getInstance().setStringValue(SpUtil.USER_INFO, new Gson().toJson(userInfo)); SpUtil.getInstance().setStringValue(SpUtil.USER_INFO, new Gson().toJson(userInfo));