合并1
This commit is contained in:
@@ -288,12 +288,11 @@ public interface ApiServer {
|
||||
@GET(Constants.GET_GIFT_LABEL)
|
||||
Call<BaseModel<List<GiftLabelBean>>> getGiftLabel(@Query("have_hot") String have_hot);
|
||||
|
||||
//获取礼物列表
|
||||
@GET(Constants.GIFT_LIST)
|
||||
//获取礼物列表
|
||||
Call<BaseModel<List<RoonGiftModel>>> getGiftList(@Query("label") int label,@Query("room_id")String room_id);
|
||||
|
||||
@GET(Constants.TOPIC_LIST)
|
||||
//获取话题
|
||||
@GET(Constants.TOPIC_LIST)//获取话题
|
||||
Call<BaseModel<List<HeatedBean>>> topicList(@Query("page") String page, @Query("page_limit") String page_limit);
|
||||
|
||||
@FormUrlEncoded
|
||||
@@ -357,6 +356,10 @@ public interface ApiServer {
|
||||
@POST(Constants.CANCEL)
|
||||
Call<BaseModel<String>> cancel(@Field("token") String token);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_MODIFY_HIDE_STATUS)
|
||||
Call<BaseModel<String>> getModifyHideStatus(@Field("hide_status") String hide_status);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.DELETE_ZONE)
|
||||
Call<BaseModel<String>> deleteZone(@Field("id") String id);
|
||||
@@ -512,7 +515,8 @@ public interface ApiServer {
|
||||
@Field("coin") String coin,
|
||||
@Field("type") String type,
|
||||
@Field("type_params") String type_params,
|
||||
@Field("type_id") String type_id
|
||||
@Field("type_id") String type_id,
|
||||
@Field("nobility_id") String nobility_id
|
||||
);
|
||||
|
||||
@FormUrlEncoded
|
||||
@@ -753,6 +757,15 @@ public interface ApiServer {
|
||||
@POST(Constants.GIFT_SEND)
|
||||
Call<BaseModel<String>> giftSend(@Field("send_id")String send_id);
|
||||
|
||||
@GET(Constants.GET_NOBILITY_DETAIL)
|
||||
Call<BaseModel<NobilitDeatils>> getNobilityDetail();
|
||||
|
||||
@GET(Constants.GET_NOBILITY_LIST)
|
||||
Call<BaseModel<List<NobilitList>>> getNobilityList();
|
||||
|
||||
@GET(Constants.GET_NOBILITY_PRICE)
|
||||
Call<BaseModel<NobilityPrice>> getNobilityPrice(@Query("id") String id);
|
||||
|
||||
@GET(Constants.GET_BOX_GIFT_LIST_XLH)
|
||||
Call<BaseModel<BlindBoxBean>> getBoxGiftListXLH( @Query("room_id") String room_id);
|
||||
|
||||
|
||||
@@ -788,7 +788,19 @@ public class RetrofitClient {
|
||||
@Override
|
||||
public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {
|
||||
if (response.code() == 200) {
|
||||
observer.onNext("任务完成");
|
||||
try {
|
||||
String json = response.body().string();
|
||||
BaseModel<String> baseModel = GsonUtils.fromJson(json, BaseModel.class);
|
||||
if (baseModel.getCode() == 1) {
|
||||
baseModel.setData(baseModel.getMsg());
|
||||
observer.onNext(baseModel.getData());
|
||||
} else {
|
||||
com.hjq.toast.ToastUtils.show(baseModel.getMsg());
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1408,8 +1420,8 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void getBanners(BaseObserver<List<BannerModel>> observer) {
|
||||
sApiServer.getBanners("3").enqueue(new Callback<BaseModel<List<BannerModel>>>() {
|
||||
public void getBanners(String s,BaseObserver<List<BannerModel>> observer) {
|
||||
sApiServer.getBanners(s).enqueue(new Callback<BaseModel<List<BannerModel>>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<BannerModel>>> call, Response<BaseModel<List<BannerModel>>> response) {
|
||||
if (response.code() == 200) {
|
||||
@@ -2132,8 +2144,8 @@ public class RetrofitClient {
|
||||
// });
|
||||
}
|
||||
|
||||
public void appPay(String user_id, String money, String coin, String type, String type_params, String type_id, BaseObserver<AppPay> observer) {
|
||||
sApiServer.appPay(user_id, money, coin, type, type_params, type_id).enqueue(new Callback<BaseModel<AppPay>>() {
|
||||
public void appPay(String user_id, String money, String coin, String type, String type_params, String type_id,String nobility_id, BaseObserver<AppPay> observer) {
|
||||
sApiServer.appPay(user_id, money, coin, type, type_params, type_id,nobility_id).enqueue(new Callback<BaseModel<AppPay>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<AppPay>> call, Response<BaseModel<AppPay>> response) {
|
||||
if (response.code() == 200) {
|
||||
@@ -3389,7 +3401,19 @@ public class RetrofitClient {
|
||||
}
|
||||
});
|
||||
}
|
||||
public void getModifyHideStatus(String hide_status, BaseObserver<String> observer ){
|
||||
sApiServer.getModifyHideStatus(hide_status).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
onNextRetu(response, observer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
public void getPostData(String new_password, String mobile, String code, String userId, BaseObserver<String> observer) {
|
||||
sApiServer.getPostData(new_password, mobile, code, userId).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
@@ -3943,6 +3967,87 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void getNobilityDetail(BaseObserver<NobilitDeatils> observer){
|
||||
sApiServer.getNobilityDetail().enqueue(new Callback<BaseModel<NobilitDeatils>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<NobilitDeatils>> call, Response<BaseModel<NobilitDeatils>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<NobilitDeatils> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}else if (baseModel.getCode() == 0){
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}else if (baseModel.getCode() == 301){
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<NobilitDeatils>> call, Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void getNobilityList(BaseObserver<List<NobilitList>> observer){
|
||||
sApiServer.getNobilityList().enqueue(new Callback<BaseModel<List<NobilitList>>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<NobilitList>>> call, Response<BaseModel<List<NobilitList>>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<List<NobilitList>> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}else if (baseModel.getCode() == 0){
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}else if (baseModel.getCode() == 301){
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<List<NobilitList>>> call, Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void getNobilityPrice(String id, BaseObserver<NobilityPrice> observer){
|
||||
sApiServer.getNobilityPrice(id).enqueue(new Callback<BaseModel<NobilityPrice>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<NobilityPrice>> call, Response<BaseModel<NobilityPrice>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<NobilityPrice> baseModel = response.body();
|
||||
if (baseModel.getCode() == 1) {
|
||||
observer.onNext(baseModel.getData());
|
||||
}else if (baseModel.getCode() == 0){
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
}else if (baseModel.getCode() == 301){
|
||||
try {
|
||||
ToastUtils.showShort(baseModel.getMsg());
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
} catch (ClassNotFoundException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<NobilityPrice>> call, Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void giftSend(String send_id, BaseObserver<String> observer) {
|
||||
sApiServer.giftSend(send_id).enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user