举报通知开发
This commit is contained in:
parent
f60915194a
commit
98343a2177
@ -0,0 +1,37 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
public class ReportInfoBean {
|
||||
/* {
|
||||
"touid": 99455,
|
||||
"user_nicename": "小盒主播2",
|
||||
"avatar": "https://downs.yaoulive.com/20240516102555_cf329486d39121125b182a779bbc3278?imageView2/2/w/600/h/600"
|
||||
}*/
|
||||
|
||||
private String touid;
|
||||
private String user_nicename;
|
||||
private String avatar;
|
||||
|
||||
public String getTouid() {
|
||||
return touid;
|
||||
}
|
||||
|
||||
public void setTouid(String touid) {
|
||||
this.touid = touid;
|
||||
}
|
||||
|
||||
public String getUser_nicename() {
|
||||
return user_nicename;
|
||||
}
|
||||
|
||||
public void setUser_nicename(String user_nicename) {
|
||||
this.user_nicename = user_nicename;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
}
|
@ -68,5 +68,7 @@ public class LiveHttpConsts {
|
||||
public static final String ISHOTCARD = "isHotCard";
|
||||
public static final String USEHOTCARDUSERLIST = "useHotCardUserList";
|
||||
public static final String SETINSTRUCTORREMARK = "getInstructorRemark";
|
||||
public static final String SETREPORTREPLENISHMENT = "setReportReplenishment";
|
||||
public static final String GETREPORTINFO = "getReportInfo";
|
||||
|
||||
}
|
||||
|
@ -264,6 +264,36 @@ public class LiveHttpUtil {
|
||||
request.execute(callback);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 举报用户 + 图片 二次补充证据
|
||||
*/
|
||||
public static void setReportToSecondReport(int report_id, String content, File file1, File file2, File file3, HttpCallback callback) {
|
||||
PostRequest<JsonBean> request = HttpClient.getInstance().post("Live.setReportReplenishment", LiveHttpConsts.SETREPORTREPLENISHMENT)
|
||||
.isMultipart(true)
|
||||
.params("report_id", report_id)
|
||||
.params("content", content);
|
||||
if (file1 != null) {
|
||||
request.params("file1", file1);
|
||||
}
|
||||
if (file2 != null) {
|
||||
request.params("file2", file2);
|
||||
}
|
||||
if (file3 != null) {
|
||||
request.params("file3", file3);
|
||||
}
|
||||
request.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取被举报人的名字
|
||||
*/
|
||||
public static void getReportName(int report_id, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Live.getReportInfo", LiveHttpConsts.GETREPORTINFO)
|
||||
.params("report_id", report_id)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播间点击聊天列表和头像出现的弹窗
|
||||
*/
|
||||
|
@ -57,6 +57,7 @@ public class RouteUtil {
|
||||
public static final String PATH_FEEDBACK_ACTIVITY = "/main/FeedbackActivity";
|
||||
public static final String PATH_FEEDBACK_EDIT_ACTIVITY = "/main/FeedbackEditActivity";
|
||||
public static final String PATH_LIVE_PUNISHACTIVITY = "/live/PunishActivity";
|
||||
public static final String PATH_LIVE_REPORT_SECOND = "/live/ReportSecondActivity";
|
||||
|
||||
|
||||
public static void forwardCommunityActivity() {
|
||||
@ -178,6 +179,12 @@ public class RouteUtil {
|
||||
.navigation();
|
||||
}
|
||||
|
||||
public static void forwardLiveSecondReportActivity(int users_report_id) {
|
||||
ARouter.getInstance().build(PATH_LIVE_REPORT_SECOND)
|
||||
.withInt("users_report_id", users_report_id)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 跳转到装扮
|
||||
|
@ -12,17 +12,26 @@ import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yunbao.common.BuildConfig;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.bean.ReportInfoBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.interfaces.ImageResultCallback;
|
||||
import com.yunbao.common.utils.ProcessImageUtil;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.LiveReportBean;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
@Route(path = RouteUtil.PATH_LIVE_REPORT_SECOND)
|
||||
public class ReportSecondActivity extends AbsActivity implements View.OnClickListener {
|
||||
private TextView info_textView;
|
||||
private EditText edit;
|
||||
@ -33,6 +42,7 @@ public class ReportSecondActivity extends AbsActivity implements View.OnClickLis
|
||||
private File mFile1, mFile2, mFile3;
|
||||
private int uploadImageCount;
|
||||
private String inputText;
|
||||
private int users_report_id;
|
||||
|
||||
|
||||
@Override
|
||||
@ -63,6 +73,7 @@ public class ReportSecondActivity extends AbsActivity implements View.OnClickLis
|
||||
image_3 .setOnClickListener(this);
|
||||
cancel_1.setOnClickListener(this);
|
||||
cancel_2.setOnClickListener(this);
|
||||
cancel_3.setOnClickListener(this);
|
||||
|
||||
|
||||
edit.addTextChangedListener(new TextWatcher() {
|
||||
@ -82,6 +93,20 @@ public class ReportSecondActivity extends AbsActivity implements View.OnClickLis
|
||||
setButtonStatus();
|
||||
}
|
||||
});
|
||||
|
||||
users_report_id = getIntent().getIntExtra("users_report_id",0);
|
||||
|
||||
LiveHttpUtil.getReportName(users_report_id, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
List<ReportInfoBean> list = JSON.parseArray(Arrays.toString(info), ReportInfoBean.class);
|
||||
if (list != null && !list.isEmpty()) {
|
||||
setInfoText(list.get(0).getUser_nicename());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setButtonStatus(){
|
||||
@ -122,7 +147,7 @@ If you have any supplementary information or proof, you can click to enter the d
|
||||
|
||||
SpannableString spannableString = new SpannableString(stringBuilder.toString());
|
||||
|
||||
spannableString.setSpan(new ForegroundColorSpan(Color.parseColor("#FF870F")), startIndex, endIndex, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
spannableString.setSpan(new ForegroundColorSpan(Color.parseColor("#FF870F")), startIndex-1, endIndex+1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
info_textView.setText(spannableString);
|
||||
}
|
||||
|
||||
@ -172,41 +197,23 @@ If you have any supplementary information or proof, you can click to enter the d
|
||||
}
|
||||
|
||||
private void reportSecond() {
|
||||
/*
|
||||
*
|
||||
* if (mIntoIndex == 0) {
|
||||
LiveHttpUtil.setReport(mToUid, bean.getName(),text, file1, file2, file3, mVideoId, new HttpCallback() {
|
||||
LiveHttpUtil.setReportToSecondReport(users_report_id, inputText, mFile1, mFile2, mFile3, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
ToastUtil.show(mContext.getString(R.string.video_report_tip_4));
|
||||
onBackPressed();
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
CommonHttpUtil.setCommunityReport(community_type, comment_id, mToUid, text, file1, file2, file3, bean.getId(), new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
ToastUtil.show(mContext.getString(R.string.video_report_tip_4));
|
||||
onBackPressed();
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
* */
|
||||
ToastUtil.show(mContext.getString(R.string.report_second_7));
|
||||
finish();
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void imageUtilInit() {
|
||||
mImageUtil = new ProcessImageUtil((LiveReportActivity)mContext);
|
||||
mImageUtil = new ProcessImageUtil((ReportSecondActivity)mContext);
|
||||
mImageUtil.setImageResultCallback(new ImageResultCallback() {
|
||||
@Override
|
||||
public void beforeCamera() {
|
||||
|
@ -20,6 +20,7 @@ import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.ZhuangBanActivity;
|
||||
@ -119,6 +120,16 @@ public class SystemMessageNewAdapter extends RefreshAdapter<SystemMessageBean> {
|
||||
itemLayout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (bean.getIs_report() == 1) {
|
||||
// 举报消息
|
||||
if (bean.getIs_replenishment() == 1) {
|
||||
// 已经提交过
|
||||
ToastUtil.show(R.string.report_second_6);
|
||||
}else {
|
||||
// 跳转到补充举报信息界面
|
||||
RouteUtil.forwardLiveSecondReportActivity(bean.getUsers_report_id());
|
||||
}
|
||||
} else{
|
||||
//普通消息
|
||||
if (bean.getSystem_message_type() == 1) {
|
||||
if (bean.getLink() != null && !bean.getLink().equals("")) {
|
||||
@ -130,6 +141,8 @@ public class SystemMessageNewAdapter extends RefreshAdapter<SystemMessageBean> {
|
||||
} else {
|
||||
RouteUtil.forwardLiveCompensateActivity(mContext, String.valueOf(bean.getId()), bean.getImgBanner(), bean.getTitle(), bean.getContent(), bean.getAddtime(), bean.getLink(), bean.getGet_status() == 2);
|
||||
}
|
||||
}
|
||||
|
||||
//未读才调用
|
||||
if (bean.getRead_status() == 2) {
|
||||
ImHttpUtil.readMsg(bean.getId(), new HttpCallback() {
|
||||
|
@ -18,6 +18,9 @@ public class SystemMessageBean {
|
||||
private String avatar;
|
||||
private String showImg;
|
||||
private String imgBanner;
|
||||
private int is_replenishment;// 是否提交过举报补充信息 0.未提交 1.已提交
|
||||
private int users_report_id;// 举报表id,非举报反馈消息值等于0
|
||||
private int is_report;//是否是举报信息 0.不是 1.是
|
||||
|
||||
private int system_message_type; //1 普通消息 2 礼包消息
|
||||
|
||||
@ -25,6 +28,30 @@ public class SystemMessageBean {
|
||||
|
||||
private int read_status; // 1 已读 2 未读
|
||||
|
||||
public int getIs_report() {
|
||||
return is_report;
|
||||
}
|
||||
|
||||
public void setIs_report(int is_report) {
|
||||
this.is_report = is_report;
|
||||
}
|
||||
|
||||
public int getIs_replenishment() {
|
||||
return is_replenishment;
|
||||
}
|
||||
|
||||
public void setIs_replenishment(int is_replenishment) {
|
||||
this.is_replenishment = is_replenishment;
|
||||
}
|
||||
|
||||
public int getUsers_report_id() {
|
||||
return users_report_id;
|
||||
}
|
||||
|
||||
public void setUsers_report_id(int users_report_id) {
|
||||
this.users_report_id = users_report_id;
|
||||
}
|
||||
|
||||
public int getRead_status() {
|
||||
return read_status;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cardView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
app:cardBackgroundColor="#F7F7F7"
|
||||
@ -75,6 +75,8 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="您舉報的用戶【用戶暱稱】,我們已對其進行重點觀察,並進一步判定,若發現違規將立刻處理,感謝您的監督~"
|
||||
android:textColor="#ff777777"
|
||||
android:textSize="11sp" />
|
||||
|
@ -151,4 +151,7 @@
|
||||
<string name="report_second_3">上傳圖片</string>
|
||||
<string name="report_second_4">舉報內容補充</string>
|
||||
<string name="report_second_5">若您有其它補充信息,請在說明框中描述~</string>
|
||||
<string name="report_second_6">已收到您的補充信息,我們正在加急處理中</string>
|
||||
<string name="report_second_7">提交成功</string>
|
||||
|
||||
</resources>
|
||||
|
@ -154,4 +154,7 @@
|
||||
<string name="report_second_3">Upload pictures</string>
|
||||
<string name="report_second_4">Report content supplement</string>
|
||||
<string name="report_second_5">If you have additional information, please describe it in the description box</string>
|
||||
<string name="report_second_6">Your supplementary information has been received. We are handling it urgently</string>
|
||||
<string name="report_second_7">Submitted successfully</string>
|
||||
|
||||
</resources>
|
Loading…
Reference in New Issue
Block a user