1:修改头像截取设置默认宽高
2:修改首页默认展示房间列表tab 3:修改创建房间,提示需要签约10个徒弟的功能 4:修改注销用户的时候,当有手机号的时候,进行二次验证码确认 5:首页推荐房间弹框
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package com.xscm.moduleutil.bean
|
||||
|
||||
/**
|
||||
* 项目名称:羽声语音
|
||||
* 时间:2025/12/8 16:30
|
||||
* 用途:首页弹框推荐房间
|
||||
*/
|
||||
class IndexRecommendRoom {
|
||||
var room_id: String? = ""
|
||||
var user_id: String? =""
|
||||
var room_name: String? = ""
|
||||
var room_cover: String? = ""
|
||||
|
||||
/* "id": "string",
|
||||
"user_id": "string",
|
||||
"room_name": "string",
|
||||
"room_cover": "string"*/
|
||||
}
|
||||
@@ -21,5 +21,6 @@ public class RoomTypeModel {
|
||||
private String label_name;
|
||||
private String type;
|
||||
private String sort;
|
||||
private int default_index; //1 选中 0 未选中
|
||||
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ public class UserInfo extends BaseEvent implements Serializable {
|
||||
private int charm_level; //魅力等级
|
||||
private int is_use_code; //是否是靓号 0否 1是
|
||||
private String tencent_im;
|
||||
private String token;
|
||||
private String jia_jia;//坐骑
|
||||
private int is_in_pit;//是否在麦上,1在0不在
|
||||
private int is_open_live_remind;//是否设置开播提醒
|
||||
@@ -70,6 +71,7 @@ public class UserInfo extends BaseEvent implements Serializable {
|
||||
|
||||
private RelationshipBean qinmi;
|
||||
private RelationshipBean zhenai;
|
||||
private String mobile;//手机号
|
||||
|
||||
private int heartId; // "heartId": 4,
|
||||
private int heartNum; //
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.xscm.moduleutil.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.blankj.utilcode.util.ScreenUtils;
|
||||
import com.xscm.moduleutil.R;
|
||||
import com.xscm.moduleutil.databinding.DialogInviteBinding;
|
||||
import com.xscm.moduleutil.widget.dialog.BaseDialog;
|
||||
/**
|
||||
*@author lxj
|
||||
*@data 2025年5月14日
|
||||
*@description: 房间邀请弹窗
|
||||
*/
|
||||
public class InviteDialog extends BaseDialog<DialogInviteBinding> {
|
||||
public InviteDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLayoutId() {
|
||||
return R.layout.dialog_invite;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView() {
|
||||
setCancelable(false);
|
||||
setCanceledOnTouchOutside(false);
|
||||
Window window = getWindow();
|
||||
window.setLayout((int) (ScreenUtils.getScreenWidth() * 315.f / 375), WindowManager.LayoutParams.WRAP_CONTENT);
|
||||
mBinding.ivClose.setOnClickListener(v -> dismiss());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -398,13 +398,16 @@ public interface ApiServer {
|
||||
@GET(Constants.GET_MY_CP_ROOM_LIST)
|
||||
Call<BaseModel<List<MyCpRoom>>> myCpRoom();
|
||||
|
||||
@GET(Constants.CHECK_CREATE_ROOM)
|
||||
Call<BaseModel<String>> checkCreateRoom();
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.CLEAR_LOGIN_INFO)
|
||||
Call<BaseModel<String>> clearLoginInfo(@Field("token") String token);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.CANCEL)
|
||||
Call<BaseModel<String>> cancel(@Field("token") String token);
|
||||
Call<BaseModel<String>> cancel(@Field("token") String token,@Field("sms_code")String sms_code);
|
||||
|
||||
@FormUrlEncoded
|
||||
@POST(Constants.POST_MODIFY_HIDE_STATUS)
|
||||
@@ -540,6 +543,9 @@ public interface ApiServer {
|
||||
@GET(Constants.GET_ACTIVITIES_PERMISSION)
|
||||
Call<BaseModel<ActivitiesPermission>> activitiesPermission();
|
||||
|
||||
@GET(Constants.GET_INDEX_RECOMMEND_ROOM)
|
||||
Call<BaseModel<IndexRecommendRoom>> index_recommend_room();
|
||||
|
||||
@GET(Constants.GET_DAY_DROP_GIFT)
|
||||
Call<BaseModel<HeavenGiftBean>> getDayDropGift();
|
||||
|
||||
|
||||
@@ -545,7 +545,7 @@ public class RetrofitClient {
|
||||
} catch (ClassNotFoundException e) {
|
||||
}
|
||||
} else {
|
||||
observer.onNext(baseModel.getMsg());
|
||||
ToastUtils.showLong(baseModel.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2338,6 +2338,39 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void check_create_room(BaseObserver<String> observer){
|
||||
sApiServer.checkCreateRoom().enqueue(new Callback<BaseModel<String>>() {
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<String> stringBaseModel = response.body();
|
||||
if (stringBaseModel.getCode() == 1) {
|
||||
observer.onNext("");
|
||||
}else if (stringBaseModel.getCode() == 0) {
|
||||
com.hjq.toast.ToastUtils.show(stringBaseModel.getMsg());
|
||||
}else if(stringBaseModel.getCode()==301){
|
||||
try {
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
ToastUtils.showShort(stringBaseModel.getMsg());
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}else {
|
||||
LogUtils.e("check_create_room", response.message());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<String>> call, Throwable t) {
|
||||
LogUtils.e("check_create_room", t);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void startPk(String pk_id, String pk_times, BaseObserver<String> observer) {
|
||||
sApiServer.startPk(pk_id, pk_times).enqueue(new Callback<ResponseBody>() {
|
||||
@Override
|
||||
@@ -2389,6 +2422,7 @@ public class RetrofitClient {
|
||||
if (activitiesPermissionBaseModel.getCode() == 1) {
|
||||
observer.onNext(activitiesPermissionBaseModel.getData());
|
||||
} else if (activitiesPermissionBaseModel.getCode() == 0) {
|
||||
observer.onNext(new ActivitiesPermission());
|
||||
ToastUtils.showShort(activitiesPermissionBaseModel.getMsg());
|
||||
} else if (activitiesPermissionBaseModel.getCode() == 301) {
|
||||
try {
|
||||
@@ -2408,6 +2442,36 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void index_recommend_room(BaseObserver<IndexRecommendRoom> observer) {
|
||||
sApiServer.index_recommend_room().enqueue(new Callback<BaseModel<IndexRecommendRoom>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<IndexRecommendRoom>> call, Response<BaseModel<IndexRecommendRoom>> response) {
|
||||
if (response.code() == 200) {
|
||||
BaseModel<IndexRecommendRoom> indexRecommendRoomBaseModel = response.body();
|
||||
if (indexRecommendRoomBaseModel.getCode() == 1) {
|
||||
observer.onNext(indexRecommendRoomBaseModel.getData());
|
||||
} else if (indexRecommendRoomBaseModel.getCode() == 0) {
|
||||
ToastUtils.showShort(indexRecommendRoomBaseModel.getMsg());
|
||||
} else if (indexRecommendRoomBaseModel.getCode() == 301) {
|
||||
try {
|
||||
CommonAppContext.getInstance().clearLoginInfo();
|
||||
ToastUtils.showShort(indexRecommendRoomBaseModel.getMsg());
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Call<BaseModel<IndexRecommendRoom>> call, Throwable t) {
|
||||
LogUtils.e("首页房间推荐",t.fillInStackTrace());
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void wallet(BaseObserver<WalletBean> observer) {
|
||||
sApiServer.wallet().enqueue(new Callback<BaseModel<WalletBean>>() {
|
||||
@Override
|
||||
@@ -3847,8 +3911,8 @@ public class RetrofitClient {
|
||||
});
|
||||
}
|
||||
|
||||
public void cancel(BaseObserver<String> observer) {
|
||||
sApiServer.cancel(SpUtil.getToken()).enqueue(new Callback<BaseModel<String>>() {
|
||||
public void cancel(String sms_code,BaseObserver<String> observer) {
|
||||
sApiServer.cancel(SpUtil.getToken(),sms_code).enqueue(new Callback<BaseModel<String>>() {
|
||||
|
||||
@Override
|
||||
public void onResponse(Call<BaseModel<String>> call, Response<BaseModel<String>> response) {
|
||||
|
||||
@@ -335,6 +335,7 @@ public class Constants {
|
||||
public static final String POST_AUCTION_MODE = "/api/RoomAuction/room_auction_mode";//修改房间竞拍模式
|
||||
public static final String POST_ROOM_AUCTION_LIST = "/api/RoomAuction/room_auction_list";//房间竞拍列表
|
||||
public static final String GET_MY_CP_ROOM_LIST = "/api/Room/my_cp_room";//我的Cp房
|
||||
public static final String CHECK_CREATE_ROOM = "/api/Room/check_create_room";//创建房间检测
|
||||
public static final String POST_SEARCH_PK_ROOM = "/api/RoomPk/search_pk_room";//搜索 或推荐的pk房间
|
||||
public static final String POST_SEND_PK = "/api/RoomPk/send_pk";//发起PK邀请
|
||||
public static final String ACCEPT_PK = "/api/RoomPk/accept_pk";//接受/拒绝 PK邀请
|
||||
@@ -383,6 +384,7 @@ public class Constants {
|
||||
public static final String GET_FIRST_CHARGE_GIFT = "/api/Activities/first_charge_gift";//首充好礼列表接口
|
||||
public static final String GET_NEW_CHARGE_GIFT = "/api/Activities/new_charge_gift";//新人好礼列表接口(弹框)
|
||||
public static final String GET_ACTIVITIES_PERMISSION = "/api/Activities/activities_permission";//活动弹框权限
|
||||
public static final String GET_INDEX_RECOMMEND_ROOM = "/api/Index/index_recommend_room";//首页弹窗推荐房间
|
||||
public static final String GET_DAY_DROP_GIFT = "/api/Activities/day_drop_gift";//天降好礼列表接口(弹框)
|
||||
public static final String dailyTasksReceive = "/api/Dailytasks/dailyTasksReceive";//领取每日任务奖励
|
||||
public static final String postRoomSwToken = "/api/Room/update_user_sw_token";//获取用户声网token
|
||||
|
||||
@@ -137,11 +137,11 @@ public class PictureSelectorUtil {
|
||||
public UCrop.Options buildOptions() {
|
||||
UCrop.Options options = new UCrop.Options();
|
||||
options.setHideBottomControls(true);//是否显示裁剪
|
||||
options.setFreeStyleCropEnabled(true);//裁剪是否可以拖动
|
||||
options.setFreeStyleCropEnabled(false);//裁剪是否可以拖动
|
||||
options.setShowCropFrame(true);//是否显示裁剪边缘
|
||||
options.setShowCropGrid(true);//是否显示裁剪网格
|
||||
options.setCircleDimmedLayer(false);//圆形头像裁剪
|
||||
options.withAspectRatio(1, 1);
|
||||
options.withAspectRatio(1, 1);//裁剪比例
|
||||
options.isCropDragSmoothToCenter(false);
|
||||
options.isForbidCropGifWebp(false);
|
||||
options.isForbidSkipMultipleCrop(true);
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/color_transparent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/invite_bj"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="275:180"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/invite_pic"
|
||||
android:layout_width="@dimen/dp_70"
|
||||
android:layout_height="@dimen/dp_70"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:background="@mipmap/invite_tx"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_bg"
|
||||
app:riv_border_color="@color/color_white"
|
||||
app:riv_border_width="1dp"
|
||||
app:riv_corner_radius="50dp"
|
||||
app:riv_mutate_background="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_c"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:gravity="center"
|
||||
android:text="邀请你进房陪她聊天"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toBottomOf="@+id/invite_pic" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_invite"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:background="@mipmap/invite_k"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:gravity="center"
|
||||
android:text="接受邀请(9s)"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_c" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:src="@mipmap/index_close_youth"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_bg" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
BIN
BaseModule/src/main/res/mipmap-hdpi/invite_bj.png
Normal file
BIN
BaseModule/src/main/res/mipmap-hdpi/invite_bj.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
BIN
BaseModule/src/main/res/mipmap-xhdpi/invite_bj.png
Normal file
BIN
BaseModule/src/main/res/mipmap-xhdpi/invite_bj.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
BIN
BaseModule/src/main/res/mipmap-xxhdpi/invite_bj.png
Normal file
BIN
BaseModule/src/main/res/mipmap-xxhdpi/invite_bj.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 65 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB |
Reference in New Issue
Block a user