1:修改网络初始化的时候,放在点击了弹框后在进行

2:添加礼物墙展示用户信息功能
This commit is contained in:
2026-01-23 11:48:44 +08:00
parent d07ca522ab
commit 9f8f8137d1
20 changed files with 471 additions and 14 deletions

View File

@@ -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.POST_GIFT_WALL_USER_LIST) //礼物墙礼物用户列表
Call<BaseModel<GiftWallUserBean>> giftWallUserList( @Field("user_id") String user_id,@Field("gift_id")String gift_id,@Field("page") int page);
@FormUrlEncoded
@POST(Constants.SET_PIT_TIME)
Call<BaseModel<String>> setPitTime(@Field("room_id") String roomId, @Field("time") String time);

View File

@@ -329,6 +329,33 @@ public class RetrofitClient {
});
}
public void giftWallUserList(String user_id,String gift_id,int page,BaseObserver<GiftWallUserBean> observer) {
sApiServer.giftWallUserList(user_id,gift_id,page).enqueue(new Callback<BaseModel<GiftWallUserBean>>() {
@Override
public void onResponse(Call<BaseModel<GiftWallUserBean>> call, Response<BaseModel<GiftWallUserBean>> response) {
if (response.code() == 200) {
BaseModel<GiftWallUserBean> body = response.body();
if (body.getCode() == 1)
observer.onNext(body.getData());
else if (body.getCode() == 0) {
ToastUtils.showLong(body.getMsg());
}else if (body.getCode() == 301) {
setCode301(body.getMsg());
}
}else {
ToastUtils.showLong("请求礼物用户错误", response.code());
LogUtils.e("giftWallUserList", response.message());
}
}
@Override
public void onFailure(Call<BaseModel<GiftWallUserBean>> call, Throwable t) {
LogUtils.e("giftWallUserList", t.toString());
}
});
}
public void mobileView(String mobile, String new_mobile, String sms_code, String new_sms_code, BaseObserver<String> observer) {
sApiServer.mobileView(mobile, new_mobile, sms_code, new_sms_code).enqueue(new Callback<BaseModel<String>>() {
@Override