From 15a52aaa62ec7a739fbc8042f3e4a5587f0e587c Mon Sep 17 00:00:00 2001 From: Martin <13046765170@163.com> Date: Thu, 11 Jul 2024 13:07:17 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=BC=80=E9=80=9A=E5=AE=88=E6=8A=A4?= =?UTF-8?q?=EF=BC=8Cim=E6=B6=88=E6=81=AF=E4=BC=98=E5=8C=96=202=E3=80=81?= =?UTF-8?q?=E6=B8=B8=E6=88=8F=E6=88=BF=E5=AE=89=E5=85=A8=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=E4=BC=98=E5=8C=96=203=E3=80=81=E4=B8=BE=E6=8A=A5=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5=E5=8C=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/dialog/OrderLevelPopupWindow.java | 5 +++ .../com/yunbao/common/http/LiveHttpUtil.java | 3 +- .../yunbao/common/views/LiveSudGamePopup.java | 11 +++++++ .../main/res/layout/dialog_live_sud_game.xml | 31 +++++++++---------- .../live/activity/LiveReportActivity.java | 2 +- .../live/activity/SudRyGameActivity.java | 2 +- .../yunbao/live/socket/SocketRyClient.java | 4 ++- .../yunbao/live/socket/SocketSwClient.java | 4 ++- 8 files changed, 41 insertions(+), 21 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/dialog/OrderLevelPopupWindow.java b/common/src/main/java/com/yunbao/common/dialog/OrderLevelPopupWindow.java index 289772384..0328ea94f 100644 --- a/common/src/main/java/com/yunbao/common/dialog/OrderLevelPopupWindow.java +++ b/common/src/main/java/com/yunbao/common/dialog/OrderLevelPopupWindow.java @@ -19,6 +19,7 @@ import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; @@ -124,6 +125,10 @@ public class OrderLevelPopupWindow extends CenterPopupView { ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.buying_experience), new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { + if(StringUtil.isEmpty(orderLevel.getText().toString())||"0".equals(orderLevel.getText().toString())){ + ToastUtil.show(WordUtil.isNewZh()?"输入数字不可为0":"The input number cannot be 0"); + return; + } if (Integer.parseInt(orderLevel.getText().toString()+"00") <= maxExp) { LiveNetManager.get(getContext()).buyingExperiencePoint(buyExp + "00", new HttpCallback>() { @Override diff --git a/common/src/main/java/com/yunbao/common/http/LiveHttpUtil.java b/common/src/main/java/com/yunbao/common/http/LiveHttpUtil.java index 3f3ad5128..e3a05088a 100644 --- a/common/src/main/java/com/yunbao/common/http/LiveHttpUtil.java +++ b/common/src/main/java/com/yunbao/common/http/LiveHttpUtil.java @@ -243,10 +243,11 @@ public class LiveHttpUtil { /** * 举报用户 + 图片 */ - public static void setReport(String touid, String content, File file1, File file2, File file3, String videoId, HttpCallback callback) { + public static void setReport(String touid,String report_argument, String content, File file1, File file2, File file3, String videoId, HttpCallback callback) { PostRequest request = HttpClient.getInstance().post("Live.setReport", LiveHttpConsts.SET_REPORT) .isMultipart(true) .params("touid", touid) + .params("report_argument", report_argument) .params("content", content); if (file1 != null) { request.params("file1", file1); diff --git a/common/src/main/java/com/yunbao/common/views/LiveSudGamePopup.java b/common/src/main/java/com/yunbao/common/views/LiveSudGamePopup.java index f9d4be659..09ff270a1 100644 --- a/common/src/main/java/com/yunbao/common/views/LiveSudGamePopup.java +++ b/common/src/main/java/com/yunbao/common/views/LiveSudGamePopup.java @@ -38,9 +38,11 @@ import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.sud.QuickStartGameViewModel; import com.yunbao.common.sud.model.GameConfigModel; +import com.yunbao.common.sud.model.GameViewInfoModel; import com.yunbao.common.sud.state.SudMGPAPPState; import com.yunbao.common.sud.state.SudMGPMGState; import com.yunbao.common.utils.Bus; +import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; @@ -82,6 +84,15 @@ public class LiveSudGamePopup extends BottomPopupView { //第二次进入时,viewmodel数据丢失,所以初始化时直接获取 gameViewModel.getScore(mCreateSudRoomModel.getSudGameRoomId(),getActivity()); IMLoginManager.get(context).setSudGame(""); + + // 设置游戏安全操作区域 + GameViewInfoModel.GameViewRectModel gameViewRectModel = new GameViewInfoModel.GameViewRectModel(); + gameViewRectModel.left = 0; + gameViewRectModel.top = DpUtil.dp2px(50); //游戏安全区域 + gameViewRectModel.right = 0; + gameViewRectModel.bottom = DpUtil.dp2px(30); + gameViewModel.gameViewRectModel = gameViewRectModel; + //初始化结算弹窗 sudGameDoubleDialog = new SudGameDoubleDialog(context);//双人游戏 sudGameMultipleDialog = new SudGameMultipleDialog(context);//多人游戏 diff --git a/common/src/main/res/layout/dialog_live_sud_game.xml b/common/src/main/res/layout/dialog_live_sud_game.xml index 1b54f1c8a..1de6f95e8 100644 --- a/common/src/main/res/layout/dialog_live_sud_game.xml +++ b/common/src/main/res/layout/dialog_live_sud_game.xml @@ -1,12 +1,23 @@ - + + + + + + - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/live/src/main/java/com/yunbao/live/activity/LiveReportActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveReportActivity.java index 6826205bd..6be9e8cf9 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveReportActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveReportActivity.java @@ -133,7 +133,7 @@ public class LiveReportActivity extends AbsActivity implements LiveReportAdapter content += " " + text; } if (mIntoIndex == 0) { - LiveHttpUtil.setReport(mToUid, content, file1, file2, file3, mVideoId, new HttpCallback() { + 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) { diff --git a/live/src/main/java/com/yunbao/live/activity/SudRyGameActivity.java b/live/src/main/java/com/yunbao/live/activity/SudRyGameActivity.java index d03753652..ce3a11f0e 100644 --- a/live/src/main/java/com/yunbao/live/activity/SudRyGameActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/SudRyGameActivity.java @@ -458,7 +458,7 @@ public class SudRyGameActivity extends AbsActivity implements GameRyMicManager.M // 设置游戏安全操作区域 GameViewInfoModel.GameViewRectModel gameViewRectModel = new GameViewInfoModel.GameViewRectModel(); gameViewRectModel.left = 0; - gameViewRectModel.top = DpUtil.dp2px(180); + gameViewRectModel.top = DpUtil.dp2px(180);//游戏安全区域 gameViewRectModel.right = 0; gameViewRectModel.bottom = DpUtil.dp2px(155); gameViewModel.gameViewRectModel = gameViewRectModel; diff --git a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java index 8be0ec603..32a803ebf 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketRyClient.java @@ -490,7 +490,9 @@ public class SocketRyClient { } else if (action2 == 90) { NewAllServerNotifyGuardEvent notifyGuardEvent = GsonUtils.fromJson(map.toString(), NewAllServerNotifyGuardEvent.class); Bus.get().post(notifyGuardEvent); - buyGuardInSameRoom(map); + if(mLiveUid.equals(map.getString("liveuid"))){ + buyGuardInSameRoom(map); + } } else if (action2 == 91) {//通用模板 AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent = GsonUtils.fromJson(map.toString(), AllServerNotifyFFGGGDJANEvent.class); Bus.get().post(notifyFFGGGDJANEvent); diff --git a/live/src/main/java/com/yunbao/live/socket/SocketSwClient.java b/live/src/main/java/com/yunbao/live/socket/SocketSwClient.java index 69c23c515..66326fad3 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketSwClient.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketSwClient.java @@ -470,7 +470,9 @@ public class SocketSwClient { } else if (action2 == 90) { NewAllServerNotifyGuardEvent notifyGuardEvent = GsonUtils.fromJson(map.toString(), NewAllServerNotifyGuardEvent.class); Bus.get().post(notifyGuardEvent); - buyGuardInSameRoom(map); + if(mLiveUid.equals(map.getString("liveuid"))){ + buyGuardInSameRoom(map); + } } else if (action2 == 91) { AllServerNotifyFFGGGDJANEvent notifyFFGGGDJANEvent = GsonUtils.fromJson(map.toString(), AllServerNotifyFFGGGDJANEvent.class); Bus.get().post(notifyFFGGGDJANEvent);