1:修改酒吧房弹框接口调用
2:修改直播间送礼接口
This commit is contained in:
@@ -597,7 +597,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
}
|
||||
return currentItem;
|
||||
}
|
||||
|
||||
private String gift_bag="";
|
||||
private void giveGift(String num) {
|
||||
getSelectedGift();
|
||||
int currentItem = mBinding.viewPager.getCurrentItem();
|
||||
@@ -647,12 +647,16 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
//礼物打赏
|
||||
giftNumber = num;
|
||||
|
||||
if(roonGiftModel.getActivities_id()==4){
|
||||
gift_bag=roonGiftModel.getGift_bag()+"";
|
||||
}
|
||||
|
||||
if (userInfo != null) {
|
||||
if (userInfo.getPit_number() != null) {
|
||||
if (userInfo.getPit_number().equals("888") || userInfo.getPit_number().equals("")) {
|
||||
if (userInfo.getPit_number().isEmpty() || jingp != 1) {
|
||||
roomGiftGiveEvent = new RoomGiftGiveEvent(userId, roomId, pit, num, 0, null, roonGiftModel, heart_id, "");
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit, "");
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit, "",gift_bag);
|
||||
} else {
|
||||
roomGiftGiveEvent = new RoomGiftGiveEvent(userId, roomId, pit, num, 0, null, roonGiftModel, heart_id, userInfo.getAuction_id());
|
||||
EventBus.getDefault().post(roomGiftGiveEvent);
|
||||
@@ -662,17 +666,17 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
}
|
||||
} else {
|
||||
roomGiftGiveEvent = new RoomGiftGiveEvent(userId, roomId, pit, num, 0, null, roonGiftModel, heart_id, "");
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit, heart_id);
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit, heart_id,gift_bag);
|
||||
}
|
||||
} else {
|
||||
roomGiftGiveEvent = new RoomGiftGiveEvent(userId, roomId, pit, num, 0, null, roonGiftModel, heart_id, "");
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit, "");
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit, "",gift_bag);
|
||||
}
|
||||
} else {
|
||||
if (all) {
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", null, "");
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", null, "",gift_bag);
|
||||
} else {
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit, "");
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "1", pit, "",gift_bag);
|
||||
}
|
||||
roomGiftGiveEvent = new RoomGiftGiveEvent(userId, roomId, pit, num, 0, null, roonGiftModel, heart_id, "");
|
||||
}
|
||||
@@ -680,14 +684,14 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
if (userInfo == null) {
|
||||
giftNumber = num;
|
||||
beibaoId = roonGiftModel.getGift_id();
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "2", pit, heart_id);
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "2", pit, heart_id,"");
|
||||
return;
|
||||
}
|
||||
if (userInfo.getPit_number() != null && userInfo.getPit_number().equals("888") || userInfo.getPit_number().equals("")) {
|
||||
if (userInfo.getPit_number().isEmpty() || jingp != 1) {
|
||||
giftNumber = num;
|
||||
beibaoId = roonGiftModel.getGift_id();
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "2", pit, heart_id);
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "2", pit, heart_id,"");
|
||||
} else {
|
||||
beibaoId = roonGiftModel.getGift_id();
|
||||
MvpPre.roomAuctionJoin(userInfo.getAuction_id(), userInfo.getUser_id() + "", roonGiftModel.getGift_id(), num, "2");
|
||||
@@ -699,7 +703,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
} else {
|
||||
giftNumber = num;
|
||||
beibaoId = roonGiftModel.getGift_id();
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "2", pit, heart_id);
|
||||
MvpPre.roomGift(roomId, roonGiftModel.getGift_id(), giftNumber, userId, "2", pit, heart_id,"");
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
@@ -22,11 +22,13 @@ import io.reactivex.disposables.Disposable
|
||||
* 时间:2026/1/5 15:36
|
||||
* 用途:撩他提示框
|
||||
*/
|
||||
class FlirtatiousDialog(context: Context) :
|
||||
class FlirtatiousDialog(context: Context, var nickname: String) :
|
||||
BaseDialog<DialogFlirtatiousBinding>(context, com.xscm.moduleutil.R.style.BaseDialogStyleH) {
|
||||
|
||||
// 定义回调接口
|
||||
private var onConfirmCallback: ((String) -> Unit)? = null
|
||||
private var mNickName: String = nickname;
|
||||
private var isSelected: Boolean = false
|
||||
|
||||
// 设置回调接口的方法
|
||||
fun setOnConfirmListener(callback: (String) -> Unit): FlirtatiousDialog {
|
||||
@@ -50,9 +52,13 @@ class FlirtatiousDialog(context: Context) :
|
||||
mBinding.ivClose.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
|
||||
if (SpUtil.getBooleanValue("pub",false)) {
|
||||
mBinding.vCheckbox.isSelected = true
|
||||
isSelected = true
|
||||
}
|
||||
mBinding.tvConfirm.setOnClickListener {
|
||||
onConfirmCallback?.invoke("")
|
||||
SpUtil.setBooleanValue("pub", isSelected)
|
||||
dismiss()
|
||||
}
|
||||
mBinding.tvCancel.setOnClickListener {
|
||||
@@ -60,16 +66,19 @@ class FlirtatiousDialog(context: Context) :
|
||||
}
|
||||
mBinding.vCheckbox.setOnClickListener {
|
||||
it.isSelected = !it.isSelected
|
||||
if (it.isSelected) {
|
||||
SpUtil.setBooleanValue("pub", true)
|
||||
}
|
||||
}
|
||||
isSelected = it.isSelected
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun show() {
|
||||
mBinding.tvTitle.text = "确定要撩一撩台上的 ${mNickName} 吗?共计需要 10个 金币。"
|
||||
super.show()
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
// 初始化数据,如果需要的话
|
||||
RetrofitClient.getInstance().wallet(object : BaseObserver<WalletBean>(){
|
||||
RetrofitClient.getInstance().wallet(object : BaseObserver<WalletBean>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
}
|
||||
|
||||
@@ -78,6 +87,7 @@ class FlirtatiousDialog(context: Context) :
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
private fun setupWindow() {
|
||||
val window = window ?: return
|
||||
window.setGravity(Gravity.CENTER)
|
||||
|
||||
Reference in New Issue
Block a user