This commit is contained in:
2020-08-25 14:33:48 +08:00
parent 2d9e287f09
commit 1b3d934692
30 changed files with 243 additions and 840 deletions

View File

@@ -4,7 +4,7 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.text.TextUtils;
import com.fenghoo.seven.main.entity.LoginBean;
import com.fenghoo.seven.main.my.entity.loginInfoBean;
import com.google.gson.Gson;
/**
@@ -160,12 +160,12 @@ public class ProfileSpUtils {
*
* @return SP存储的用户资料
*/
public LoginBean getUserProfie() {
public loginInfoBean getUserProfie() {
String userStr = sharedPreferences.getString(KEY_USER, "");
if (TextUtils.isEmpty(userStr)) {
return new LoginBean();
return new loginInfoBean();
}
return new Gson().fromJson(userStr, LoginBean.class);
return new Gson().fromJson(userStr, loginInfoBean.class);
}
/**
@@ -173,7 +173,7 @@ public class ProfileSpUtils {
*
* @param treeUserEntity 用户资料实体类
*/
public void saveProfile(LoginBean treeUserEntity) {
public void saveProfile(loginInfoBean treeUserEntity) {
sharedPreferences.edit()
.putString(KEY_USER, new Gson().toJson(treeUserEntity))
.apply();