d
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user