1:修改酒吧房展示的,
2:修改约她接口
This commit is contained in:
@@ -44,6 +44,8 @@ public class RoonGiftModel {
|
||||
private int id;
|
||||
private String gift_remark_name="";//用户设置的礼物内容
|
||||
|
||||
private String user_wallet_coin;//当前的钱包金币数
|
||||
|
||||
public boolean isCan_send_self() {
|
||||
if ( isManghe()) {
|
||||
return true;
|
||||
|
||||
@@ -75,7 +75,7 @@ public class RoomBean implements Serializable {
|
||||
private String room_name;//房间名称
|
||||
private String room_cover;//房间封面
|
||||
private String room_intro;//房间公告
|
||||
private String type_id;//房间类型 1:点唱(pk) 2:拍卖(真爱拍小黑屋) 3/4:交友 6:小黑屋 7:互娱 8:交友 10:签约
|
||||
private String type_id;//房间类型 1:点唱(pk) 2:拍卖(真爱拍小黑屋) 3/4:交友 6:小黑屋 7:互娱 8:交友 10:签约 11:酒吧房
|
||||
private String type_name;//房间类型名称
|
||||
private String user_id;//房主id
|
||||
private String label_id;//类型id 2:ktv type:1/3/4/8
|
||||
|
||||
@@ -96,6 +96,7 @@ import com.xscm.modulemain.dialog.RoomSettingFragment
|
||||
import com.xscm.modulemain.dialog.SoundEffectsDialogFragment
|
||||
import com.xscm.modulemain.dialog.TourClubDialogFragment
|
||||
import com.xscm.modulemain.dialog.barRoom.MakeFriendsDialog
|
||||
import com.xscm.modulemain.dialog.barRoom.WishGiftDialog
|
||||
import com.xscm.modulemain.manager.RoomManager
|
||||
import com.xscm.modulemain.service.ForegroundService
|
||||
import com.xscm.modulemain.service.RoomPlayService
|
||||
@@ -2700,21 +2701,29 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
if ((mRoomInfoResp?.user_info?.is_room_owner == 1 || mRoomInfoResp?.user_info?.is_host == 1 || mRoomInfoResp?.user_info?.is_management == 1)) 1 else 2
|
||||
)
|
||||
} else if (id == R.id.iv_wheat_feeding) { //点击上麦操作
|
||||
if (mRoomInfoResp?.room_info?.room_up_pit_type == "1") {
|
||||
// if (mRoomInfoResp?.room_info?.room_up_pit_type == "1") {
|
||||
// if (maiStatus) {
|
||||
// MvpPre!!.applyPit(roomId, "")
|
||||
// } else {
|
||||
// MvpPre!!.downPit(roomId, "")
|
||||
// }
|
||||
// } else {
|
||||
if (maiStatus) {
|
||||
MvpPre!!.applyPit(roomId, "")
|
||||
} else {
|
||||
MvpPre!!.downPit(roomId, "")
|
||||
}
|
||||
} else {
|
||||
if (maiStatus) {
|
||||
MvpPre!!.applyPit(roomId, "")
|
||||
if (mRoomInfoResp?.room_info?.type_id == "11"){
|
||||
WishGiftDialog(
|
||||
ActivityUtils.getTopActivity(),
|
||||
roomId.toString(),
|
||||
""
|
||||
).show()
|
||||
}else {
|
||||
MvpPre!!.applyPit(roomId, "")
|
||||
}
|
||||
maiStatus = false
|
||||
} else {
|
||||
MvpPre!!.downPit(roomId, "")
|
||||
maiStatus = true
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ class RoomPubFragment(var mRoomInfoResp: RoomInfoResp?) :
|
||||
val bean = mRoomInfoResp?.room_info?.pit_list!![indexList[idx].toInt() - 1]
|
||||
view.setData(bean)
|
||||
|
||||
if (idx != 0 && idx != 1) {
|
||||
if (idx != 0 && idx != 1) {
|
||||
if (!TextUtils.isEmpty(bean.user_id) && !bean.user_id.equals("0")) {
|
||||
startTimer(bean.end_time.toLong())
|
||||
}
|
||||
@@ -197,8 +197,19 @@ class RoomPubFragment(var mRoomInfoResp: RoomInfoResp?) :
|
||||
)
|
||||
} else {
|
||||
if (view.pitBean.user_id == "0" || view.pitBean.user_id.isEmpty()) {
|
||||
// TODO: 这是展示设置心愿礼物的,这里有个点,要考虑,当前用户在麦位上,点击的时候,直接走上麦按钮,如果不在麦上,就直接选择心愿礼物
|
||||
WishGiftDialog(ActivityUtils.getTopActivity(), mRoomId).show()
|
||||
if (mRoomInfoResp?.user_info?.pit_number != 0) {
|
||||
MvpPre!!.applyPit(
|
||||
mRoomInfoResp?.room_info?.room_id!!,
|
||||
view.pitNumber,""
|
||||
)
|
||||
} else {
|
||||
// TODO: 这是展示设置心愿礼物的,这里有个点,要考虑,当前用户在麦位上,点击的时候,直接走上麦按钮,如果不在麦上,就直接选择心愿礼物
|
||||
WishGiftDialog(
|
||||
ActivityUtils.getTopActivity(),
|
||||
mRoomId,
|
||||
view.pitNumber
|
||||
).show()
|
||||
}
|
||||
// MvpPre!!.applyPit(mRoomInfoResp?.room_info?.room_id!!, view.pitNumber)
|
||||
} else {
|
||||
RoomUserInfoFragment.show(
|
||||
@@ -239,7 +250,8 @@ class RoomPubFragment(var mRoomInfoResp: RoomInfoResp?) :
|
||||
mBinding.imAllLiao.setOnClickListener {
|
||||
|
||||
val validCount = mRoomInfoResp?.room_info?.pit_list?.take(6)
|
||||
?.count { !it.user_id.isNullOrEmpty() && it.user_id != "0" } ?: 0
|
||||
?.count { !it.user_id.isNullOrEmpty() && it.user_id != "0" && it.user_id != mRoomInfoResp?.user_info?.user_id.toString() }
|
||||
?: 0
|
||||
|
||||
ConfirmDialog(
|
||||
ActivityUtils.getTopActivity(),
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.blankj.utilcode.util.ScreenUtils
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.modulemain.adapter.RoomGiftGivingAdapter
|
||||
import com.xscm.modulemain.databinding.DialogGiftGivingBinding
|
||||
import com.xscm.moduleutil.bean.RoomGiftData
|
||||
import com.xscm.moduleutil.bean.RoonGiftModel
|
||||
import com.xscm.moduleutil.http.BaseObserver
|
||||
import com.xscm.moduleutil.http.RetrofitClient
|
||||
@@ -84,6 +85,14 @@ class GiftGivingDialog(
|
||||
adapter = RoomGiftGivingAdapter(t) { selectedValue, position ->
|
||||
// 处理选中事件,使用roomId和userId
|
||||
LogUtils.e("选中了: $selectedValue, 位置: $position, roomId: $mRoomId, userId: $mUserId")
|
||||
RetrofitClient.getInstance().roomGift(mRoomId,selectedValue.gift_id,"1",mUserId,"1","","","",object : BaseObserver<RoomGiftData>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
}
|
||||
|
||||
override fun onNext(t: RoomGiftData) {
|
||||
dismiss()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 设置GridLayoutManager,每行显示4个item
|
||||
|
||||
@@ -79,15 +79,6 @@ class RoomAboutDialog(
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
// 初始化数据,如果需要的话
|
||||
RetrofitClient.getInstance().wallet(object : BaseObserver<WalletBean>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
}
|
||||
|
||||
override fun onNext(t: WalletBean) {
|
||||
mBinding.tvBalance.text = t.coin ?: "0"
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
@@ -115,6 +106,8 @@ class RoomAboutDialog(
|
||||
ImageUtils.loadHead(t.base_image, mBinding.ivGiftPic)
|
||||
mBinding.tvGiftName.text = t.gift_name
|
||||
}
|
||||
mBinding.tvBalance.text = t.user_wallet_coin ?: "0"
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.xscm.modulemain.R
|
||||
import com.xscm.modulemain.adapter.RoomWishGiftAdapter
|
||||
import com.xscm.modulemain.databinding.DialogWishGiftBinding
|
||||
import com.xscm.moduleutil.bean.RoonGiftModel
|
||||
import com.xscm.moduleutil.bean.room.RoomPitBean
|
||||
import com.xscm.moduleutil.http.BaseObserver
|
||||
import com.xscm.moduleutil.http.RetrofitClient
|
||||
import com.xscm.moduleutil.widget.dialog.BaseDialog
|
||||
@@ -21,11 +22,12 @@ import io.reactivex.disposables.Disposable
|
||||
* 时间:2026/1/5 9:14
|
||||
* 用途:酒吧房选择心愿礼物
|
||||
*/
|
||||
class WishGiftDialog(context: Context, val roomId: String) :
|
||||
class WishGiftDialog(context: Context, val roomId: String,var pitNumber: String) :
|
||||
BaseDialog<DialogWishGiftBinding>(context, com.xscm.moduleutil.R.style.BaseDialogStyleH) {
|
||||
|
||||
var adapter: RoomWishGiftAdapter? = null
|
||||
var time: MutableList<String> = mutableListOf()
|
||||
var mPitNumber : String = pitNumber
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.dialog_wish_gift
|
||||
@@ -45,7 +47,7 @@ class WishGiftDialog(context: Context, val roomId: String) :
|
||||
// (ActivityUtils.getTopActivity() as? RoomActivity)?.let { roomActivity ->
|
||||
// roomActivity.dialogMessage(messageEvent)
|
||||
// }
|
||||
RetrofitClient.getInstance().applyPubPit(roomId,"",adapter?.getSelectedValue()?.gift_id,object : BaseObserver<String>() {
|
||||
RetrofitClient.getInstance().applyPubPit(roomId,mPitNumber,adapter?.getSelectedValue()?.gift_id,object : BaseObserver<String>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import android.widget.TextView
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.moduleutil.bean.room.RoomPitBean
|
||||
import com.xscm.moduleutil.utils.ImageUtils
|
||||
import com.xscm.moduleutil.utils.SpUtil
|
||||
import com.xscm.moduleutil.widget.AvatarFrameView
|
||||
import com.xscm.moduleutil.widget.BaseWheatView
|
||||
import com.xscm.moduleutil.widget.WheatGiftAnim
|
||||
@@ -120,8 +121,9 @@ class RoomPubWheatView : BaseWheatView {
|
||||
fun setSex(value: String?, format: Boolean) {
|
||||
mCharmView.setSex("", "", value, format)
|
||||
}
|
||||
fun setPitGift(giftPlayString: String){
|
||||
mIvGift?.visibility=VISIBLE
|
||||
|
||||
fun setPitGift(giftPlayString: String) {
|
||||
mIvGift?.visibility = VISIBLE
|
||||
WheatGiftAnim.addGift(mIvGift, giftPlayString);
|
||||
}
|
||||
|
||||
@@ -132,8 +134,13 @@ class RoomPubWheatView : BaseWheatView {
|
||||
|
||||
if (!bean.pit_number.equals("9") && !bean.pit_number.equals("10")) {
|
||||
tv_time?.visibility = View.VISIBLE
|
||||
ll_bottom?.visibility = View.VISIBLE
|
||||
iv_custom_gift?.visibility = View.VISIBLE
|
||||
if (bean.user_id != SpUtil.getUserId().toString()) {
|
||||
if (bean.had_custom_gift==1){
|
||||
iv_custom_gift?.visibility = View.VISIBLE
|
||||
}
|
||||
ll_bottom?.visibility = View.VISIBLE
|
||||
|
||||
}
|
||||
tv_time?.text = "00:00"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user