1.添加背包礼物交友功能
This commit is contained in:
@@ -33,6 +33,7 @@ import com.xscm.moduleutil.bean.GiftBoxRecordBean;
|
||||
import com.xscm.moduleutil.bean.GiftLabelBean;
|
||||
import com.xscm.moduleutil.bean.GiftName;
|
||||
import com.xscm.moduleutil.bean.GiftPackBean;
|
||||
import com.xscm.moduleutil.bean.GiftPackListCount;
|
||||
import com.xscm.moduleutil.bean.GiftUserWallBean;
|
||||
import com.xscm.moduleutil.bean.HeadlineBean;
|
||||
import com.xscm.moduleutil.bean.HeatedBean;
|
||||
@@ -455,11 +456,29 @@ public class RetrofitClient {
|
||||
}
|
||||
|
||||
public void giftPack(BaseObserver<List<GiftPackBean>> observer) {
|
||||
sApiServer.giftPack().compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
sApiServer.giftPack().enqueue(new Callback<BaseModel<List<GiftPackBean>>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<GiftPackBean>>> call, Response<BaseModel<List<GiftPackBean>>> response) {
|
||||
if (response.code() == 200){
|
||||
BaseModel<List<GiftPackBean>> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
} else {
|
||||
observer.onNext(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<List<GiftPackBean>>> call, Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void getGiftPack(String roomId, String userId, String heart_id,BaseObserver<String> observer){
|
||||
sApiServer.getGiftPack(roomId,userId,heart_id).enqueue(new Callback<BaseModel<String>>() {
|
||||
public void getGiftPack(String roomId, String userId, String heart_id,String auction_id,BaseObserver<String> observer){
|
||||
sApiServer.getGiftPack(roomId,userId,heart_id,auction_id).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200){
|
||||
@@ -479,6 +498,25 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void getGiftPackListCount(BaseObserver<GiftPackListCount> observer){
|
||||
sApiServer.getGiftPackListCount().enqueue(new Callback<BaseModel<GiftPackListCount>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<GiftPackListCount>> call, Response<BaseModel<GiftPackListCount>> response) {
|
||||
if (response.code() == 200){
|
||||
BaseModel<GiftPackListCount> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1){
|
||||
observer.onNext(baseModel.getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<GiftPackListCount>> call, Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void tasksLihen(BaseObserver<GiftBoxBean> observer) {
|
||||
sApiServer.tasksLihen().enqueue(new Callback<ResponseBody>() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user