修改每日任务,修改切换后更新背景音乐
This commit is contained in:
@@ -75,6 +75,7 @@ import com.qxcm.moduleutil.bean.room.AuctionBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomApplyListBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomAuction;
|
||||
import com.qxcm.moduleutil.bean.room.RoomBean;
|
||||
import com.qxcm.moduleutil.bean.room.RoomGiveGiftModel;
|
||||
import com.qxcm.moduleutil.bean.room.RoomInfoResp;
|
||||
import com.qxcm.moduleutil.bean.room.RoomOnline;
|
||||
import com.qxcm.moduleutil.bean.room.RoomOnlineBean;
|
||||
@@ -92,6 +93,7 @@ import java.net.Proxy;
|
||||
import java.security.KeyManagementException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -443,6 +445,23 @@ public class RetrofitClient {
|
||||
sApiServer.dailyTasksOpenBox(gift_box_id).compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
}
|
||||
|
||||
public void dailyTasksComplete(String task_id,BaseObserver<String> observer){
|
||||
sApiServer.dailyTasksComplete(task_id).enqueue(new Callback<ResponseBody>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {
|
||||
if (response.code() == 200){
|
||||
observer.onNext("任务完成");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<ResponseBody> call, Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void sendHeadine(String content, String money, String roomId, BaseObserver<String> observer) {
|
||||
sApiServer.sendHeadine(content, money, roomId).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
@@ -1225,6 +1244,60 @@ public class RetrofitClient {
|
||||
|
||||
public void firstChargeGift(BaseObserver<FirstChargeGiftBean> observer) {
|
||||
sApiServer.firstChargeGift().compose(new DefaultTransformer<>()).subscribe(observer);
|
||||
// .enqueue(new Callback<ResponseBody>() {
|
||||
// @Override
|
||||
// public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {
|
||||
// if (response.code() == 200) {
|
||||
// try {
|
||||
// String json = response.body().string();
|
||||
// BaseModel<FirstChargeGiftBean> data =GsonUtils.fromJson(json, BaseModel.class);
|
||||
//// String data1=GsonUtils.toJson(data.getData());
|
||||
//// LogUtils.e("data1",data.getData());
|
||||
//// FirstChargeGiftBean firstChargeGiftBean=new FirstChargeGiftBean();
|
||||
//// firstChargeGiftBean.setName(data.getData().getName());
|
||||
//// List<FirstChargeGiftBean.GiftBag> giftBags=new ArrayList<>();
|
||||
//// for (int i=0;i<data.getData().getGift_bag().size();i++){
|
||||
////
|
||||
//// FirstChargeGiftBean.GiftBag giftBag=new FirstChargeGiftBean.GiftBag();
|
||||
//// giftBag.setName(data.getData().getGift_bag().get(i).getName());
|
||||
//// giftBag.setMoney(data.getData().getGift_bag().get(i).getMoney());
|
||||
//// giftBag.setTitle1(data.getData().getGift_bag().get(i).getTitle1());
|
||||
//// giftBag.setTitle2(data.getData().getGift_bag().get(i).getTitle2());
|
||||
//// List<RoonGiftModel> roonGiftModels=new ArrayList<>();
|
||||
//// for (int j=0;j<data.getData().getGift_bag().get(i).getGift_list().size();j++){
|
||||
//// RoonGiftModel roonGiftModel=new RoonGiftModel();
|
||||
//// roonGiftModel.setGift_name(data.getData().getGift_bag().get(i).getGift_list().get(j).getGift_name());
|
||||
//// roonGiftModel.setNum(data.getData().getGift_bag().get(i).getGift_list().get(j).getNum());
|
||||
//// roonGiftModel.setGift_price(data.getData().getGift_bag().get(i).getGift_list().get(j).getGift_price());
|
||||
//// roonGiftModel.setType(data.getData().getGift_bag().get(i).getGift_list().get(j).getType());
|
||||
//// roonGiftModel.setBase_image(data.getData().getGift_bag().get(i).getGift_list().get(j).getBase_image());
|
||||
//// roonGiftModels.add(roonGiftModel);
|
||||
//// }
|
||||
//// giftBag.setGift_list(roonGiftModels);
|
||||
//// giftBags.add(giftBag);
|
||||
//// }
|
||||
////
|
||||
//// firstChargeGiftBean.setGift_bag(giftBags);
|
||||
//
|
||||
//
|
||||
//
|
||||
//// List<FirstChargeGiftBean> data2=GsonUtils.fromJson(data1, new TypeToken<List<FirstChargeGiftBean>>(){}.getType());
|
||||
//// observer.onNext(data2.get(0));
|
||||
//// FirstChargeGiftBean firstChargeGiftBean = GsonUtils.fromJson(data1, FirstChargeGiftBean.class);
|
||||
//// Object data3=GsonUtils.fromJson(data1, FirstChargeGiftBean.class);
|
||||
//// LogUtils.e("data3",data3);
|
||||
// observer.onNext(data.getData());
|
||||
// }catch (Exception e){
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFailure(Call<ResponseBody> call, Throwable t) {
|
||||
// t.printStackTrace();
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
public void applyPit(String roomId, String pitNumber, BaseObserver<String> observer) {
|
||||
@@ -1437,15 +1510,15 @@ public class RetrofitClient {
|
||||
|
||||
|
||||
public void quitRoom(String room_id, String user_id, BaseObserver<String> observer) {
|
||||
sApiServer.quitRoom(room_id, user_id).enqueue(new Callback<BaseModel<String>>() {
|
||||
sApiServer.quitRoom(room_id, user_id).enqueue(new Callback<ResponseBody>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response, observer);
|
||||
public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {
|
||||
observer.onNext(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
com.blankj.utilcode.util.ToastUtils.showShort(t.toString());
|
||||
public void onFailure(Call<ResponseBody> call, Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user