完善个人资料,修改getBaseInfos接口返回缓存问题
This commit is contained in:
parent
576d39461a
commit
f8356b1283
@ -207,6 +207,7 @@ public class EditProfileActivity extends AbsActivity {
|
|||||||
submit.setText(R.string.live_task_item_complete_true);
|
submit.setText(R.string.live_task_item_complete_true);
|
||||||
submit.setBackgroundResource(R.mipmap.bg_submit_cancel);
|
submit.setBackgroundResource(R.mipmap.bg_submit_cancel);
|
||||||
submit.setTextColor(Color.parseColor("#FFFFFF"));
|
submit.setTextColor(Color.parseColor("#FFFFFF"));
|
||||||
|
userModel.seUserInfoComplete(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -254,7 +255,7 @@ public class EditProfileActivity extends AbsActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
if (userModel.getUserInfoComplete() ==1) {
|
if (userModel.getUserInfoComplete() == 1) {
|
||||||
finish();
|
finish();
|
||||||
} else {
|
} else {
|
||||||
new XPopup.Builder(mContext)
|
new XPopup.Builder(mContext)
|
||||||
@ -418,19 +419,6 @@ public class EditProfileActivity extends AbsActivity {
|
|||||||
if (mUserBean == null) {
|
if (mUserBean == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Intent intent = new Intent(mContext, EditNameActivity.class);
|
|
||||||
// intent.putExtra(Constants.NICK_NAME, mUserBean.getUserNiceName());
|
|
||||||
// mImageUtil.startActivityForResult(intent, new ActivityResultCallback() {
|
|
||||||
// @Override
|
|
||||||
// public void onSuccess(Intent intent) {
|
|
||||||
// if (intent != null) {
|
|
||||||
// String name = intent.getStringExtra(Constants.NICK_NAME);
|
|
||||||
// mUserBean.setUserNiceName(name);
|
|
||||||
// mName.setText(name);
|
|
||||||
// EventBus.getDefault().post(new UpdateFieldEvent());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
Constants.myIntoIndex = 2;
|
Constants.myIntoIndex = 2;
|
||||||
Intent intent = new Intent(mContext, MyWebViewActivity2.class);
|
Intent intent = new Intent(mContext, MyWebViewActivity2.class);
|
||||||
intent.putExtra(Constants.URL, CommonAppConfig.HOST + "/h5/table/Modify-information.html" + "?token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid());
|
intent.putExtra(Constants.URL, CommonAppConfig.HOST + "/h5/table/Modify-information.html" + "?token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid());
|
||||||
@ -660,12 +648,12 @@ public class EditProfileActivity extends AbsActivity {
|
|||||||
submit.setTextColor(Color.parseColor("#FFFFFF"));
|
submit.setTextColor(Color.parseColor("#FFFFFF"));
|
||||||
submit.setEnabled(false);
|
submit.setEnabled(false);
|
||||||
} else {
|
} else {
|
||||||
if (index<4){
|
if (index < 4) {
|
||||||
submit.setText(R.string.to_complete);
|
submit.setText(R.string.to_complete);
|
||||||
submit.setBackgroundResource(R.mipmap.bg_submit);
|
submit.setBackgroundResource(R.mipmap.bg_submit);
|
||||||
submit.setTextColor(Color.parseColor("#FFFFFF"));
|
submit.setTextColor(Color.parseColor("#FFFFFF"));
|
||||||
submit.setEnabled(false);
|
submit.setEnabled(false);
|
||||||
}else {
|
} else {
|
||||||
submit.setText(R.string.to_receive);
|
submit.setText(R.string.to_receive);
|
||||||
submit.setBackgroundResource(R.mipmap.bg_submit);
|
submit.setBackgroundResource(R.mipmap.bg_submit);
|
||||||
submit.setTextColor(Color.parseColor("#935902"));
|
submit.setTextColor(Color.parseColor("#935902"));
|
||||||
|
@ -244,6 +244,7 @@ public class MainHttpUtil {
|
|||||||
bean.setMedalLevel(obj.getIntValue("medal_level"));
|
bean.setMedalLevel(obj.getIntValue("medal_level"));
|
||||||
CommonAppConfig.getInstance().setUserBean(bean);
|
CommonAppConfig.getInstance().setUserBean(bean);
|
||||||
CommonAppConfig.getInstance().setUserItemList(obj.getString("list"));
|
CommonAppConfig.getInstance().setUserItemList(obj.getString("list"));
|
||||||
|
bean.seUserInfoComplete(obj.getIntValue("user_info_complete"));
|
||||||
SpUtil.getInstance().setStringValue(SpUtil.USER_INFO, info[0]);
|
SpUtil.getInstance().setStringValue(SpUtil.USER_INFO, info[0]);
|
||||||
if (commonCallback != null) {
|
if (commonCallback != null) {
|
||||||
commonCallback.callback(bean);
|
commonCallback.callback(bean);
|
||||||
|
@ -219,15 +219,6 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void loadData() {
|
public void loadData() {
|
||||||
if (isFirstLoadData()) {
|
|
||||||
CommonAppConfig appConfig = CommonAppConfig.getInstance();
|
|
||||||
UserBean u = appConfig.getUserBean();
|
|
||||||
List<UserItemBean> list = appConfig.getUserItemList();
|
|
||||||
if (u != null && list != null) {
|
|
||||||
showData(u, list);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MainHttpUtil.getGoogle(mCallback1);
|
MainHttpUtil.getGoogle(mCallback1);
|
||||||
MainHttpUtil.getBaseInfo(mCallback);
|
MainHttpUtil.getBaseInfo(mCallback);
|
||||||
MainHttpUtil.getBalance(new HttpCallback() {
|
MainHttpUtil.getBalance(new HttpCallback() {
|
||||||
|
Loading…
Reference in New Issue
Block a user