1:修改其他房间类型送礼出现的报错

This commit is contained in:
2025-11-25 09:12:09 +08:00
parent 0dd7c367cb
commit cc42d0f90f

View File

@@ -3099,13 +3099,17 @@ public class RetrofitClient {
if (response.code() == 200) {
BaseModel<RoomGiftData> data = response.body();
if (data.getCode() == 1) {
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) {