1:添加酒吧房的弹框获取数据
This commit is contained in:
@@ -13,7 +13,7 @@ public class RoonGiftModel {
|
||||
private String gift_name;//礼物名称
|
||||
private String base_image;//礼物图片
|
||||
private String gift_price;//礼物价格
|
||||
private String gift_id;//礼物id
|
||||
private String gift_id="";//礼物id
|
||||
private String gift_bag_name;
|
||||
private String rule;
|
||||
private String rule_url;
|
||||
@@ -38,6 +38,12 @@ public class RoonGiftModel {
|
||||
|
||||
private int is_cp;//1:是 0:不是 是不是cp心动礼物
|
||||
private int is_teacher;//1:是 0:不是 是不是师徒礼物
|
||||
|
||||
|
||||
//下面是在酒吧房使用的参数
|
||||
private int id;
|
||||
private String new_gift_name="";//用户设置的礼物内容
|
||||
|
||||
public boolean isCan_send_self() {
|
||||
if ( isManghe()) {
|
||||
return true;
|
||||
|
||||
@@ -40,6 +40,10 @@ public interface ApiServer {
|
||||
@POST(Constants.MODIFY_MOBILE)
|
||||
Call<BaseModel<String>> mobileView(@Field("mobile") String mobile, @Field("new_mobile") String new_mobile, @Field("sms_code") String sms_code,@Field("new_sms_code") String new_sms_code);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.SET_PIT_TIME)
|
||||
Call<BaseModel<String>> setPitTime(@Field("room_id") String roomId, @Field("time") String time);
|
||||
|
||||
@GET(Constants.GET_FESTIVAL_THEME)
|
||||
Call<BaseModel<FestivalThemeBean>> getFestivalThemeBean();
|
||||
|
||||
@@ -353,6 +357,15 @@ public interface ApiServer {
|
||||
@GET(Constants.GIFT_LIST)
|
||||
Call<BaseModel<List<RoonGiftModel>>> getGiftList(@Query("label") int label, @Query("room_id") String room_id);
|
||||
|
||||
@GET(Constants.GET_CUSTOM_GIFT_LIST)
|
||||
Call<BaseModel<List<RoonGiftModel>>> getCustomGiftList();
|
||||
|
||||
@GET(Constants.GET_NEW_GIFT_LIST)
|
||||
Call<BaseModel<List<RoonGiftModel>>> getNewGiftList(@Query("label") int label, @Query("type") String type );
|
||||
|
||||
@GET(Constants.SET_CUSTOM_GIFT)
|
||||
Call<BaseModel<String>> setCustomGift(@Query("gift_id") String gift_id, @Query("new_gift_name") String new_gift_name );
|
||||
|
||||
@GET(Constants.TOPIC_LIST)
|
||||
//获取话题
|
||||
Call<BaseModel<List<HeatedBean>>> topicList(@Query("page") String page, @Query("page_limit") String page_limit);
|
||||
|
||||
@@ -304,7 +304,26 @@ public class RetrofitClient {
|
||||
LogUtils.e("getFestivalTheme", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void setPitTime(String room_id,String time,BaseObserver<String> observer) {
|
||||
sApiServer.setPitTime(room_id,time).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
onNextRetu(response, observer);
|
||||
}else {
|
||||
ToastUtils.showLong("麦位时长设置错误", response.code());
|
||||
LogUtils.e("setPitTime", response.message());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
LogUtils.e("setPitTime", t.toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void mobileView(String mobile, String new_mobile, String sms_code, String new_sms_code, BaseObserver<String> observer) {
|
||||
@@ -2247,6 +2266,78 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void getCustomGiftList(BaseObserver<List<RoonGiftModel>> observer) {
|
||||
sApiServer.getCustomGiftList().enqueue(new Callback<BaseModel<List<RoonGiftModel>>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<RoonGiftModel>>> call, Response<BaseModel<List<RoonGiftModel>>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<List<RoonGiftModel>> listBaseModel = response.body();
|
||||
if (listBaseModel.getCode() == 1) {
|
||||
observer.onNext(listBaseModel.getData()==null ? new ArrayList<>() : listBaseModel.getData());
|
||||
} else if (listBaseModel.getCode() == 0) {
|
||||
ToastUtils.showLong(listBaseModel.getMsg());
|
||||
} else if (listBaseModel.getCode() == 301) {
|
||||
setCode301(listBaseModel.getMsg());
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showLong("自定义礼物数据错误",response.code());
|
||||
LogUtils.e("getGiftList", response.message());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<List<RoonGiftModel>>> call, Throwable t) {
|
||||
LogUtils.e("getGiftList", t.fillInStackTrace());
|
||||
}
|
||||
});
|
||||
}
|
||||
public void getNewGiftList(int label,String type,BaseObserver<List<RoonGiftModel>> observer) {
|
||||
sApiServer.getNewGiftList(label,type).enqueue(new Callback<BaseModel<List<RoonGiftModel>>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<RoonGiftModel>>> call, Response<BaseModel<List<RoonGiftModel>>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<List<RoonGiftModel>> listBaseModel = response.body();
|
||||
if (listBaseModel.getCode() == 1) {
|
||||
observer.onNext(listBaseModel.getData()==null ? new ArrayList<>() : listBaseModel.getData());
|
||||
} else if (listBaseModel.getCode() == 0) {
|
||||
ToastUtils.showLong(listBaseModel.getMsg());
|
||||
} else if (listBaseModel.getCode() == 301) {
|
||||
setCode301(listBaseModel.getMsg());
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showLong("酒吧房礼物数据错误",response.code());
|
||||
LogUtils.e("getGiftList", response.message());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<List<RoonGiftModel>>> call, Throwable t) {
|
||||
LogUtils.e("getGiftList", t.fillInStackTrace());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void setCustomGift(String gift_id, String new_gift_name, BaseObserver<String> observer) {
|
||||
sApiServer.setCustomGift(gift_id, new_gift_name).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
onNextRetu(response,observer);
|
||||
}else {
|
||||
ToastUtils.showLong("自定义礼物设置错误",response.code());
|
||||
LogUtils.e("setCustomGift", response.message());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
LogUtils.e("setCustomGift", t.fillInStackTrace());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void singerUpdateSong(String songId, String song_name, String gift_id, String gift_num, BaseObserver<String> observer) {
|
||||
sApiServer.singerUpdateSong(songId, song_name, gift_id, gift_num).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
|
||||
@@ -225,6 +225,9 @@ public class Constants {
|
||||
public static final String GET_REWARD_LIST = "/api/UserZone/reward_list";//动态打赏列表
|
||||
public static final String GET_GIFT_LABEL = "/api/Gift/get_gift_label";//礼物标签
|
||||
public static final String GIFT_LIST = "/api/Gift/get_gift_list";//礼物列表
|
||||
public static final String GET_CUSTOM_GIFT_LIST = "/api/GiftNew/get_custom_gift_list";//自定义礼物列表
|
||||
public static final String GET_NEW_GIFT_LIST = "/api/GiftNew/get_gift_list";//新礼物列表
|
||||
public static final String SET_CUSTOM_GIFT = "/api/GiftNew/set_custom_gift";//自定义礼物设置
|
||||
public static final String TOPIC_LIST = "/api/UserZone/topic_list";//获取话题列表
|
||||
public static final String PUBLISH_ZONE = "/api/UserZone/publish_zone";//发布动态
|
||||
public static final String GET_CATEGORIES = "/api/UserZone/get_zone_topic";//动态引用的四条话题
|
||||
@@ -452,9 +455,9 @@ public class Constants {
|
||||
public static final String POST_DAILY_TASKS_SIGN_STATUS = "/api/Tasks/dailyTasksSignStatus";//每日签到状态
|
||||
|
||||
|
||||
|
||||
// public static final String MODIFY_MOBILE = "/api/UserData/modify_mobile";//手机换绑
|
||||
// public static final String MODIFY_MOBILE = "/api/UserData/modify_mobile";//手机换绑
|
||||
public static final String MODIFY_MOBILE = "/api/UserData/modify_mobiles";//手机换绑
|
||||
public static final String SET_PIT_TIME = "/api/BarRoom/set_pit_time";//房间麦位时长设置
|
||||
public static final String BIND_MOBILE = "/api/UserData/bind_mobile";//手机绑定
|
||||
public static final String GET_FESTIVAL_THEME = "/api/Theme/get_festival_theme";//节日主题接口
|
||||
public static final String GET_PERSONALTY_LIST_BEAN = "/api/Decorate/get_decorate_list";//装饰列表
|
||||
@@ -467,5 +470,4 @@ public class Constants {
|
||||
public static final String POST_SIGN_COIN = "/api/Sign/sign_coin";//签约出价
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user