This commit is contained in:
hch 2024-03-22 09:28:11 +08:00
parent d39facbcc7
commit f2b2c39168
7 changed files with 22 additions and 7 deletions

View File

@ -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);
}

View File

@ -2,4 +2,6 @@
<resources>
<string name="real_person">真人认证</string>
<string name="trade_union">工会</string>
<string name="set_back">已拉黑,无法查看</string>
<string name="cancel_back">取消黑名单</string>
</resources>

View File

@ -1466,4 +1466,6 @@
<string name="trade_union">工会</string>
<string name="activity_msg_chat_top_status_online">在線</string>
<string name="activity_msg_chat_top_status_offline">離線</string>
<string name="set_back">已拉黑,无法查看</string>
<string name="cancel_back">取消黑名单</string>
</resources>

View File

@ -1466,4 +1466,6 @@
<string name="activity_msg_chat_top_status_online">在線</string>
<string name="activity_msg_chat_top_status_offline">離線</string>
<string name="set_back">已拉黑,无法查看</string>
<string name="cancel_back">取消黑名单</string>
</resources>

View File

@ -1463,4 +1463,6 @@
<string name="activity_msg_chat_top_status_online">在線</string>
<string name="activity_msg_chat_top_status_offline">離線</string>
<string name="praise">獲讚</string>
<string name="set_back">已拉黑,无法查看</string>
<string name="cancel_back">取消黑名单</string>
</resources>

View File

@ -1485,6 +1485,8 @@ Limited ride And limited avatar frame</string>
<string name="real_person">真人认证</string>
<string name="trade_union">工会</string>
<string name="praise">Like</string>
<string name="set_back">已拉黑,无法查看</string>
<string name="cancel_back">取消黑名单</string>
</resources>

View File

@ -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<String> 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);
}
});