From 5f487f74bd71bce3cf8c143920e2a089cd2bd3e1 Mon Sep 17 00:00:00 2001 From: 18142669586 <1669783059@qq.com> Date: Fri, 2 Dec 2022 17:09:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=9A=E4=BA=BA=E8=BF=9E?= =?UTF-8?q?=E9=BA=A6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/live/presenter/LiveRyLinkMicPkPresenter.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java index 5bef0d5ee..4756f499f 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java @@ -1197,14 +1197,17 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { @Override public void onSuccess(int code, String msg, String[] info) { Log.i(TAG, "code = " + code + ", msg = " + msg + ", info = " + Arrays.deepToString(info)); + JSONObject datas = JSONObject.parseObject(info[0]); boolean agree=true; - if (code != 0) { + if (datas.getIntValue("pk_num_day") <= 0) { ToastUtil.show("多人PK次数已用完"); agree=false; } + boolean finalAgree = agree; rtcRoom.getLocalUser().responseJoinOtherRoom(mApplyUid, mApplyUid, agree, true, SOCKET_LIVE_DRPK, new IRCRTCResultCallback() { @Override public void onSuccess() { + if(finalAgree == true){ HttpClient.getInstance().get("live.joinDRPKroom", "live.joinDRPKroom") .params("uid", CommonAppConfig.getInstance().getUid()) .params("roomid", u.getId()) @@ -1286,7 +1289,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { } } }); - + } } @Override