1:修改酒吧房弹框接口调用
This commit is contained in:
@@ -137,7 +137,7 @@ public class CommonAppContext extends MultiDexApplication implements Application
|
||||
@Getter
|
||||
public UnreadCountEvent unreadCountEvent;
|
||||
|
||||
public static int selectRelease = 1;
|
||||
public static int selectRelease = -1;
|
||||
|
||||
public int is_open = 0;//主题的开关
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.xscm.moduleutil.bean
|
||||
|
||||
/**
|
||||
* 项目名称:羽声语音
|
||||
* 时间:2026/1/6 14:25
|
||||
* 用途:
|
||||
*/
|
||||
class PitTimeRespBean {
|
||||
var time: Int = 0
|
||||
var time_str: String = ""
|
||||
/* "time": 5,
|
||||
"time_str": "5分钟"*/
|
||||
}
|
||||
@@ -42,7 +42,7 @@ public class RoonGiftModel {
|
||||
|
||||
//下面是在酒吧房使用的参数
|
||||
private int id;
|
||||
private String new_gift_name="";//用户设置的礼物内容
|
||||
private String gift_remark_name="";//用户设置的礼物内容
|
||||
|
||||
public boolean isCan_send_self() {
|
||||
if ( isManghe()) {
|
||||
|
||||
@@ -31,7 +31,7 @@ public enum QXRoomSeatViewType {
|
||||
/**
|
||||
* 酒吧
|
||||
*/
|
||||
PUB(11,"酒吧"),
|
||||
PUB(7,"酒吧"),
|
||||
/**
|
||||
* 酒吧
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@ enum class RoomType(
|
||||
DATING("交友", 1,3, 4, 8), // 1、3、4、8 均对应交友
|
||||
BLACK_ROOM("小黑屋", 6),
|
||||
JUKEBOX("点唱", 9),
|
||||
PUB_ROOM("酒吧", 11),
|
||||
PUB_ROOM("酒吧", 7),
|
||||
PRIVATE_ROOM("酒吧交友小屋", 12),
|
||||
MUTUAL_ENTERTAINMENT("互娱", 7),
|
||||
SIGN_CONTRACT("签约", 10);
|
||||
|
||||
@@ -358,13 +358,13 @@ public interface ApiServer {
|
||||
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();
|
||||
Call<BaseModel<List<RoonGiftModel>>> getCustomGiftList(@Query("user_id") String user_id);
|
||||
|
||||
@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 );
|
||||
Call<BaseModel<String>> setCustomGift(@Query("gift_id") String gift_id, @Query("gift_remark_name") String new_gift_name );
|
||||
|
||||
@GET(Constants.TOPIC_LIST)
|
||||
//获取话题
|
||||
@@ -545,6 +545,9 @@ public interface ApiServer {
|
||||
@POST(Constants.TASK_JUMP_ROOM)
|
||||
Call<BaseModel<String>> taskJumpRoomId(@Field("task_id") String taskId);
|
||||
|
||||
@GET(Constants.GET_PIT_TIME)
|
||||
Call<BaseModel<List<PitTimeRespBean>>> getPitTimeList();
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.DELETE_ALBUM_IMAGE)
|
||||
Call<BaseModel<String>> deleteAlbumImage(@Field("id") String id);
|
||||
|
||||
@@ -306,14 +306,14 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void setPitTime(String room_id,String time,BaseObserver<String> observer) {
|
||||
sApiServer.setPitTime(room_id,time).enqueue(new Callback<BaseModel<String>>() {
|
||||
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 {
|
||||
} else {
|
||||
ToastUtils.showLong("麦位时长设置错误", response.code());
|
||||
LogUtils.e("setPitTime", response.message());
|
||||
}
|
||||
@@ -2266,21 +2266,21 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void getCustomGiftList(BaseObserver<List<RoonGiftModel>> observer) {
|
||||
sApiServer.getCustomGiftList().enqueue(new Callback<BaseModel<List<RoonGiftModel>>>() {
|
||||
public void getCustomGiftList(String user_id, BaseObserver<List<RoonGiftModel>> observer) {
|
||||
sApiServer.getCustomGiftList(user_id).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());
|
||||
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());
|
||||
ToastUtils.showLong("自定义礼物数据错误", response.code());
|
||||
LogUtils.e("getGiftList", response.message());
|
||||
}
|
||||
}
|
||||
@@ -2291,21 +2291,22 @@ public class RetrofitClient {
|
||||
}
|
||||
});
|
||||
}
|
||||
public void getNewGiftList(int label,String type,BaseObserver<List<RoonGiftModel>> observer) {
|
||||
sApiServer.getNewGiftList(label,type).enqueue(new Callback<BaseModel<List<RoonGiftModel>>>() {
|
||||
|
||||
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());
|
||||
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());
|
||||
ToastUtils.showLong("酒吧房礼物数据错误", response.code());
|
||||
LogUtils.e("getGiftList", response.message());
|
||||
}
|
||||
}
|
||||
@@ -2323,9 +2324,9 @@ public class RetrofitClient {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
onNextRetu(response,observer);
|
||||
}else {
|
||||
ToastUtils.showLong("自定义礼物设置错误",response.code());
|
||||
onNextRetu(response, observer);
|
||||
} else {
|
||||
ToastUtils.showLong("自定义礼物设置错误", response.code());
|
||||
LogUtils.e("setCustomGift", response.message());
|
||||
}
|
||||
}
|
||||
@@ -2998,6 +2999,34 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void getPitTimeList(BaseObserver<List<PitTimeRespBean>> observer) {
|
||||
sApiServer.getPitTimeList().enqueue(new Callback<BaseModel<List<PitTimeRespBean>>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<List<PitTimeRespBean>>> call, Response<BaseModel<List<PitTimeRespBean>>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<List<PitTimeRespBean>> listBaseModel = response.body();
|
||||
if (listBaseModel.getCode() == 1)
|
||||
observer.onNext(listBaseModel.getData());
|
||||
else if (listBaseModel.getCode() == 301) {
|
||||
setCode301(listBaseModel.getMsg());
|
||||
} else if (listBaseModel.getCode() == 0) {
|
||||
ToastUtils.showLong(listBaseModel.getMsg());
|
||||
}
|
||||
}else {
|
||||
ToastUtils.showLong("麦位时长数据错误",response.code());
|
||||
LogUtils.e("getPitTimeList", response.message());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<List<PitTimeRespBean>>> call, Throwable t) {
|
||||
LogUtils.e("getPitTimeList", t.toString());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void updatePassword(String roomId, String password, BaseObserver<String> observer) {
|
||||
sApiServer.updatePassword(roomId, password).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
|
||||
@@ -37,21 +37,21 @@ public class ImageLoader {
|
||||
|
||||
public static void loadHead(Context context, ImageView view, String url) {
|
||||
RequestOptions options = RequestOptions.circleCropTransform();
|
||||
Glide.with(context).load(url).apply(options).error(com.xscm.moduleutil.R.mipmap.default_avatar).placeholder(R.mipmap.default_avatar).diskCacheStrategy(DiskCacheStrategy.ALL).into(view);
|
||||
Glide.with(context).load(url).apply(options).error(com.xscm.moduleutil.R.mipmap.default_avatar).placeholder(R.mipmap.default_avatar).diskCacheStrategy(DiskCacheStrategy.RESOURCE).thumbnail(0.1f).into(view);
|
||||
}
|
||||
|
||||
public static void loadHead(ImageView view, String url) {
|
||||
RequestOptions options = RequestOptions.circleCropTransform();
|
||||
Glide.with(view).load(url).apply(options).error(R.mipmap.default_avatar).placeholder(R.mipmap.default_avatar).diskCacheStrategy(DiskCacheStrategy.ALL).into(view);
|
||||
Glide.with(view).load(url).apply(options).error(R.mipmap.default_avatar).placeholder(R.mipmap.default_avatar).diskCacheStrategy(DiskCacheStrategy.RESOURCE).thumbnail(0.1f).into(view);
|
||||
}
|
||||
|
||||
public static void loadImage(ImageView view, String url) {
|
||||
Glide.with(view).load(url).error(R.mipmap.default_image).placeholder(R.mipmap.default_image).diskCacheStrategy(DiskCacheStrategy.ALL).into(view);
|
||||
Glide.with(view).load(url).error(R.mipmap.default_image).placeholder(R.mipmap.default_image).diskCacheStrategy(DiskCacheStrategy.RESOURCE).thumbnail(0.1f).into(view);
|
||||
}
|
||||
|
||||
public static void loadImage(Context context, ImageView view, String url) {
|
||||
Glide.with(context).load(url).error(R.mipmap.default_image).placeholder(R.mipmap.default_image)
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL).into(view);
|
||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE).thumbnail(0.1f).into(view);
|
||||
}
|
||||
/**
|
||||
* 加载图片并灰度
|
||||
@@ -62,7 +62,7 @@ public class ImageLoader {
|
||||
*/
|
||||
public static void loadImage(Context context,ImageView view, String url, Float placeholder) {
|
||||
Glide.with(context).load(url).apply(RequestOptions.bitmapTransform(new GrayscaleTransformation(placeholder)))
|
||||
.error(R.mipmap.default_image).placeholder(R.mipmap.default_image).diskCacheStrategy(DiskCacheStrategy.ALL).into(view);
|
||||
.error(R.mipmap.default_image).placeholder(R.mipmap.default_image).diskCacheStrategy(DiskCacheStrategy.RESOURCE).thumbnail(0.1f).into(view);
|
||||
}
|
||||
// 可调节灰度程度的方法
|
||||
public static void loadGrayscaleImage(Context context, String url, ImageView imageView, float saturation) {
|
||||
@@ -78,7 +78,7 @@ public class ImageLoader {
|
||||
} else {
|
||||
view.setVisibility(View.VISIBLE);
|
||||
}
|
||||
Glide.with(context).load(url).diskCacheStrategy(DiskCacheStrategy.ALL).into(view);
|
||||
Glide.with(context).load(url).diskCacheStrategy(DiskCacheStrategy.RESOURCE).into(view);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public class ImageUtils {
|
||||
* 默认加载
|
||||
*/
|
||||
public static void loadImageView(String path, ImageView mImageView) {
|
||||
Glide.with(mImageView).load(path).diskCacheStrategy(DiskCacheStrategy.ALL).into(mImageView);
|
||||
Glide.with(mImageView).load(path).diskCacheStrategy(DiskCacheStrategy.RESOURCE).thumbnail(0.1f).into(mImageView);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,7 +87,7 @@ public class ImageUtils {
|
||||
*/
|
||||
public static void loadIcon(String path, ImageView mImageView) {
|
||||
mImageView.setVisibility(TextUtils.isEmpty(path) ? GONE : View.VISIBLE);
|
||||
Glide.with(mImageView).load(path).diskCacheStrategy(DiskCacheStrategy.ALL).into(mImageView);
|
||||
Glide.with(mImageView).load(path).diskCacheStrategy(DiskCacheStrategy.RESOURCE).thumbnail(0.1f).into(mImageView);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -106,8 +106,8 @@ public class ImageUtils {
|
||||
* @param height
|
||||
*/
|
||||
public static void loadSample(String path, ImageView mImageView, int width, int height) {
|
||||
RequestOptions options = new RequestOptions().override(width, height).diskCacheStrategy(DiskCacheStrategy.ALL);
|
||||
Glide.with(mImageView).load(path).apply(options).into(mImageView);
|
||||
RequestOptions options = new RequestOptions().override(width, height).diskCacheStrategy(DiskCacheStrategy.RESOURCE);
|
||||
Glide.with(mImageView).load(path).apply(options).thumbnail(0.1f).into(mImageView);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -196,7 +196,7 @@ public class ImageUtils {
|
||||
return;
|
||||
}
|
||||
}
|
||||
Glide.with(mImageView).load(path).error(errorRes).placeholder(errorRes).centerCrop().diskCacheStrategy(DiskCacheStrategy.ALL).into(mImageView);
|
||||
Glide.with(mImageView).load(path).error(errorRes).placeholder(errorRes).centerCrop().diskCacheStrategy(DiskCacheStrategy.ALL).thumbnail(0.1f).into(mImageView);
|
||||
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ public class ImageUtils {
|
||||
return;
|
||||
}
|
||||
}
|
||||
Glide.with(mImageView).load(path).placeholder(R.mipmap.default_avatar).diskCacheStrategy(DiskCacheStrategy.ALL).into(mImageView);
|
||||
Glide.with(mImageView).load(path).placeholder(R.mipmap.default_avatar).diskCacheStrategy(DiskCacheStrategy.RESOURCE).thumbnail(0.1f).into(mImageView);
|
||||
}
|
||||
|
||||
public static void loadHeadCC(String path, ImageView mImageView) {
|
||||
@@ -226,7 +226,7 @@ public class ImageUtils {
|
||||
return;
|
||||
}
|
||||
}
|
||||
Glide.with(mImageView).asBitmap().load(path).error(R.mipmap.default_avatar).placeholder(R.mipmap.default_avatar).centerCrop().diskCacheStrategy(DiskCacheStrategy.ALL).into(mImageView);
|
||||
Glide.with(mImageView).asBitmap().load(path).error(R.mipmap.default_avatar).placeholder(R.mipmap.default_avatar).centerCrop().diskCacheStrategy(DiskCacheStrategy.RESOURCE).thumbnail(0.1f).into(mImageView);
|
||||
}
|
||||
|
||||
public static void loadHead(String path, ImageView mImageView) {
|
||||
@@ -240,7 +240,7 @@ public class ImageUtils {
|
||||
return;
|
||||
}
|
||||
}
|
||||
Glide.with(mImageView).load(path).diskCacheStrategy(DiskCacheStrategy.ALL).into(mImageView);
|
||||
Glide.with(mImageView).load(path).diskCacheStrategy(DiskCacheStrategy.RESOURCE).thumbnail(0.1f).into(mImageView);
|
||||
}
|
||||
|
||||
public static void loadHeadCC(String path, ImageView mImageView, LinearLayout.LayoutParams params) {
|
||||
@@ -255,7 +255,7 @@ public class ImageUtils {
|
||||
}
|
||||
}
|
||||
Glide.with(mImageView).asBitmap().load(path).error(R.mipmap.default_avatar).placeholder(R.mipmap.default_avatar)
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||
// 添加加载监听
|
||||
.listener(new RequestListener<Bitmap>() {
|
||||
@Override
|
||||
@@ -288,11 +288,11 @@ public class ImageUtils {
|
||||
}
|
||||
|
||||
public static void loadCenterCrop(String path, ImageView mImageView) {
|
||||
Glide.with(mImageView).load(path).centerCrop().diskCacheStrategy(DiskCacheStrategy.ALL).into(mImageView);
|
||||
Glide.with(mImageView).load(path).centerCrop().diskCacheStrategy(DiskCacheStrategy.RESOURCE).into(mImageView);
|
||||
}
|
||||
|
||||
public static void loadRes(int path, ImageView mImageView) {
|
||||
Glide.with(mImageView).load(path).diskCacheStrategy(DiskCacheStrategy.ALL).into(mImageView);
|
||||
Glide.with(mImageView).load(path).diskCacheStrategy(DiskCacheStrategy.RESOURCE).into(mImageView);
|
||||
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ public class ImageUtils {
|
||||
// Glide 加载配置
|
||||
Glide.with(context)
|
||||
.load(stableUrl)
|
||||
.diskCacheStrategy(DiskCacheStrategy.ALL) // 缓存所有版本
|
||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE) // 缓存所有版本
|
||||
.signature(new ObjectKey(signature)) // 使用签名确保缓存一致
|
||||
.placeholder(R.mipmap.room_bj) // 加载中占位图
|
||||
.error(R.mipmap.room_bj) // 加载失败占位图
|
||||
|
||||
@@ -268,6 +268,7 @@ public class Constants {
|
||||
public static final String JOIN_ROOM = "/api/Room/join_room";//加入房间
|
||||
public static final String BEFORE_JOIN_ROOM_CHECK = "/api/Room/before_join_room_check";//加入房间前检查
|
||||
public static final String TASK_JUMP_ROOM = "/api/Room/task_jump_room";//师徒任务 加入房间
|
||||
public static final String GET_PIT_TIME = "/api/BarRoom/get_pit_time_list";//酒吧房麦位时长列表
|
||||
|
||||
public static final String UPDATEPASSWORD = "/api/room/setRoomPassword";//更新房间秘密啊
|
||||
public static final String GET_ROOM_ONLINE = "/api/Room/room_online_list";//房间在线列表
|
||||
|
||||
Reference in New Issue
Block a user