From cc42d0f90ff38c839a077e28723461b9dc4398df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E5=B0=8F=E6=B1=9F?= <461355754@qq.com> Date: Tue, 25 Nov 2025 09:12:09 +0800 Subject: [PATCH] =?UTF-8?q?1=EF=BC=9A=E4=BF=AE=E6=94=B9=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E6=88=BF=E9=97=B4=E7=B1=BB=E5=9E=8B=E9=80=81=E7=A4=BC=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E7=9A=84=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xscm/moduleutil/http/RetrofitClient.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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 f296f0c8..a5b302c0 100644 --- a/BaseModule/src/main/java/com/xscm/moduleutil/http/RetrofitClient.java +++ b/BaseModule/src/main/java/com/xscm/moduleutil/http/RetrofitClient.java @@ -3099,13 +3099,17 @@ public class RetrofitClient { if (response.code() == 200) { BaseModel data = response.body(); if (data.getCode() == 1) { - if (data.getData().getCp_type() != null) { - if (cpListener != null) { - cpListener.onSendCpMsg(data.getData()); + if (data.getData()!=null) { + if (data.getData().getCp_type() != null) { + if (cpListener != null) { + cpListener.onSendCpMsg(data.getData()); + } } - } - observer.onNext(data.getData()); + observer.onNext(data.getData());//2025年11月25日09:10:54,服务端修改,应该是都不能等于null + }else { + observer.onNext(new RoomGiftData());//这里添加这个,是预防报错 + } } else if (data.getCode() == 0) { ToastUtils.showShort(data.getMsg()); } else if (data.getCode() == 301) {