diff --git a/common/src/main/java/com/yunbao/common/bean/SendFreeGiftBean.java b/common/src/main/java/com/yunbao/common/bean/SendFreeGiftBean.java deleted file mode 100644 index a3b87253b..000000000 --- a/common/src/main/java/com/yunbao/common/bean/SendFreeGiftBean.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.yunbao.common.bean; - -import com.google.gson.annotations.SerializedName; - -import java.util.List; - -public class SendFreeGiftBean extends BaseModel{ - //"code":0,"msg":"","info":[]},"msg":"" - @SerializedName("code") - private int code; - @SerializedName("msg") - private String msg; - - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public String getMsg() { - return msg; - } - - public void setMsg(String msg) { - this.msg = msg; - } - - -} diff --git a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java index cf984ecbc..75e75eb77 100644 --- a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java +++ b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java @@ -222,7 +222,7 @@ public interface PDLiveApi { * @param liveuid 直播间id */ @GET("/api/public/?service=Tasknew.sendFreeGift") - Observable> sendFreeGift(@Query("liveuid") String liveuid); + Observable>> sendFreeGift(@Query("liveuid") String liveuid); /** * 清除系统消息的未读数 diff --git a/common/src/main/res/layout/dialog_live_interaction.xml b/common/src/main/res/layout/dialog_live_interaction.xml index f596d478b..b4610918b 100644 --- a/common/src/main/res/layout/dialog_live_interaction.xml +++ b/common/src/main/res/layout/dialog_live_interaction.xml @@ -211,8 +211,8 @@ android:orientation="vertical"> { + API.get().pdLiveApi(mContext).sendFreeGift(mLiveUid).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe( listResponseModel -> { EventBus.getDefault().post("stop_svga_new_user_gif"); EventBus.getDefault().post("stop_new_user_gif"); - if (listResponseModel.getData() != null && listResponseModel.getData().getCode() == 0) { + if (listResponseModel.getData().getCode()==0) { EventBus.getDefault().post("stop_new_user_gif1"); } dismiss();