From f8356b12837d5874d5997074578a8fa95fdafee8 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Thu, 11 May 2023 14:57:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=B8=AA=E4=BA=BA=E8=B5=84?= =?UTF-8?q?=E6=96=99=EF=BC=8C=E4=BF=AE=E6=94=B9getBaseInfos=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=BF=94=E5=9B=9E=E7=BC=93=E5=AD=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/activity/EditProfileActivity.java | 20 ++++--------------- .../com/yunbao/main/http/MainHttpUtil.java | 1 + .../yunbao/main/views/MainMeViewHolder.java | 9 --------- 3 files changed, 5 insertions(+), 25 deletions(-) diff --git a/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java b/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java index 1926df313..ceb99c7c6 100644 --- a/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java @@ -207,6 +207,7 @@ public class EditProfileActivity extends AbsActivity { submit.setText(R.string.live_task_item_complete_true); submit.setBackgroundResource(R.mipmap.bg_submit_cancel); submit.setTextColor(Color.parseColor("#FFFFFF")); + userModel.seUserInfoComplete(1); } @Override @@ -254,7 +255,7 @@ public class EditProfileActivity extends AbsActivity { @Override public void onBackPressed() { - if (userModel.getUserInfoComplete() ==1) { + if (userModel.getUserInfoComplete() == 1) { finish(); } else { new XPopup.Builder(mContext) @@ -418,19 +419,6 @@ public class EditProfileActivity extends AbsActivity { if (mUserBean == null) { 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; 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()); @@ -660,12 +648,12 @@ public class EditProfileActivity extends AbsActivity { submit.setTextColor(Color.parseColor("#FFFFFF")); submit.setEnabled(false); } else { - if (index<4){ + if (index < 4) { submit.setText(R.string.to_complete); submit.setBackgroundResource(R.mipmap.bg_submit); submit.setTextColor(Color.parseColor("#FFFFFF")); submit.setEnabled(false); - }else { + } else { submit.setText(R.string.to_receive); submit.setBackgroundResource(R.mipmap.bg_submit); submit.setTextColor(Color.parseColor("#935902")); diff --git a/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java b/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java index f0d5c971f..6cb05f77e 100644 --- a/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java +++ b/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java @@ -244,6 +244,7 @@ public class MainHttpUtil { bean.setMedalLevel(obj.getIntValue("medal_level")); CommonAppConfig.getInstance().setUserBean(bean); CommonAppConfig.getInstance().setUserItemList(obj.getString("list")); + bean.seUserInfoComplete(obj.getIntValue("user_info_complete")); SpUtil.getInstance().setStringValue(SpUtil.USER_INFO, info[0]); if (commonCallback != null) { commonCallback.callback(bean); diff --git a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java index 531087671..5bc68d577 100644 --- a/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainMeViewHolder.java @@ -219,15 +219,6 @@ public class MainMeViewHolder extends AbsMainViewHolder implements OnItemClickLi @Override public void loadData() { - if (isFirstLoadData()) { - CommonAppConfig appConfig = CommonAppConfig.getInstance(); - UserBean u = appConfig.getUserBean(); - List list = appConfig.getUserItemList(); - if (u != null && list != null) { - showData(u, list); - } - } - MainHttpUtil.getGoogle(mCallback1); MainHttpUtil.getBaseInfo(mCallback); MainHttpUtil.getBalance(new HttpCallback() {