1:修改酒吧房弹框接口调用
This commit is contained in:
@@ -75,8 +75,7 @@ class GiftGivingDialog(
|
||||
super.show()
|
||||
|
||||
// TODO: 调用赠送自定义礼物。点击麦位上左边的最小图标
|
||||
RetrofitClient.getInstance()
|
||||
.getCustomGiftList(object : BaseObserver<MutableList<RoonGiftModel>>() {
|
||||
RetrofitClient.getInstance().getCustomGiftList(mUserId,object : BaseObserver<MutableList<RoonGiftModel>>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
}
|
||||
|
||||
|
||||
@@ -61,8 +61,8 @@ class PerformInputDialog(context: Context) :
|
||||
override fun initData() {
|
||||
// 初始化数据,如果需要的话
|
||||
giftModel?.let { model ->
|
||||
if (model.new_gift_name?.isNotEmpty() == true) {
|
||||
mBinding.etInput.setText(model.new_gift_name)
|
||||
if (model.gift_remark_name?.isNotEmpty() == true) {
|
||||
mBinding.etInput.setText(model.gift_remark_name)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,8 +90,8 @@ class PerformInputDialog(context: Context) :
|
||||
|
||||
private fun refreshData() {
|
||||
giftModel?.let { model ->
|
||||
if (model.new_gift_name?.isNotEmpty() == true) {
|
||||
mBinding.etInput.setText(model.new_gift_name)
|
||||
if (model.gift_remark_name?.isNotEmpty() == true) {
|
||||
mBinding.etInput.setText(model.gift_remark_name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@ class RoomAboutDialog(
|
||||
|
||||
|
||||
override fun show() {
|
||||
LogUtils.e("show", "roomId:$mRoomId userId:$mUserId username:$mUsername avatar:$mAvatar")
|
||||
// 确保参数不为空
|
||||
if (!TextUtils.isEmpty(mUsername)) {
|
||||
mBinding.tvName.text = mUsername
|
||||
|
||||
@@ -9,8 +9,9 @@ import com.blankj.utilcode.util.LogUtils
|
||||
import com.blankj.utilcode.util.ScreenUtils
|
||||
import com.hjq.toast.ToastUtils
|
||||
import com.xscm.modulemain.R
|
||||
import com.xscm.modulemain.adapter.RoomTalentAdapter
|
||||
import com.xscm.modulemain.adapter.RoomPitTimeAdapter
|
||||
import com.xscm.modulemain.databinding.DialogRoomDurationBinding
|
||||
import com.xscm.moduleutil.bean.PitTimeRespBean
|
||||
import com.xscm.moduleutil.color.ThemeableDrawableUtils
|
||||
import com.xscm.moduleutil.http.BaseObserver
|
||||
import com.xscm.moduleutil.http.RetrofitClient
|
||||
@@ -23,11 +24,11 @@ import io.reactivex.disposables.Disposable
|
||||
* 时间:2026/1/4 18:57
|
||||
* 用途:酒吧房设置时长
|
||||
*/
|
||||
class RoomDurationDialog (context: Context, val roomId: String) :
|
||||
class RoomDurationDialog(context: Context, val roomId: String) :
|
||||
BaseDialog<DialogRoomDurationBinding>(context, com.xscm.moduleutil.R.style.BaseDialogStyleH) {
|
||||
|
||||
var adapter: RoomTalentAdapter? = null
|
||||
var time: MutableList<String> = mutableListOf()
|
||||
var adapter: RoomPitTimeAdapter? = null
|
||||
var time: MutableList<PitTimeRespBean> = mutableListOf()
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
return R.layout.dialog_room_duration
|
||||
@@ -39,18 +40,21 @@ class RoomDurationDialog (context: Context, val roomId: String) :
|
||||
dismiss()
|
||||
}
|
||||
mBinding.tvQd.setOnClickListener {
|
||||
if (adapter?.getSelectedValue()?.isEmpty() == true || adapter?.getSelectedValue()==null) {
|
||||
if (adapter?.getSelectedValue()
|
||||
?.isEmpty() == true || adapter?.getSelectedValue() == null || adapter?.getSelectedValue() == "0"
|
||||
) {
|
||||
ToastUtils.show("请选择时间")
|
||||
} else {//确定
|
||||
RetrofitClient.getInstance().setPitTime(roomId, adapter?.getSelectedValue()!!.replace("分钟", ""),object :
|
||||
BaseObserver<String>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
}
|
||||
RetrofitClient.getInstance()
|
||||
.setPitTime(roomId, adapter?.getSelectedValue()!!.replace("分钟", ""), object :
|
||||
BaseObserver<String>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
}
|
||||
|
||||
override fun onNext(t: String) {
|
||||
dismiss()
|
||||
}
|
||||
})
|
||||
override fun onNext(t: String) {
|
||||
dismiss()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
@@ -65,22 +69,28 @@ class RoomDurationDialog (context: Context, val roomId: String) :
|
||||
|
||||
|
||||
override fun initData() {
|
||||
time = mutableListOf()
|
||||
RetrofitClient.getInstance().getPitTimeList(object : BaseObserver<List<PitTimeRespBean>>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
}
|
||||
|
||||
override fun onNext(t: List<PitTimeRespBean>) {
|
||||
if (t.isNotEmpty()) {
|
||||
time.clear()
|
||||
time.addAll(t)
|
||||
}
|
||||
adapter = RoomPitTimeAdapter(time) { selectedValue, position ->
|
||||
// 处理选中事件
|
||||
LogUtils.e("选中了: $selectedValue, 位置: $position")
|
||||
}
|
||||
val layoutManager = GridLayoutManager(context, 3)
|
||||
mBinding.recycleView.layoutManager = layoutManager
|
||||
mBinding.recycleView.adapter = adapter
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
time= mutableListOf()
|
||||
time.clear()
|
||||
time.add("5分钟")
|
||||
time.add("10分钟")
|
||||
time.add("15分钟")
|
||||
time.add("20分钟")
|
||||
time.add("25分钟")
|
||||
time.add("30分钟")
|
||||
adapter = RoomTalentAdapter(time) { selectedValue, position ->
|
||||
// 处理选中事件
|
||||
LogUtils.e("选中了: $selectedValue, 位置: $position")
|
||||
}
|
||||
val layoutManager = GridLayoutManager(context, 3)
|
||||
mBinding.recycleView.layoutManager = layoutManager
|
||||
mBinding.recycleView.adapter = adapter
|
||||
}
|
||||
|
||||
private fun setupWindow() {
|
||||
|
||||
@@ -60,7 +60,7 @@ class SetupCustomGiftDialog(context: Context, val roomId: String) :
|
||||
performInputDialog?.show(t[position])
|
||||
performInputDialog?.setOnConfirmListener { content ->
|
||||
// TODO: 这里表演内容的回调
|
||||
t[position].new_gift_name=content
|
||||
t[position].gift_remark_name=content
|
||||
RetrofitClient.getInstance().setCustomGift(t[position].gift_id,content,object : BaseObserver<String>() {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user