Merge branch 'refs/heads/master' into v681小游戏
# Conflicts: # common/src/main/java/com/yunbao/common/http/PDLiveApi.java # common/src/main/res/values-zh/strings.xml # common/src/main/res/values/strings.xml
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
//处罚消息的对象
|
||||
public class PunishBean {
|
||||
|
||||
public String id;
|
||||
public String title, content;
|
||||
|
||||
}
|
||||
@@ -1349,6 +1349,11 @@ public interface PDLiveApi {
|
||||
@Query("gift_id")String giftId,
|
||||
@Query("live_uid")String liveUid
|
||||
);
|
||||
|
||||
//处罚通知红点
|
||||
@GET("/api/public/?service=Message.penalizeStatus")
|
||||
Observable<ResponseModel> getPenalizeStatus();
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.ballClearanceTableStatus")
|
||||
Observable<ResponseModel<BaseModel>> ballClearanceTableStatus(
|
||||
@Query("room_id")String roomId
|
||||
|
||||
@@ -95,6 +95,8 @@ import com.yunbao.common.http.base.CheckLiveCallBack;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -3716,6 +3718,42 @@ public class LiveNetManager {
|
||||
return MultipartBody.Part.createFormData("file", file.getName(), requestBody);
|
||||
}
|
||||
|
||||
public void getPenalizeStatus(HttpCallback<ResponseModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getPenalizeStatus()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel>() {
|
||||
@Override
|
||||
public void accept(ResponseModel responseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
if (responseModel.getData().getCode() == 0) {
|
||||
String s = responseModel.getData().getInfo().toString();
|
||||
try {
|
||||
JSONObject ob = new JSONObject(s);
|
||||
if (ob.getInt("unread_num") > 0) {
|
||||
callback.onSuccess(responseModel);
|
||||
} else {
|
||||
callback.onError("");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
callback.onError("");
|
||||
}
|
||||
} else {
|
||||
callback.onError("");
|
||||
}
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播间取消网络请求
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.yunbao.common.utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
@@ -57,6 +56,7 @@ public class RouteUtil {
|
||||
public static final String PATH_FEEDBACK_SUCCESS_ACTIVITY = "/main/FeedbackSuccessActivity";
|
||||
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 void forwardCommunityActivity() {
|
||||
@@ -381,4 +381,11 @@ public class RouteUtil {
|
||||
ARouter.getInstance().build(path)
|
||||
.navigation();
|
||||
}
|
||||
/**
|
||||
* 处罚通知界面
|
||||
*/
|
||||
public static void forwardPunishActivity() {
|
||||
ARouter.getInstance().build(PATH_LIVE_PUNISHACTIVITY)
|
||||
.navigation();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1545,6 +1545,8 @@
|
||||
<string name="live_end_view_ban_reason">違規原因:</string>
|
||||
<string name="live_end_view_ban_content">處罰內容:</string>
|
||||
<string name="live_end_view_ban_timer">處罰時間:</string>
|
||||
<string name="live_end_view_ban_punish_title">處罰通知</string>
|
||||
|
||||
<string name="game_create_coid_ticket">門票</string>
|
||||
<string name="game_list_activity_title">挑戰一桿清台,瓜分高額獎金</string>
|
||||
<string name="game_dialog_loading_tips_text">結算超時,請前往活動頁面查看本局結果</string>
|
||||
|
||||
@@ -85,4 +85,6 @@
|
||||
<color name="gray_f6f6f6f6">#FFF6F6F6</color>
|
||||
|
||||
<color name="gray_F4F4F4">#F4F4F4</color>
|
||||
<color name="color_555555">#555555</color>
|
||||
<color name="color_525252">#525252</color>
|
||||
</resources>
|
||||
|
||||
@@ -1554,6 +1554,7 @@
|
||||
<string name="live_end_view_ban_reason">Violation reasons:</string>
|
||||
<string name="live_end_view_ban_content">Penalty content:</string>
|
||||
<string name="live_end_view_ban_timer">Penalty time:</string>
|
||||
<string name="live_end_view_ban_punish_title">Punishment Notice</string>
|
||||
<string name="game_create_coid_ticket">Ticket</string>
|
||||
<string name="game_list_activity_title">Challenge One-shot clearance Share high bonuses</string>
|
||||
<string name="game_dialog_loading_tips_text"> Settlement timed out. Please check the result on the event page</string>
|
||||
|
||||
Reference in New Issue
Block a user