举报通知开发
This commit is contained in:
@@ -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() {
|
||||
@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);
|
||||
}
|
||||
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.report_second_7));
|
||||
finish();
|
||||
} 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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
* */
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
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,17 +120,29 @@ public class SystemMessageNewAdapter extends RefreshAdapter<SystemMessageBean> {
|
||||
itemLayout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
//普通消息
|
||||
if (bean.getSystem_message_type() == 1) {
|
||||
if (bean.getLink() != null && !bean.getLink().equals("")) {
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
StringBuffer urlBuffer = new StringBuffer();
|
||||
urlBuffer.append(bean.getLink()).append("&uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0);
|
||||
mContext.startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", urlBuffer.toString()));
|
||||
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("")) {
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
StringBuffer urlBuffer = new StringBuffer();
|
||||
urlBuffer.append(bean.getLink()).append("&uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&isZh=").append(WordUtil.isNewZh() ? "1" : 0);
|
||||
mContext.startActivity(new Intent(mContext, ZhuangBanActivity.class).putExtra("url", urlBuffer.toString()));
|
||||
}
|
||||
} else {
|
||||
RouteUtil.forwardLiveCompensateActivity(mContext, String.valueOf(bean.getId()), bean.getImgBanner(), bean.getTitle(), bean.getContent(), bean.getAddtime(), bean.getLink(), bean.getGet_status() == 2);
|
||||
}
|
||||
} 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>
|
||||
Reference in New Issue
Block a user