diff --git a/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java b/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java index ee0c866c9..41fd80336 100644 --- a/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java +++ b/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java @@ -618,7 +618,7 @@ public class CommonHttpUtil { * 动态-不感兴趣 */ public static void noInterest(String uid, HttpCallback callback) { - HttpClient.getInstance().get("User.setBlack", "User.setBlack") + HttpClient.getInstance().get("Pdluser.setBlack", "User.setBlack") .params("touid", uid) .execute(callback); } diff --git a/common/src/main/res/values-en-rUS/strings.xml b/common/src/main/res/values-en-rUS/strings.xml index 9dc2dcab2..7ddc3d2c2 100644 --- a/common/src/main/res/values-en-rUS/strings.xml +++ b/common/src/main/res/values-en-rUS/strings.xml @@ -2,4 +2,6 @@ 真人认证 工会 + 已拉黑,无法查看 + 取消黑名单 \ No newline at end of file diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index 6dd43de36..633cc8041 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1467,4 +1467,6 @@ 工会 在線 離線 + 已拉黑,无法查看 + 取消黑名单 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index 1e64c4f01..b6783aedb 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1467,4 +1467,6 @@ 在線 離線 + 已拉黑,无法查看 + 取消黑名单 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index 19d80e38f..a56716789 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1464,4 +1464,6 @@ 在線 離線 獲讚 + 已拉黑,无法查看 + 取消黑名单 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index d70f4813f..381ddc730 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1486,6 +1486,8 @@ Limited ride And limited avatar frame 真人认证 工会 Like + 已拉黑,无法查看 + 取消黑名单 diff --git a/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java b/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java index 870e8970e..7816afd54 100644 --- a/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java @@ -28,6 +28,7 @@ import androidx.viewpager.widget.ViewPager; import com.alibaba.android.arouter.facade.annotation.Route; import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import com.google.gson.Gson; import com.makeramen.roundedimageview.RoundedImageView; import com.ms.banner.Banner; @@ -198,11 +199,6 @@ public class UserHomeActivity extends AbsActivity { @SuppressLint({"SetTextI18n", "UseCompatLoadingForDrawables"}) private void initData(HomeUserInfoBean userInfoBean) { userInfo = userInfoBean; - if (!userInfo.getCheckBlack().get(0).getU2t().equals("0")) { - ToastUtil.show("已拉黑,无法查看"); - finish(); - return; - } if (!StringUtil.isEmpty(userInfo.getUserHomeTopInfo().getUser_president_name())) { userPresidentLayout.setVisibility(View.VISIBLE); userPresidentName.setText(userInfo.getUserHomeTopInfo().getUser_president_name()); @@ -551,10 +547,11 @@ public class UserHomeActivity extends AbsActivity { findViewById(R.id.setting).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { + String temp = userInfo.getCheckBlack().get(0).getU2t().equals("0") ? getResources().getString(R.string.black_add) : getResources().getString(com.yunbao.main.R.string.cancel_back); SparseArray array = new SparseArray<>(); array.append(1, "不感興趣"); array.append(0, getResources().getString(R.string.report)); - array.append(2, getResources().getString(R.string.black_add)); + array.append(2, temp); DialogUitl.showStringArrayDialog(UserHomeActivity.this, array, new DialogUitl.StringArrayDialogCallback() { @Override public void onItemClick(String text, int tag) { @@ -564,6 +561,10 @@ public class UserHomeActivity extends AbsActivity { CommonHttpUtil.noInterest(String.valueOf(userInfo.getUserHomeTopInfo().getUser_id()), new com.yunbao.common.http.HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { + if (code == 0 && info != null) { + JSONObject jsonObject = JSONObject.parseObject(info[0]); + userInfo.getCheckBlack().get(0).setU2t(jsonObject.getString("isblack")); + } ToastUtil.show(msg); } }); @@ -571,6 +572,10 @@ public class UserHomeActivity extends AbsActivity { CommonHttpUtil.noInterest(String.valueOf(userInfo.getUserHomeTopInfo().getUser_id()), new com.yunbao.common.http.HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { + if (code == 0 && info != null) { + JSONObject jsonObject = JSONObject.parseObject(info[0]); + userInfo.getCheckBlack().get(0).setU2t(jsonObject.getString("isblack")); + } ToastUtil.show(msg); } });