From 9bf2de01d4d4401cc59ee3101bb3d031600dc9cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E5=B0=8F=E6=B1=9F?= <461355754@qq.com> Date: Mon, 22 Dec 2025 22:30:34 +0800 Subject: [PATCH] =?UTF-8?q?1:=E4=BF=AE=E6=94=B9=E7=A4=BC=E7=89=A9=E9=A3=98?= =?UTF-8?q?=E5=B1=8F=E5=88=A4=E6=96=AD=E9=80=81=E7=9A=84=E4=BA=BA=E5=92=8C?= =?UTF-8?q?=E6=8E=A5=E6=94=B6=E7=9A=84=E4=BA=BA=202=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=89=80=E6=9C=89=E7=9B=98=E5=9C=A8=E6=AC=A1=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E9=80=89=E4=B8=AD=E7=8A=B6=E6=80=81=203=EF=BC=9A?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A4=BC=E7=89=A9=E9=A3=98=E5=B1=8F=E7=9A=84?= =?UTF-8?q?=E6=96=87=E5=AD=97=E5=A4=A7=E5=B0=8F=204=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=A6=96=E9=A1=B5=E5=8E=BB=E5=9B=B4=E8=A7=82=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E7=9A=84=E6=96=87=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xscm/moduleutil/bean/GiftBean.java | 3 +- .../xscm/moduleutil/http/RetrofitClient.java | 62 +++++++++++-------- .../src/main/res/layout/item_piaoping.xml | 4 +- .../activity/room/activity/RoomActivity.kt | 2 +- .../room/fragment/VoiceCategoryFragment.java | 7 ++- .../modulemain/dialog/GiftLotteryDialog.java | 11 ++++ 6 files changed, 57 insertions(+), 32 deletions(-) diff --git a/BaseModule/src/main/java/com/xscm/moduleutil/bean/GiftBean.java b/BaseModule/src/main/java/com/xscm/moduleutil/bean/GiftBean.java index d1ee1452..1f3f319c 100644 --- a/BaseModule/src/main/java/com/xscm/moduleutil/bean/GiftBean.java +++ b/BaseModule/src/main/java/com/xscm/moduleutil/bean/GiftBean.java @@ -41,7 +41,8 @@ public class GiftBean { public boolean isSameGiftFromSameSender(GiftBean other) { if (other == null) return false; return Objects.equals(gift_id, other.gift_id) && - Objects.equals(senderName, other.senderName); + Objects.equals(senderName, other.senderName) && + Objects.equals(nickname,other.nickname); } // 生成礼物唯一键 diff --git a/BaseModule/src/main/java/com/xscm/moduleutil/http/RetrofitClient.java b/BaseModule/src/main/java/com/xscm/moduleutil/http/RetrofitClient.java index 098cfdc1..258110a5 100644 --- a/BaseModule/src/main/java/com/xscm/moduleutil/http/RetrofitClient.java +++ b/BaseModule/src/main/java/com/xscm/moduleutil/http/RetrofitClient.java @@ -2960,41 +2960,49 @@ public class RetrofitClient { public void roomAuctionJoin(String auctionId, String userId, String giftId, String num, String type, BaseObserver observer) { - sApiServer.roomAuctionJoin(auctionId, userId, giftId, num, type).enqueue(new ApiResponseCallback(CommonAppContext.getInstance()) { - @Override - public void onSuccess(RoomAuction.AuctionListBean data) { - if (data != null) { - observer.onNext(data); - } else { - observer.onNext(new RoomAuction.AuctionListBean()); - } - } - - @Override - public void onFailure(Throwable t) { - t.printStackTrace(); - } - }); -// .enqueue(new Callback>() { -// + sApiServer.roomAuctionJoin(auctionId, userId, giftId, num, type) +// .enqueue(new ApiResponseCallback(CommonAppContext.getInstance()) { // @Override -// public void onResponse(Call> call, Response> response) { -// if (response.code() == 200) { -// BaseModel baseModel = response.body(); -// -// if (baseModel.getCode() == 1) { -// observer.onNext( null); -// } else { -// ToastUtils.showShort(baseModel.getMsg()); -// } +// public void onSuccess(RoomAuction.AuctionListBean data) { +// if (data != null) { +// observer.onNext(data); +// } else { +// observer.onNext(new RoomAuction.AuctionListBean()); // } // } // // @Override -// public void onFailure(Call> call, Throwable t) { +// public void onFailure(Throwable t) { // t.printStackTrace(); // } // }); + .enqueue(new Callback>() { + + @Override + public void onResponse(Call> call, Response> response) { + if (response.code() == 200) { + BaseModel baseModel = response.body(); + + if (baseModel.getCode() == 1) { + observer.onNext( new RoomAuction.AuctionListBean()); + }else if (baseModel.getCode() == 0) { + ToastUtils.showShort(baseModel.getMsg()); + }else if (baseModel.getCode() == 301) { + try { + ToastUtils.showShort(baseModel.getMsg()); + CommonAppContext.getInstance().clearLoginInfo(); + } catch (ClassNotFoundException e) { + throw new RuntimeException(e); + } + } + } + } + + @Override + public void onFailure(Call> call, Throwable t) { + t.printStackTrace(); + } + }); } public void auctionDelay(String auctionId, BaseObserver observer) { diff --git a/BaseModule/src/main/res/layout/item_piaoping.xml b/BaseModule/src/main/res/layout/item_piaoping.xml index 968573b2..c830f41a 100644 --- a/BaseModule/src/main/res/layout/item_piaoping.xml +++ b/BaseModule/src/main/res/layout/item_piaoping.xml @@ -34,7 +34,7 @@ android:maxLines="2" android:text="礼品" android:textColor="#FFDE77" - android:textSize="14sp" + android:textSize="12sp" android:textStyle="bold" /> diff --git a/MainModule/src/main/java/com/xscm/modulemain/activity/room/activity/RoomActivity.kt b/MainModule/src/main/java/com/xscm/modulemain/activity/room/activity/RoomActivity.kt index 3d573ab6..fc9bec91 100644 --- a/MainModule/src/main/java/com/xscm/modulemain/activity/room/activity/RoomActivity.kt +++ b/MainModule/src/main/java/com/xscm/modulemain/activity/room/activity/RoomActivity.kt @@ -1513,7 +1513,7 @@ class RoomActivity : BaseMvpActivity(), } else if (msgType == EMMessageInfo.QXRoomMessageTypeSignTipText) { roomFragment?.handleRoomMessage(messageEvent) }else if (msgType == EMMessageInfo.QXRoomMessageTypeSignChat) {//暴币展示 - QXGiftPlayerManager.getInstance(this).displayFullEffectView(messageEvent.text.play_image) + QXGiftPlayerManager.getInstance(this).displayChatEffectView(messageEvent.text.play_image) } } diff --git a/MainModule/src/main/java/com/xscm/modulemain/activity/room/fragment/VoiceCategoryFragment.java b/MainModule/src/main/java/com/xscm/modulemain/activity/room/fragment/VoiceCategoryFragment.java index dd102519..4fdb9733 100644 --- a/MainModule/src/main/java/com/xscm/modulemain/activity/room/fragment/VoiceCategoryFragment.java +++ b/MainModule/src/main/java/com/xscm/modulemain/activity/room/fragment/VoiceCategoryFragment.java @@ -5,6 +5,7 @@ import static android.view.View.GONE; import android.content.Intent; import android.graphics.Color; import android.os.Bundle; +import android.text.TextUtils; import android.util.DisplayMetrics; import android.util.TypedValue; import android.view.LayoutInflater; @@ -233,7 +234,11 @@ public class VoiceCategoryFragment extends BaseMvpFragment