feat : 幸运礼包 初步可提测

This commit is contained in:
eggmanQQQ
2025-02-11 18:05:06 +08:00
parent 8931d17528
commit bb80b3ebb9
50 changed files with 2096 additions and 767 deletions

View File

@@ -0,0 +1,22 @@
package com.chwl.app.avroom.bean;
import lombok.Data;
@Data
public class LuckyBagDetailEntity {
public String avatar;
public String nick;
public long createTime;
public String createTimeStr;
public int num = 1;
public int originalAmount;
public String type;
public String giftName;
public @interface BiliType{
public int SENT = 1;
public int RECEIVED = 2;
}
}

View File

@@ -1,19 +1,26 @@
package com.chwl.app.avroom.bean;
import static com.chwl.app.avroom.bean.LuckyBagEntity.Type.GIFT;
import lombok.Data;
@Data
public class LuckyBagEntity {
public long id;
public long roomUid;
public long userId;
public String avatar;
public String nick;
public long userId;
public long roomUid;
public int status;
public String Type;
public long endTime; // 倒计时结束时间, 表时可以开抢了, (东八区)
public String type;
public long beginTime; // 倒计时结束时间, 表时可以开抢了, (东八区)
public @interface Type{
public String GIFT = "GIFT";
public String DIAMOND = "DIAMOND";
}
public boolean isGift() {
return type.equals(GIFT);
}
}

View File

@@ -1,5 +1,7 @@
package com.chwl.app.avroom.bean;
import static com.chwl.app.avroom.bean.LuckyBagEntity.Type.GIFT;
import java.util.ArrayList;
import java.util.List;
@@ -11,8 +13,8 @@ public class LuckyBagGiftBody {
public long roomUid;
public long uid;
public int countDownSecond;
public String type = "GIFT";
public int num;
public String type = GIFT;
// public int num;
public List<LuckyBagGiftItemBody> giftItems;

View File

@@ -4,6 +4,6 @@ import lombok.Data;
@Data
public class LuckyBagGiftItemBody {
public int giftId;
public long giftId;
public int giftNum;
}

View File

@@ -1,5 +1,7 @@
package com.chwl.app.avroom.bean;
import static com.chwl.app.avroom.bean.LuckyBagEntity.Type.DIAMOND;
import lombok.Data;
@Data
@@ -7,10 +9,10 @@ public class LuckyBagGoldBody {
public long roomUid;
public long uid;
public String type = "DIAMOND";
public int countDownSecond;
public int num;
public String type = DIAMOND;
public int goldNum;
public int num;
public int countDownSecond;
}

View File

@@ -0,0 +1,14 @@
package com.chwl.app.avroom.bean;
import java.util.List;
import lombok.Data;
@Data
public class LuckyBagOpenBiliEntity {
public int amount;
public long createTime;
public String createTimeStr;
public List<LuckyBagOpenGiftEntity> redEnvelopeGiftItemVOs;
public LuckyBagOpenUserBean userVO;
}

View File

@@ -0,0 +1,11 @@
package com.chwl.app.avroom.bean;
import java.util.List;
import lombok.Data;
@Data
public class LuckyBagOpenEntity {
public int currentUserAmount;
public List<LuckyBagOpenGiftEntity> currentUserGifts;
}

View File

@@ -0,0 +1,9 @@
package com.chwl.app.avroom.bean;
import lombok.Data;
@Data
public class LuckyBagOpenGiftBean {
public String giftUrl;
public String giftName;
}

View File

@@ -0,0 +1,9 @@
package com.chwl.app.avroom.bean;
import lombok.Data;
@Data
public class LuckyBagOpenGiftEntity {
public int giftNum;
public LuckyBagOpenGiftBean giftVo;
}

View File

@@ -0,0 +1,10 @@
package com.chwl.app.avroom.bean;
import lombok.Data;
@Data
public class LuckyBagOpenUserBean {
public String avatar;
public String nick;
public long uid;
}

View File

@@ -261,10 +261,11 @@ class RoomGameListDialog :
getString(R.string.room_switch_game_tips)
) {
//todo do 游戏弹窗列表 点击事件
//todo do 游戏弹窗列表 点击事件 ,code 优先判断
if (gameInfo.isFindLove()) {
jumpFindLove()
}else if(gameInfo.isLuckyBag()){
listener?.onShowLuckyBag()
}else if (gameInfo.isLeadercc()) {
jumpLeaderccGame(gameInfo)
} else if (gameInfo.mgId?.isNotEmpty() == true) {
@@ -381,5 +382,6 @@ class RoomGameListDialog :
interface GameplayDialogListener {
fun onShowBaiShunGame(url: String, config: BaiShunGameConfig)
fun onShowLeaderccGame(url: String, config: BaiShunGameConfig)
fun onShowLuckyBag()
}
}

View File

@@ -1,52 +1,66 @@
package com.chwl.app.avroom.dialog
import android.content.DialogInterface
import android.view.Gravity
import android.view.WindowManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.chwl.app.R
import com.chwl.app.avroom.bean.LuckyBagDetailEntity
import com.chwl.app.avroom.bean.LuckyBagDetailEntity.BiliType.RECEIVED
import com.chwl.app.avroom.bean.LuckyBagDetailEntity.BiliType.SENT
import com.chwl.app.avroom.bean.LuckyBagEntity
import com.chwl.app.base.BaseDialogFragment
import com.chwl.app.bindadapter.BaseBindingAdapter
import com.chwl.app.bindadapter.BaseBindingViewHolder
import com.chwl.app.common.EmptyViewHelper
import com.chwl.app.databinding.DialogRoomLuckyBagBiliBinding
import com.chwl.app.databinding.ItemRoomLuckyBagBiliBinding
import com.chwl.app.ui.utils.load
import com.chwl.app.ui.utils.loadAvatar
import com.chwl.core.bean.response.ServiceResult
import com.chwl.core.gift.bean.RoomBgInfo
import com.chwl.core.manager.AvRoomDataManager
import com.chwl.core.user.UserModel
import com.chwl.core.utils.net.RxHelper
import com.chwl.library.common.util.ClickUtils.click
import com.chwl.library.common.util.doToast
import com.chwl.library.common.util.isVerify
import com.chwl.library.common.util.toColor
import com.chwl.library.common.util.toDP
import com.chwl.library.net.rxnet.RxNet
import com.chwl.library.widget.text.DrawableTextView
import com.example.lib_utils.ktx.getColor
import com.google.gson.JsonElement
import com.example.lib_utils.ktx.getString
import io.reactivex.Single
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query
class RoomLuckyBagBiliDialog : BaseDialogFragment<DialogRoomLuckyBagBiliBinding>() {
override var width = WindowManager.LayoutParams.MATCH_PARENT
override var height = WindowManager.LayoutParams.WRAP_CONTENT
override var height = 485.toDP()
override var dimAmount = 0f
override var gravity = Gravity.CENTER
override var gravity = Gravity.BOTTOM
private lateinit var mAdapter : RoomLuckyBagBiliAdapter
private var mSentPageNum = 1
private var mReceivedPageNum = 1
private var mType = RECEIVED
private var mSentData = mutableListOf<LuckyBagDetailEntity>()
private var mReceivedData = mutableListOf<LuckyBagDetailEntity>()
override fun init() {
mAdapter = RoomLuckyBagBiliAdapter()
mAdapter.setOnLoadMoreListener({
},binding.rvList)
mAdapter.emptyView = EmptyViewHelper.createEmptyView(context,R.drawable.ic_lucky_bag_empty,"")
binding.srlLayout.isEnableRefresh = false
binding.srlLayout.setOnLoadmoreListener {
loadData()
}
binding.rvList.adapter = mAdapter
binding.rvList.layoutManager = LinearLayoutManager(context,RecyclerView.VERTICAL,false)
UserModel.get().cacheLoginUserInfo?.let {
binding.avatar.load(it.avatar)
binding.avatar.loadAvatar(it.avatar)
binding.nick.text = it.nick
}
@@ -54,17 +68,82 @@ class RoomLuckyBagBiliDialog : BaseDialogFragment<DialogRoomLuckyBagBiliBinding>
binding.btnBack.click {
dismiss()
}
binding.btnReceived.click {
changeBtn(binding.btnReceived,true)
changeBtn(binding.btnSent,false)
mType = RECEIVED
mAdapter.isReceived = true
mAdapter.setNewData(mReceivedData)
checkData(mReceivedData)
}
binding.btnSent.click {
changeBtn(binding.btnSent,true)
changeBtn(binding.btnReceived,false)
mType = SENT
mAdapter.isReceived = false
mAdapter.setNewData(mSentData)
checkData(mSentData)
}
binding.btnReceived.performClick()
}
private fun checkData(data: MutableList<LuckyBagDetailEntity>) {
if (!data.isVerify()) {
loadData()
}
}
private fun loadData() {
val pageNum = if (mType == RECEIVED) mReceivedPageNum else mSentPageNum
getDetails(mType, pageNum, 20)
.compose(bindToLifecycle())
.doOnSuccess {
if (pageNum == 1) {
if (mType == RECEIVED) {
mReceivedData.clear()
mReceivedData = it.toMutableList()
mAdapter.setNewData(mReceivedData)
} else {
mSentData.clear()
mSentData = it.toMutableList()
mAdapter.setNewData(mSentData)
}
} else {
// if (mType == RECEIVED) {
// mReceivedData.addAll(it)
// } else {
// mSentData.addAll(it)
// }
mAdapter.addData(it)
}
if (it.size == 20) {
if (mType == RECEIVED) {
mReceivedPageNum++
} else {
mSentPageNum++
}
}
binding.srlLayout.isEnableLoadmore = it.size == 20
binding.srlLayout.finishLoadmore()
}
.doOnError {
it?.message?.doToast()
binding.srlLayout.finishLoadmore()
}.subscribe()
}
override fun onDismiss(dialog: DialogInterface) {
mActionCallBack?.onAction(0,0)
super.onDismiss(dialog)
}
private fun changeBtn(text: DrawableTextView, select: Boolean) {
if (select) {
text.changeGradientColor("#FF9F00".toColor(), -1, "#FFF437".toColor())
@@ -77,46 +156,54 @@ class RoomLuckyBagBiliDialog : BaseDialogFragment<DialogRoomLuckyBagBiliBinding>
class RoomLuckyBagBiliAdapter : BaseBindingAdapter<ItemRoomLuckyBagBiliBinding, String>() {
class RoomLuckyBagBiliAdapter : BaseBindingAdapter<ItemRoomLuckyBagBiliBinding, LuckyBagDetailEntity>() {
var isReceived = true
override fun convert(
helper: BaseBindingViewHolder<ItemRoomLuckyBagBiliBinding>,
item: String
override fun onBindView(
viewBinding: ItemRoomLuckyBagBiliBinding,
data: LuckyBagDetailEntity,
pos: Int
) {
if (data.type == LuckyBagEntity.Type.GIFT) {
if (isReceived) {
viewBinding.item.text = "${data.giftName}*${data.num}"
} else {
viewBinding.item.text = "${R.string.gift_action.getString()}*${data.num}"
}
} else {
viewBinding.item.text = data.originalAmount?.toString()?:""
}
viewBinding.time.text = data.createTimeStr?:""
if (isReceived) {
viewBinding.nick.text = data.nick?:""
} else {
viewBinding.nick.text = if (data.type == LuckyBagEntity.Type.GIFT) R.string._ver_24_Gift_Lucky_Bag_Bili.getString() else R.string._ver_24_Coin_Lucky_Bag_Bili.getString()
}
}
}
private fun getBoomInfo(roomUid: Long): Single<RoomBgInfo> {
return api.getBoomInfo(roomUid)
private fun getDetails(type: Int, page: Int, pageSize: Int): Single<List<LuckyBagDetailEntity>> {
return api.getDetails(type, page, pageSize)
.compose(RxHelper.handleBeanData())
.compose(RxHelper.handleSchedulers())
}
private fun postDel(id: Long): Single<String> {
return api.postDel(AvRoomDataManager.get().roomUid, id)
.compose(RxHelper.handleIgnoreData())
.compose(RxHelper.handleSchedulers())
}
private val api: Api = RxNet.create(Api::class.java);
interface Api {
@GET("/room/background/list")
fun getBoomInfo(@Query("roomUid") roomUid: Long): Single<ServiceResult<RoomBgInfo>>
@GET("/new-red-envelope/detail")
fun getDetails(
@Query("type") type: Int,
@Query("pageNo") page: Int,
@Query("pageSize") pageSize: Int,
): Single<ServiceResult<List<LuckyBagDetailEntity>>>
@POST("/room/background/del")
fun postDel(
@Query("roomUid") roomUid: Long,
@Query("id") id: Long
): Single<ServiceResult<JsonElement>>
}

View File

@@ -1,14 +1,16 @@
package com.chwl.app.avroom.dialog
import android.view.Gravity
import android.view.MotionEvent
import android.view.View
import android.view.WindowManager
import androidx.core.widget.doOnTextChanged
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chwl.app.BuildConfig
import com.chwl.app.R
import com.chwl.app.avroom.bean.LuckyBagGiftBody
import com.chwl.app.avroom.bean.LuckyBagGiftItemBody
import com.chwl.app.avroom.bean.LuckyBagGoldBody
import com.chwl.app.base.BaseDialogFragment
import com.chwl.app.bindadapter.BaseBindingAdapter
@@ -17,8 +19,12 @@ import com.chwl.app.databinding.DialogRoomLuckyBagBinding
import com.chwl.app.databinding.ItemRoomLuckyBagGiftBinding
import com.chwl.app.databinding.ItemRoomLuckyBagGoldBinding
import com.chwl.app.databinding.ItemRoomLuckyBagTimeBinding
import com.chwl.app.ui.pay.ChargeActivity
import com.chwl.app.ui.utils.loadAvatar
import com.chwl.app.ui.utils.loadImage
import com.chwl.app.utils.KeyBoardUtils
import com.chwl.app.utils.RoomLuckyBagManager
import com.chwl.core.auth.AuthModel
import com.chwl.core.bean.response.ServiceResult
import com.chwl.core.gift.GiftModel
import com.chwl.core.gift.bean.GiftType
@@ -26,11 +32,15 @@ import com.chwl.core.gift.bean.LuckyBagGift
import com.chwl.core.gift.bean.LuckyBagGold
import com.chwl.core.gift.bean.LuckyBagNumber
import com.chwl.core.gift.bean.LuckyBagNumber.Type
import com.chwl.core.manager.AvRoomDataManager
import com.chwl.core.pay.PayModel
import com.chwl.core.user.UserModel
import com.chwl.core.utils.net.RxHelper
import com.chwl.core.widget.layoutmanager.pagergridlayoutmanager.PagerGridLayoutManager
import com.chwl.library.common.util.ClickUtils.click
import com.chwl.library.common.util.doToast
import com.chwl.library.common.util.doToastDeBug
import com.chwl.library.common.util.isVerify
import com.chwl.library.common.util.postSafe
import com.chwl.library.common.util.setMargin
import com.chwl.library.common.util.setVis
import com.chwl.library.common.util.toColor
@@ -62,13 +72,24 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
private var mGiftData = mutableListOf<LuckyBagGift>()
private var mGiftDataSelect = mutableListOf<LuckyBagGift>()
private var mGiftDataSelectPos = HashMap<Int,LuckyBagGift>()
private var mIsGift = true
private var mIsGiftReview = false
private var mGiftSelect = -1
private var mGiftTimeSelect = -1
private var mGoldSelect = -1
private var mGoldNumSelect = -1
private var mGoldTimeSelect = -1
override fun init() {
binding.redBagDesc.text = R.string._ver_24_sendHint.getString(0,0)
mGiftAdapter = GiftAdapter()
mGiftAdapter.onItemChildClickListener = object : BaseQuickAdapter.OnItemChildClickListener {
override fun onItemChildClick(
@@ -78,15 +99,31 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
) {
view?.let {
when (it.id) {
R.id.etNum -> {
mGiftSelect = position
showInputLayout()
}
R.id.up -> {
mGiftData?.get(position)?.count = mGiftData?.get(position)?.count?.plus(1)
mGiftAdapter.notifyItemChanged(position)
if (position.isVerify(mGiftData)) {
val data = mGiftData[position]
data.count = data.count.plus(1)
mGiftAdapter.notifyItemChanged(position,1)
mGiftDataSelectPos[position] = data
}
showGiftCoin()
}
R.id.down -> {
if (mGiftData?.get(position)?.count != 0) {
mGiftData?.get(position)?.count = mGiftData?.get(position)?.count?.minus(1)
mGiftAdapter.notifyItemChanged(position)
if (position.isVerify(mGiftData)) {
val data = mGiftData[position]
data.count = data.count.minus(1)
mGiftAdapter.notifyItemChanged(position,1)
if (data.count == 0) {
mGiftDataSelectPos.remove(position)
}
}
showGiftCoin()
}
else -> {}
}
@@ -109,6 +146,7 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
currentPosition = 0
indicatorSize = pagerCount
})
binding.giftIndicator.onPageSelected(0)
}
override fun onPagerIndexSelected(prePagerIndex: Int, currentPagerIndex: Int) {
@@ -119,9 +157,10 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
binding.rvListGiftType.adapter = mGiftAdapter
mGiftTimeAdapter = NumberItemAdapter()
mGiftAdapter.onItemClickListener = object : BaseQuickAdapter.OnItemClickListener {
mGiftTimeAdapter.onItemClickListener = object : BaseQuickAdapter.OnItemClickListener {
override fun onItemClick(adapter: BaseQuickAdapter<*, *>?, view: View?, position: Int) {
mGiftTimeAdapter.select(position)
mGiftTimeSelect = mGiftTimeAdapter?.data?.getOrNull(position)?.number?:0
}
}
binding.rvListGiftTime.layoutManager = GridLayoutManager(context,4,RecyclerView.VERTICAL,false)
@@ -131,11 +170,12 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
//--金币礼包
mGoldAdapter = GoldAdapter()
mGoldAdapter.onItemClickListener = object : BaseQuickAdapter.OnItemClickListener {
override fun onItemClick(adapter: BaseQuickAdapter<*, *>?, view: View?, position: Int) {
mGoldAdapter.select(position)
mGoldSelect = mGoldAdapter?.data?.getOrNull(position)?.number?:0
showGoldCoin()
}
}
binding.rvListGoldType.layoutManager = GridLayoutManager(context,4,RecyclerView.VERTICAL,false)
@@ -147,6 +187,8 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
mGoldNumAdapter.onItemClickListener = object : BaseQuickAdapter.OnItemClickListener {
override fun onItemClick(adapter: BaseQuickAdapter<*, *>?, view: View?, position: Int) {
mGoldNumAdapter.select(position)
mGoldNumSelect = mGoldNumAdapter?.data?.getOrNull(position)?.number?:0
showGoldCoin()
}
}
binding.rvListGoldNum.layoutManager = GridLayoutManager(context,4,RecyclerView.VERTICAL,false)
@@ -156,10 +198,11 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
mGoldTimeAdapter.onItemClickListener = object : BaseQuickAdapter.OnItemClickListener {
override fun onItemClick(adapter: BaseQuickAdapter<*, *>?, view: View?, position: Int) {
mGoldTimeAdapter.select(position)
mGoldTimeSelect = mGoldTimeAdapter?.data?.getOrNull(position)?.number?:0
}
}
binding.rvListGiftTime.layoutManager = GridLayoutManager(context,4,RecyclerView.VERTICAL,false)
binding.rvListGiftTime.adapter = mGoldTimeAdapter
binding.rvListGoldTime.layoutManager = GridLayoutManager(context,4,RecyclerView.VERTICAL,false)
binding.rvListGoldTime.adapter = mGoldTimeAdapter
@@ -167,16 +210,23 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
val giftInfoList = GiftModel.get().getGiftInfoList(GiftType.GIFT_TYPE_NORMAL)
giftInfoList.forEach {
mGiftData.add(LuckyBagGift().apply {
giftId = it.giftId.toLong()
giftName = it.giftName
giftPrice = it.goldPrice
giftPic = it.giftUrl
})
}
giftInfoList.isVerify(0){
it.isSelected = true
mGiftSelect = 0
}
RoomLuckyBagManager.mLuckyBagConfig?.let { config ->
val goldData = arrayListOf<LuckyBagGold>()
val goldNumData = arrayListOf<LuckyBagNumber>()
val timeData = arrayListOf<LuckyBagNumber>()
val goldTimeData = arrayListOf<LuckyBagNumber>()
val giftTimeData = arrayListOf<LuckyBagNumber>()
config.goldItems.forEach {
@@ -193,7 +243,11 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
}
config.timeItems.forEach {
timeData.add(LuckyBagNumber().apply {
goldTimeData.add(LuckyBagNumber().apply {
type = Type.time
number = it
})
giftTimeData.add(LuckyBagNumber().apply {
type = Type.time
number = it
})
@@ -202,9 +256,27 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
mGoldAdapter.setNewData(goldData)
mGoldNumAdapter.setNewData(goldNumData)
mGoldTimeAdapter.setNewData(goldTimeData)
mGiftTimeAdapter.setNewData(giftTimeData)
goldData.isVerify(0){
it.isSelect = true
mGoldSelect = it.number
}
goldNumData.isVerify(0){
it.isSelect = true
mGoldNumSelect= it.number
}
goldTimeData.isVerify(0){
it.isSelect = true
mGoldTimeSelect = it.number
}
giftTimeData.isVerify(0){
it.isSelect = true
mGiftTimeSelect = it.number
}
mGoldTimeAdapter.setNewData(timeData)
mGiftTimeAdapter.setNewData(timeData)
}
@@ -216,11 +288,87 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
tabChange(false)
}
binding.notifyView.avatar.loadAvatar(UserModel.get().cacheLoginUserInfo?.avatar)
binding.notifyView.nick.text = UserModel.get().cacheLoginUserInfo?.nick
binding.notifyView.desc.text = R.string._ver_24_lucky_bag_room_notify.getString(UserModel.get().cacheLoginUserInfo?.nick?:"")
tabChange(true)
binding.btnConfirm.click {
if (checkSendData()) {
if (mIsGift) {
if (!mIsGiftReview) {
showGiftReview()
} else {
doSendGiftBag()
}
} else {
doSendGoldBag()
}
} else {
"没选择".doToastDeBug()
}
}
binding.btnModify.click {
showGiftSelectView()
}
binding.btnBill.click {
binding.root.setVis(false)
val biliDialog = RoomLuckyBagBiliDialog()
biliDialog.mActionCallBack = object : Action {
override fun onAction(type: Int, data: Any?) {
binding.root.setVis(true)
}
}
biliDialog.show(context)
}
binding.btnMore.click {
}
binding.inputLayout.setOnTouchListener { _: View?, _: MotionEvent? ->
binding.inputEdit.clearFocus()
binding.inputLayout.visibility = View.GONE
KeyBoardUtils.hideKeyBoard(activity, binding.inputEdit)
false
}
binding.inputSend.click {
var count = 0
val text = binding.inputEdit.text.toString()
if (text.isVerify()) {
count = text.toInt()
}
if (mGiftSelect.isVerify(mGiftData)) {
val data = mGiftData[mGiftSelect]
data.count = count
data.isSelect = false
mGiftAdapter.notifyItemChanged(mGiftSelect,1)
if (count > 0) {
mGiftDataSelectPos[mGiftSelect] = data
} else {
mGiftDataSelectPos.remove(mGiftSelect)
}
}
binding.inputEdit.clearFocus()
binding.inputLayout.visibility = View.GONE
KeyBoardUtils.hideKeyBoard(activity, binding.inputEdit)
mGiftSelect = -1
showGoldCoin()
showGiftCoin()
}
binding.userGold.text = (PayModel.get().currentWalletInfo?.diamondNum ?: 0.0).toInt().toString()
binding.userGold.click {
ChargeActivity.start(context)
}
}
@@ -228,6 +376,7 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
if (isGift) {
binding.bgGiftBag.setBackgroundResource(R.drawable.ic_lucky_bag_tab_bg_left_s)
binding.bgGoldBag.setBackgroundResource(R.drawable.ic_lucky_bag_tab_bg_right_n)
binding.notifyView.rootBg.setBackgroundResource(R.drawable.ic_lucky_bag_room_notify_gift_bg)
binding.giftBagLayout.setVis(true,true)
binding.goldBagLayout.setVis(false, true)
mIsGift = true
@@ -235,6 +384,7 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
} else {
binding.bgGiftBag.setBackgroundResource(R.drawable.ic_lucky_bag_tab_bg_left_n)
binding.bgGoldBag.setBackgroundResource(R.drawable.ic_lucky_bag_tab_bg_right_s)
binding.notifyView.rootBg.setBackgroundResource(R.drawable.ic_lucky_bag_room_notify_gold_bg)
binding.goldBagLayout.setVis(true,true)
binding.giftBagLayout.setVis(false,true)
mIsGift = false
@@ -246,16 +396,15 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
private fun changeViewStatus() {
if (mIsGift && !mIsGiftReview) {
showGiftSelect()
showGiftSelectView()
}else if (mIsGift && mIsGiftReview) {
showGiftReview()
} else {
showGoldSelect()
showGoldSelectView()
}
}
private fun showGiftSelect() {
private fun showGiftSelectView() {
binding.giftBagLayout.setVis(true)
binding.goldBagLayout.setVis(false)
binding.groupGiftSelect.setVis(true)
@@ -269,8 +418,13 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
binding.redBagDesc.setPadding2(bottom = 0.toDP())
mGiftDataSelectPos.forEach { (t, u) ->
u.isReView = false
}
mGiftAdapter.setNewData(mGiftData)
mIsGiftReview = false
}
private fun showGiftReview() {
@@ -287,10 +441,16 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
binding.redBagDesc.setPadding2(bottom = 0.toDP())
mGiftDataSelect.clear()
mGiftDataSelectPos.forEach { (t, u) ->
u.isReView = true
mGiftDataSelect.add(u)
}
mGiftAdapter.setNewData(mGiftDataSelect)
mIsGiftReview = true
}
private fun showGoldSelect() {
private fun showGoldSelectView() {
binding.goldBagLayout.setVis(true)
binding.giftBagLayout.setVis(false)
@@ -300,9 +460,117 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
binding.redBagDesc.setPadding2(bottom = 20.toDP())
}
private fun showInputLayout() {
binding.inputLayout.postDelayed({
binding.inputLayout.visibility = View.VISIBLE
binding.inputEdit.isFocusableInTouchMode = true
binding.inputEdit.requestFocus()
if (mGiftSelect.isVerify(mGiftData)) {
val data = mGiftData[mGiftSelect]
binding.inputEdit.setText(data.count.toString())
binding.inputEdit.setSelection(binding.inputEdit.text.length)
data.isSelect = true
mGiftAdapter.notifyItemChanged(mGiftSelect,1)
}
KeyBoardUtils.showKeyBoard(context, binding.inputEdit)
}, 200)
}
private fun showGiftCoin() {
var giftCount = 0
var giftCoin = 0
mGiftDataSelectPos.forEach { (t, u) ->
giftCount+=u.count
giftCoin += u.count * u.giftPrice
}
binding.redBagDesc.text = R.string._ver_24_sendHint.getString(giftCount,giftCoin)
binding.reviewTime.text = R.string._ver_24_reviewTime.getString(mGiftTimeSelect / 60)
}
private fun showGoldCoin() {
val coin = mGoldSelect * mGoldNumSelect
binding.redBagDesc.text = R.string._ver_24_Total_spend_s_coins.getString(coin)
}
private fun checkSendData() : Boolean{
if (mIsGift) {
if (!mGiftDataSelectPos.isVerify()) {
return false
}
if (mGiftTimeSelect == -1) {
return false
}
} else {
if (mGoldSelect == -1) {
return false
}
if (mGoldNumSelect == -1) {
return false
}
if (mGoldTimeSelect == -1) {
return false
}
}
return true
}
private fun doSendGiftBag() {
val items = mutableListOf<LuckyBagGiftItemBody>()
mGiftDataSelectPos.keys.forEach{ key->
items.add(LuckyBagGiftItemBody().apply {
giftId = mGiftDataSelectPos[key]?.giftId ?: -1
giftNum = mGiftDataSelectPos[key]?.count ?: -1
})
}
if (BuildConfig.DEBUG) {
mGiftTimeSelect = 20
}
sentGiftBag(LuckyBagGiftBody().apply {
roomUid = AvRoomDataManager.get().roomUid
uid = AuthModel.get().currentUid
countDownSecond = mGiftTimeSelect
giftItems = items
}).compose(bindToLifecycle())
.doOnSuccess {
dismiss()
}
.doOnError {
it?.message?.doToast()
}.subscribe()
}
private fun doSendGoldBag() {
if (BuildConfig.DEBUG) {
mGoldTimeSelect = 20
}
sentGoldBag(LuckyBagGoldBody().apply {
roomUid = AvRoomDataManager.get().roomUid
uid = AuthModel.get().currentUid
goldNum = mGoldSelect
num = mGoldNumSelect
countDownSecond = mGoldTimeSelect
}).compose(bindToLifecycle())
.doOnSuccess {
dismiss()
}
.doOnError {
it?.message?.doToast()
}.subscribe()
}
private class GiftAdapter : BaseBindingAdapter<ItemRoomLuckyBagGiftBinding, LuckyBagGift>() {
override fun convert(
helper: BaseBindingViewHolder<ItemRoomLuckyBagGiftBinding>,
item: LuckyBagGift
@@ -313,24 +581,12 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
it.gold.text = item.giftPrice.toString()
it.etNum.setText(item.count.toString())
it.giftCount.text = item.count.toString()
it.etNum.setTextColor(if (item.count > 0) R.color.color_FFEA5C.getColor() else R.color.white.getColor())
it.etNum.doOnTextChanged { text, start, before, count ->
val num = if (text.isVerify()) text.toString().toInt() else 0
item.count = num
it.giftCount?.postSafe {
it.giftCount.text = item.count.toString()
it.etNum.setTextColor(if (item.count> 0) R.color.color_FFEA5C.getColor() else R.color.white.getColor())
}
if (!text.isVerify()) {
it.etNum.setText("0")
it.etNum.setSelection(it.etNum.text.length)
}
}
it.etNum.setTextColor(if (item.isSelect) R.color.color_FFEA5C.getColor() else R.color.white.getColor())
helper.addOnClickListener(R.id.up)
helper.addOnClickListener(R.id.down)
helper.addOnClickListener(R.id.etNum)
if (item.isReView) {
it.selectViews.setVis(false)
@@ -342,10 +598,17 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
}
}
override fun onBindViewByPayloads(
viewBinding: ItemRoomLuckyBagGiftBinding,
data: LuckyBagGift,
pos: Int,
payloads: MutableList<Any>
) {
viewBinding.etNum.setText(data.count.toString())
viewBinding.etNum.setTextColor(if (data.isSelect) R.color.color_FFEA5C.getColor() else R.color.white.getColor())
}
}
private class NumberItemAdapter : BaseBindingAdapter<ItemRoomLuckyBagTimeBinding, LuckyBagNumber>() {
public fun select(pos:Int) {
@@ -360,24 +623,26 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
item: LuckyBagNumber
) {
helper?.binding?.let {
it.number.text = item.number.toString()
if (item.type == LuckyBagNumber.Type.time) {
it.number.text = R.string._ver_24_Mins_s.getString((item.number/60))
} else {
it.number.text = item.number.toString()
}
if (item.isSelect()) {
it.number.changeGradientColor("#ff9f00".toColor(),-1,"#fff437".toColor())
it.number.changeStrikeColor("#00ffd168".toColor())
it.number.setTextColor(R.color.color_FFEA5C.getColor())
it.number.setTextColor(R.color.color_292601.getColor())
} else {
it.number.changeGradientColor("#610015".toColor(),-1,"#97000c".toColor())
it.number.changeStrikeColor("#ffd168".toColor())
it.number.setTextColor(R.color.color_292601.getColor())
it.number.setTextColor(R.color.color_FFEA5C.getColor())
}
}
}
}
private class GoldAdapter : BaseBindingAdapter<ItemRoomLuckyBagGoldBinding, LuckyBagGold>(){
public fun select(pos:Int) {
@@ -393,15 +658,18 @@ class RoomLuckyBagDialog : BaseDialogFragment<DialogRoomLuckyBagBinding>() {
) {
helper?.binding?.let {
it.gold.text = item.number.toString()
if (item.isSelect()) {
it.goldBg.changeGradientColor("#ff9f00".toColor(),-1,"#fff437".toColor())
it.goldBg.changeStrikeColor("#00ffd168".toColor())
it.gold.setTextColor(R.color.color_FFEA5C.getColor())
it.gold.setTextColor(R.color.color_292601.getColor())
} else {
it.goldBg.changeGradientColor("#610015".toColor(),-1,"#97000c".toColor())
it.goldBg.changeStrikeColor("#ffd168".toColor())
it.gold.setTextColor(R.color.color_292601.getColor())
it.gold.setTextColor(R.color.color_FFEA5C.getColor())
}
}

View File

@@ -8,23 +8,32 @@ import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.chwl.app.R
import com.chwl.app.avroom.bean.LuckyBagEntity
import com.chwl.app.avroom.bean.LuckyBagOpenBiliEntity
import com.chwl.app.avroom.bean.LuckyBagOpenEntity
import com.chwl.app.base.BaseDialogFragment
import com.chwl.app.bindadapter.BaseBindingAdapter
import com.chwl.app.bindadapter.BaseBindingViewHolder
import com.chwl.app.databinding.DialogRoomLuckyBagOpenBinding
import com.chwl.app.databinding.ItemRoomLuckyBagViewOthersBinding
import com.chwl.app.ui.utils.loadAvatar
import com.chwl.app.ui.utils.loadImage
import com.chwl.app.utils.RoomLuckyBagManager
import com.chwl.core.auth.AuthModel
import com.chwl.core.bean.response.ServiceResult
import com.chwl.core.gift.bean.LuckyBagViewOthers
import com.chwl.core.gift.bean.RoomBgInfo
import com.chwl.core.utils.net.RxHelper
import com.chwl.library.common.util.ClickUtils.click
import com.chwl.library.common.util.doLog
import com.chwl.library.common.util.doToast
import com.chwl.library.common.util.isVerify
import com.chwl.library.common.util.postSafe
import com.chwl.library.common.util.setMargin
import com.chwl.library.common.util.setViewWH
import com.chwl.library.common.util.setVis
import com.chwl.library.common.util.toDP
import com.chwl.library.net.rxnet.RxNet
import com.example.lib_utils.ktx.getDrawable
import com.example.lib_utils.ktx.getString
import com.google.gson.JsonElement
import io.reactivex.Single
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
@@ -47,6 +56,8 @@ class RoomLuckyBagOpenDialog : BaseDialogFragment<DialogRoomLuckyBagOpenBinding>
private var isOpen = false
private var mTimeJop : Job?=null
var mData : LuckyBagEntity? = null
override fun init() {
@@ -68,72 +79,112 @@ class RoomLuckyBagOpenDialog : BaseDialogFragment<DialogRoomLuckyBagOpenBinding>
}
}
if (isGift) {
binding.bagImg.setImageResource(R.drawable.ic_lucky_bag_btn_gift_pic)
} else {
binding.bagImg.setImageResource(R.drawable.ic_lucky_bag_btn_gold_pic)
mData?.let {
isGift = it.isGift
if (isGift) {
binding.bagImg.setImageResource(R.drawable.ic_lucky_bag_btn_gift_pic)
} else {
binding.bagImg.setImageResource(R.drawable.ic_lucky_bag_btn_gold_pic)
}
binding.bg.setBackgroundResource(R.drawable.ic_lucky_bag_open_bg)
binding.avatar.loadAvatar(it.avatar)
val timeDown = RoomLuckyBagManager.getTimeDown(it.beginTime)
if (timeDown == 0L) {
// 倒计时结束 可开
ready()
} else {
timeDown(timeDown)
}
}
binding.bg.setBackgroundResource(R.drawable.ic_lucky_bag_open_bg)
}
private fun doOpenBag() {
mData?.let { data ->
postLuckyBagOpen(data.id)
.compose(bindToLifecycle())
.doOnSuccess {
if (it.currentUserGifts.isVerify() || it.currentUserAmount > 0){
open(it)
}else {
showEmpty()
}
}.doOnError {
it?.message?.doToast()
}.subscribe()
}
}
private fun timeDown() {
private fun timeDown(timeDown: Long) {
def()
binding.viewOthers.setVis(true)
binding.bagImg.setVis(true)
binding.time.setVis(true)
binding.comingHint.setVis(true)
binding.comingHint.text = R.string._ver_24_luckBagOpenHint.getString()
startTimeDown(10)
startTimeDown(timeDown)
}
private fun startTimeDown(time:Int) {
private fun startTimeDown(timeDown:Long) {
mTimeJop?.cancel()
mTimeJop = lifecycleScope.launch {
var t = 0
while (t < time) {
binding.time.text = "00:00"
delay(1000)
t++
for (time in timeDown downTo 0) {
delay(1000L)
binding.time.postSafe{
val timeString = RoomLuckyBagManager.getTimeString(time)
binding.time.text = timeString
binding.time.setVis(time == 0L,true)
"倒计时 i=$time timeString=$timeString".doLog()
}
}
mTimeJop?.cancel()
mTimeJop = null
ready()
}
mTimeJop?.start()
}
private fun ready() {
def()
binding.bagImg.setVis(true)
binding.root.postSafe{
def()
binding.bagImg.setVis(true)
binding.confirm.text = R.string._ver_24_Click_Open.getString()
binding.confirm.text = R.string._ver_24_Click_Open.getString()
isOpen = true
isOpen = true
}
}
private fun open() {
private fun open(entity: LuckyBagOpenEntity) {
def()
binding.viewOthers.setVis(true)
if (isGift) {
binding.viewOthers.setVis(true)
binding.giftName.setVis(true)
binding.giftNum.setVis(true)
binding.giftImg.setVis(true)
binding.giftName.text = "礼物名"
binding.giftNum.text = "x0"
binding.giftImg.loadImage("")
entity.currentUserGifts.isVerify(0){
binding.giftName.text = it?.giftVo?.giftName?:""
binding.giftNum.text = "x"+(it?.giftNum?.toString()?:"0")
binding.giftImg.loadImage(it?.giftVo?.giftUrl?:"")
}
} else {
binding.gold.setVis(true)
binding.gold.text = "0"
binding.gold.text = entity?.currentUserAmount?.toString()?:"0"
}
mActionCallBack?.onAction(1,mData)
}
@@ -143,7 +194,6 @@ class RoomLuckyBagOpenDialog : BaseDialogFragment<DialogRoomLuckyBagOpenBinding>
binding.bagImg.setVis(true)
binding.comingHint.setVis(true)
binding.comingHint.text = R.string._ver_24_luckBagOpen_Empty.getString()
binding.bagImg.setImageResource(R.drawable.ic_lucky_bag_empty)
}
@@ -155,14 +205,39 @@ class RoomLuckyBagOpenDialog : BaseDialogFragment<DialogRoomLuckyBagOpenBinding>
binding.rvListViewOthers.setVis(true)
binding.bg.setViewWH(height = 414)
binding.confirm.setMargin(bottom = 10)
binding.bg.setBackgroundResource(R.drawable.ic_lucky_bag_open_bili_bg)
mData?.let { data->
getViewOthers(data.id)
.compose(bindToLifecycle())
.doOnSuccess {
val viewOthers = mutableListOf<LuckyBagViewOthers>()
it.forEach { vo->
viewOthers.add(LuckyBagViewOthers().apply {
uid = vo?.userVO?.uid?:0L
avatar = vo?.userVO?.avatar?:""
nick = vo?.userVO?.nick?:""
time = vo?.createTime?:0L
timeStr = vo?.createTimeStr?:""
giftName = vo?.redEnvelopeGiftItemVOs?.getOrNull(0)?.giftVo?.giftName?:""
giftNum = vo?.redEnvelopeGiftItemVOs?.getOrNull(0)?.giftNum?:0
goldNum = vo?.amount?:0
})
}
mAdapter?.setNewData(viewOthers)
}
.doOnError {
it?.message?.doToast()
}
.subscribe()
}
}
private fun def() {
isOpen = false
binding.viewOthers.visibility = View.INVISIBLE
binding.time.visibility = View.INVISIBLE
binding.giftName.visibility = View.INVISIBLE
@@ -177,6 +252,7 @@ class RoomLuckyBagOpenDialog : BaseDialogFragment<DialogRoomLuckyBagOpenBinding>
binding.bg.setViewWH(height = 326)
binding.confirm.text = R.string.ok.getString()
binding.confirm.setMargin(bottom = 20)
}
override fun onDismiss(dialog: DialogInterface) {
@@ -187,27 +263,39 @@ class RoomLuckyBagOpenDialog : BaseDialogFragment<DialogRoomLuckyBagOpenBinding>
private class ViewOtherAdapter : BaseBindingAdapter<ItemRoomLuckyBagViewOthersBinding, LuckyBagViewOthers>() {
override fun convert(
helper: BaseBindingViewHolder<ItemRoomLuckyBagViewOthersBinding>,
item: LuckyBagViewOthers
override fun onBindView(
viewBinding: ItemRoomLuckyBagViewOthersBinding,
data: LuckyBagViewOthers,
pos: Int
) {
viewBinding.time.text = data.timeStr
viewBinding.name.text = data.nick
viewBinding.me.setVis(data.uid == AuthModel.get().currentUid)
viewBinding.avatar.loadAvatar(data?.avatar?:"")
if (data.giftNum > 0) {
viewBinding.giftInfo.text = "${data.giftName}x${data.giftNum}"
viewBinding.giftInfo.setDrawableEmpty(null,null,null,null)
} else {
viewBinding.giftInfo.text = data.goldNum.toString()
viewBinding.giftInfo.setDrawableEmpty(null,null,R.drawable.ic_coin_84.getDrawable(),null)
}
}
}
private fun getBoomInfo(roomUid: Long): Single<RoomBgInfo> {
return api.getBoomInfo(roomUid)
private fun getViewOthers(redEnvelopeId: Long): Single<List<LuckyBagOpenBiliEntity>> {
return api.getViewOthers(redEnvelopeId)
.compose(RxHelper.handleBeanData())
.compose(RxHelper.handleSchedulers())
}
private fun postLuckyBagOpen(redEnvelopeId: Long): Single<String> {
private fun postLuckyBagOpen(redEnvelopeId: Long): Single<LuckyBagOpenEntity> {
return api.postLuckyBagOpen(redEnvelopeId)
.compose(RxHelper.handleIgnoreData())
.compose(RxHelper.handleBeanData())
.compose(RxHelper.handleSchedulers())
}
@@ -215,14 +303,14 @@ class RoomLuckyBagOpenDialog : BaseDialogFragment<DialogRoomLuckyBagOpenBinding>
private val api: Api = RxNet.create(Api::class.java);
interface Api {
@GET("/room/background/list")
fun getBoomInfo(@Query("roomUid") roomUid: Long): Single<ServiceResult<RoomBgInfo>>
@GET("/new-red-envelope/get")
fun getViewOthers(@Query("redEnvelopeId") redEnvelopeId: Long): Single<ServiceResult<List<LuckyBagOpenBiliEntity>>>
@POST("/new-red-envelope/open")
fun postLuckyBagOpen(
@Query("redEnvelopeId") redEnvelopeId: Long
): Single<ServiceResult<JsonElement>>
): Single<ServiceResult<LuckyBagOpenEntity>>
}

View File

@@ -0,0 +1,81 @@
package com.chwl.app.avroom.dialog
import android.content.Context
import android.view.LayoutInflater
import com.chwl.app.R
import com.chwl.app.application.GlobalHandleManager
import com.chwl.app.avroom.activity.AVRoomActivity
import com.chwl.app.avroom.bean.LuckyBagEntity
import com.chwl.app.common.widget.dialog.DialogManager
import com.chwl.app.common.widget.dialog.DialogManager.OkCancelDialogListener
import com.chwl.app.databinding.ViewRoomLuckyBagNotifyBinding
import com.chwl.app.ui.utils.loadAvatar
import com.chwl.core.manager.AvRoomDataManager
import com.chwl.core.redpackage.bean.RedPackageLuckyBag
import com.chwl.library.common.util.ClickUtils.click
import com.chwl.library.common.util.setVis
import com.chwl.library.utils.ResUtil
import com.example.lib_utils.ktx.getString
class RoomNotifyLuckBagDialog(private val context: Context) : BaseRoomNotifyDialog<ViewRoomLuckyBagNotifyBinding>(context) {
override fun createBinding(inflater: LayoutInflater): ViewRoomLuckyBagNotifyBinding {
return ViewRoomLuckyBagNotifyBinding.inflate(inflater)
}
private var mDialogManager: DialogManager? = null
var data: RedPackageLuckyBag? = null
override fun useAutoDismiss(): Boolean {
return false
}
override fun init() {}
private fun ready() {
mBinding.root.setVis(true)
data?.let {
mBinding.avatar.loadAvatar(it.getSendUserAvatar())
mBinding.nick.text = it.getSendUserNick()
mBinding.desc.text = R.string._ver_24_lucky_bag_room_notify.getString()
if (it.redEnvelopeType == LuckyBagEntity.Type.GIFT) {
mBinding.rootBg.setBackgroundResource(R.drawable.ic_lucky_bag_room_notify_gift_bg)
} else {
mBinding.rootBg.setBackgroundResource(R.drawable.ic_lucky_bag_room_notify_gold_bg)
}
}
mBinding.clickView.click {
data?.roomUid?.let { roomUid ->
if (AvRoomDataManager.get().roomUid == roomUid) return@click
val activity = GlobalHandleManager.get().activity ?: return@click
mDialogManager = DialogManager(activity)
mDialogManager?.showOkCancelDialog(ResUtil.getString(R.string.changeRoomTips), true, object :
OkCancelDialogListener {
override fun onCancel() {
mDialogManager?.dismissDialog()
}
override fun onOk() {
mDialogManager?.dismissDialog()
AVRoomActivity.start(context, roomUid)
}
})
}
}
startAutoDismiss()
}
override fun showDialog() {
super.showDialog()
ready()
}
}

View File

@@ -48,11 +48,13 @@ import com.chwl.app.avroom.dialog.DatingVipRuleDialog
import com.chwl.app.avroom.dialog.RoomBoomInfoDialog
import com.chwl.app.avroom.dialog.RoomGameListDialog
import com.chwl.app.avroom.dialog.RoomGameplayDialog
import com.chwl.app.avroom.dialog.RoomLuckyBagDialog
import com.chwl.app.avroom.dialog.RoomOperationDialog
import com.chwl.app.avroom.presenter.BaseRoomPresenter
import com.chwl.app.avroom.room_album.RoomAlbumModel
import com.chwl.app.avroom.view.IBaseRoomView
import com.chwl.app.avroom.widget.BottomView
import com.chwl.app.avroom.widget.LuckyBagBtn
import com.chwl.app.avroom.widget.MessageView
import com.chwl.app.avroom.widget.MicroView
import com.chwl.app.base.BaseMvpActivity
@@ -200,6 +202,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P1 : BaseRoomPresenter<V>?> :
protected lateinit var boomIcon: ImageView
protected lateinit var boomProMax: ImageView
protected lateinit var boomPro: ImageView
protected lateinit var luckyBagBtn: LuckyBagBtn
protected lateinit var ivTeamPk: ImageView
protected lateinit var btnIvConfigEntrance: ImageView
protected lateinit var btnIvgame: ImageView
@@ -560,6 +563,8 @@ open class BaseRoomFragment<V : IBaseRoomView?, P1 : BaseRoomPresenter<V>?> :
RoomEvent.MSG_BOOM -> onBoomAboutMsg(roomEvent);
RoomEvent.MSG_SELF_ENTER_ROOM -> initRoomBoom();
RoomEvent.MSG_ROOM_LUCKY_BAG_ADD -> onLuckyBagAdd(roomEvent);
}
}
@@ -859,6 +864,10 @@ open class BaseRoomFragment<V : IBaseRoomView?, P1 : BaseRoomPresenter<V>?> :
override fun onShowLeaderccGame(url: String, config: BaiShunGameConfig) {
(activity as? AVRoomActivity)?.showLeaderccGame(url, config)
}
override fun onShowLuckyBag() {
RoomLuckyBagDialog().show(context)
}
}
dialog.show(childFragmentManager, "GAME_LIST")
}
@@ -1927,11 +1936,18 @@ open class BaseRoomFragment<V : IBaseRoomView?, P1 : BaseRoomPresenter<V>?> :
checkLuckyBagInfo()
}
//幸运礼包推送
private fun onLuckyBagAdd(roomEvent: RoomEvent) {
RoomLuckyBagManager.onLuckyBagAdd(roomEvent,luckyBagBtn)
}
private fun checkLuckyBagInfo() {
RoomLuckyBagManager.getLuckyBagInfo {
if (isAdded) {
"红包信息 = $it".doLog()
if (it.redEnvelopeListVoList.isVerify()) {
luckyBagBtn.setNewData(it.redEnvelopeListVoList)
}
}
}
}
@@ -1948,6 +1964,8 @@ open class BaseRoomFragment<V : IBaseRoomView?, P1 : BaseRoomPresenter<V>?> :
boomProMax = floatBtnLayout.findViewById(R.id.boomProMax)
boomPro = floatBtnLayout.findViewById(R.id.boomPro)
luckyBagBtn = floatBtnLayout.findViewById(R.id.luckyBagBtn)
ivTeamPk = floatBtnLayout.findViewById(R.id.iv_team_pk)
btnIvConfigEntrance = floatBtnLayout.findViewById(R.id.iv_config_entrance)

View File

@@ -252,63 +252,80 @@ public class HomePartyFragment extends BaseFragment implements View.OnClickListe
public void onResume() {
super.onResume();
updateView(AvRoomDataManager.get().mCurrentRoomInfo);
IMNetEaseManager.get().getChatRoomEventObservable()
.compose(bindToLifecycle())
.subscribe(roomEvent -> {
if (roomEvent == null) return;
int event = roomEvent.getEvent();
switch (event) {
case RoomEvent.ENTER_ROOM:
if (AvRoomDataManager.get().mCurrentRoomInfo != null) {
updateOnlineNumberView(AvRoomDataManager.get().mCurrentRoomInfo.onlineNum);
}
addTipMsg();
case RoomEvent.ROOM_INFO_UPDATE:
updateView(AvRoomDataManager.get().mCurrentRoomInfo);
break;
case RoomEvent.RECEIVE_NORMALE_GIFT://普通
onReceiveGiftMsg(roomEvent.getGiftReceiveInfo());
break;
case RoomEvent.RECEIVE_NORMALE_GIFT_ALL_SERVICE:// 全服普通
onReceiveGiftMsgAllService(roomEvent.getGiftReceiveInfo());
case RoomEvent.RECEIVE_NORMALE_GIFT_ALL_SERVICE_NOTIFY:// 全服飘屏
onReceiveGiftMsgAllServiceNotify(roomEvent.getAnyData());
break;
case RoomEvent.RECEIVE_MUTLT_NORMALEI_GIFT://普通多人
onReceiveMultiGiftMsg(roomEvent.getGiftMultiReceiverInfo());
break;
case RoomEvent.RECEIVE_ALL_MIC__NORMALEI_GIFT://普通全麦
onReceiveAllMicGiftMsg(roomEvent.getMultiGiftReceiveInfo());
break;
//福袋礼物
case RoomEvent.RECEIVE_LUCKY_GIFT:
case RoomEvent.RECEIVE_MULTI_LUCKY_GIFT:
case RoomEvent.RECEIVE_ALL_MIC_LUCKY_GIFT:
onReceiveLuckyGiftToMultiMsg(roomEvent.getLuckygiftMultiReceiverInfo());
break;
case RoomEvent.RECEIVED_SINGLE_MAGIC:
onReceiveMagicMsg(roomEvent.getMagicReceivedInfo());
break;
case RoomEvent.RECEIVED_ALL_MIC_MAGIC:
onReceiveMultiMagicMsg(roomEvent.getMultiMagicReceivedInfo());
break;
case RoomEvent.FANS_TEAM_JOIN:
onReceiveFansTeamJoinMsg(roomEvent.getChatRoomMessage());
break;
case RoomEvent.MSG_SUPER_LUCKY_GIFT:
onLuckyGiftMsg(roomEvent);
break;
case RoomEvent.MSG_CP_ABOUT:
onCpAboutMsg(roomEvent);
case RoomEvent.MSG_ROOM_BG_CHANGE:
onRoomBgChange(roomEvent);
case RoomEvent.MSG_ROOM_LEVEL_CHANGE:
onRoomLevelChange(roomEvent);
break;
default:
break;
}
});
OtherExtKt.doLog("房间消息 注册房间消息监听");
gameMainBinding.getRoot().post(() -> {
IMNetEaseManager.get().getChatRoomEventObservable()
.doOnNext(roomEvent -> {
OtherExtKt.postSafe(gameMainBinding.getRoot(), () -> {
try {
if (roomEvent == null) return null;
int event = roomEvent.getEvent();
OtherExtKt.doLog("房间消息 接收到房间消息 - "+event + " == 34 ?");
switch (event) {
case RoomEvent.ENTER_ROOM:
try {
if (AvRoomDataManager.get().mCurrentRoomInfo != null) {
updateOnlineNumberView(AvRoomDataManager.get().mCurrentRoomInfo.onlineNum);
}
addTipMsg();
} catch (Exception e) {
OtherExtKt.doLog("房间消息 接收到房间消息=1 报错 - "+e.getMessage());
}
case RoomEvent.ROOM_INFO_UPDATE:
updateView(AvRoomDataManager.get().mCurrentRoomInfo);
break;
case RoomEvent.RECEIVE_NORMALE_GIFT://普通
onReceiveGiftMsg(roomEvent.getGiftReceiveInfo());
break;
case RoomEvent.RECEIVE_NORMALE_GIFT_ALL_SERVICE:// 全服普通
onReceiveGiftMsgAllService(roomEvent.getGiftReceiveInfo());
case RoomEvent.RECEIVE_NORMALE_GIFT_ALL_SERVICE_NOTIFY:// 全服飘屏
onReceiveGiftMsgAllServiceNotify(roomEvent.getAnyData());
break;
case RoomEvent.RECEIVE_MUTLT_NORMALEI_GIFT://普通多人
onReceiveMultiGiftMsg(roomEvent.getGiftMultiReceiverInfo());
break;
case RoomEvent.RECEIVE_ALL_MIC__NORMALEI_GIFT://普通全麦
onReceiveAllMicGiftMsg(roomEvent.getMultiGiftReceiveInfo());
break;
//福袋礼物
case RoomEvent.RECEIVE_LUCKY_GIFT:
case RoomEvent.RECEIVE_MULTI_LUCKY_GIFT:
case RoomEvent.RECEIVE_ALL_MIC_LUCKY_GIFT:
onReceiveLuckyGiftToMultiMsg(roomEvent.getLuckygiftMultiReceiverInfo());
break;
case RoomEvent.RECEIVED_SINGLE_MAGIC:
onReceiveMagicMsg(roomEvent.getMagicReceivedInfo());
break;
case RoomEvent.RECEIVED_ALL_MIC_MAGIC:
onReceiveMultiMagicMsg(roomEvent.getMultiMagicReceivedInfo());
break;
case RoomEvent.FANS_TEAM_JOIN:
onReceiveFansTeamJoinMsg(roomEvent.getChatRoomMessage());
break;
case RoomEvent.MSG_SUPER_LUCKY_GIFT:
onLuckyGiftMsg(roomEvent);
break;
case RoomEvent.MSG_CP_ABOUT:
onCpAboutMsg(roomEvent);
case RoomEvent.MSG_ROOM_BG_CHANGE:
onRoomBgChange(roomEvent);
case RoomEvent.MSG_ROOM_LEVEL_CHANGE:
onRoomLevelChange(roomEvent);
break;
default:
break;
}
} catch (Exception e) {
OtherExtKt.doLog("房间消息 报错 "+roomEvent.getEvent()+" "+e.getMessage());
}
return null;
});
})
.subscribe();
});
}

View File

@@ -765,6 +765,7 @@ public class GiftV2View extends FrameLayout implements GiftEffectView.GiftEffect
objectAnimator.setDuration(time);
objectAnimator.start();
OtherExtKt.doLog("礼物icon 飞行动画开始播放 礼物名 = "+giftInfo.getGiftName());
objectAnimator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {

View File

@@ -4,9 +4,21 @@ import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.FrameLayout
import com.chwl.app.R
import com.chwl.app.avroom.bean.LuckyBagEntity
import com.chwl.app.avroom.dialog.RoomLuckyBagOpenDialog
import com.chwl.app.base.BaseDialogFragment
import com.chwl.app.databinding.ViewLuckyBagBtnBinding
import com.chwl.app.utils.RoomLuckyBagManager
import com.chwl.library.common.util.ClickUtils.click
import com.chwl.library.common.util.doLog
import com.chwl.library.common.util.isVerify
import com.chwl.library.common.util.postSafe
import com.chwl.library.common.util.setVis
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
class LuckyBagBtn : FrameLayout{
@@ -16,6 +28,11 @@ class LuckyBagBtn : FrameLayout{
lateinit var mBinding : ViewLuckyBagBtnBinding
var mData = mutableListOf<LuckyBagEntity>()
private var mTimeDownJob : Job? = null
private val needLog = false
private fun initView(context: Context) {
mBinding = ViewLuckyBagBtnBinding.inflate(LayoutInflater.from(context),this,true)
mBinding.number.setBgColor("#f33a49")
@@ -27,16 +44,75 @@ class LuckyBagBtn : FrameLayout{
private fun onClick() {
mData.isVerify(0){
val dialog = RoomLuckyBagOpenDialog()
dialog.mData = it
dialog.mActionCallBack = object : BaseDialogFragment.Action {
override fun onAction(type: Int, data: Any?) {
if (data != null && data is LuckyBagEntity) {
mData.remove(data)
showView()
}
}
}
dialog.show(context)
}
}
private fun upDateView() {
mBinding.number.text = 11.toString()
mBinding.number.setVis(true)
fun setNewData(data: List<LuckyBagEntity>) {
mData = data.toMutableList()
showView()
}
fun addData(data : LuckyBagEntity) {
mData.add(data)
val sortedBy = mData.sortedBy { it.beginTime }
mData = sortedBy.toMutableList()
showView()
}
private fun showView() {
this.postSafe {
setVis(mData.isVerify())
mBinding.number.text = mData.size.toString()
mBinding.number.setVis(mData.size > 1)
mData.isVerify(0){
mBinding.bagImg.setImageResource(if (it.isGift) R.drawable.ic_lucky_bag_btn_gift_pic else R.drawable.ic_lucky_bag_btn_gold_pic)
startTimeDown(it.beginTime)
}
}
}
// b 1739178120 c 1739178000 , 阿拉伯 c 1739178000
private fun startTimeDown(beginTime: Long) {
val downTime = RoomLuckyBagManager.getTimeDown(beginTime)
mTimeDownJob?.cancel()
mTimeDownJob = GlobalScope.launch {
for (time in downTime downTo 0) {
delay(1000L)
mBinding.time.postSafe{
val timeString = RoomLuckyBagManager.getTimeString(time)
mBinding.time.text = timeString
mBinding.time.setVis(time != 0L)
"倒计时 i=$time timeString=$timeString".doLog(needLog)
}
}
mTimeDownJob?.cancel()
mTimeDownJob = null
}
mTimeDownJob?.start()
}
override fun onDetachedFromWindow() {
mTimeDownJob?.cancel()
mTimeDownJob = null
super.onDetachedFromWindow()
}
}

View File

@@ -22,7 +22,6 @@ import static com.chwl.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_DRAW_
import static com.chwl.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_FANS_TEAM_JOIN;
import static com.chwl.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_GIFT_COMPOUND;
import static com.chwl.core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUPER_LUCKY_GIFT_TEMPLATE;
import static com.chwl.core.im.custom.bean.CustomAttachment.ROOM_LUCKY_BAG_FIRST;
import static com.chwl.core.redpackage.RedPackageTypeKt.ALL_DIAMOND;
import static com.chwl.core.redpackage.RedPackageTypeKt.ALL_GIFT;
import static com.chwl.core.redpackage.RedPackageTypeKt.ROOM_DIAMOND;
@@ -62,12 +61,14 @@ import com.bumptech.glide.request.target.Target;
import com.chwl.app.R;
import com.chwl.app.UIHelper;
import com.chwl.app.avroom.activity.AVRoomActivity;
import com.chwl.app.avroom.bean.LuckyBagEntity;
import com.chwl.app.avroom.dialog.RoomTeamPKResultDialog;
import com.chwl.app.avroom.room_album.UnlockRoomAlbumPhotoDialog;
import com.chwl.app.common.widget.OriginalDrawStatusClickSpan;
import com.chwl.app.photo.BigPhotoActivity;
import com.chwl.app.photo.PagerOption;
import com.chwl.app.sadmin.utils.SaAttachmentToMsgUtil;
import com.chwl.app.ui.utils.ImageLoadKt;
import com.chwl.app.ui.utils.ImageLoadUtils;
import com.chwl.app.ui.utils.ImageLoadUtilsV2;
import com.chwl.app.ui.widget.DividerItemDecoration;
@@ -118,6 +119,7 @@ import com.chwl.core.im.custom.bean.MonsterStatusAttachment;
import com.chwl.core.im.custom.bean.MultiGiftAttachment;
import com.chwl.core.im.custom.bean.MultiLuckyGiftAttachment;
import com.chwl.core.im.custom.bean.NobleAttachment;
import com.chwl.core.im.custom.bean.RedPackageLuckyBagAttachment;
import com.chwl.core.im.custom.bean.RedPackageRoomMsgAttachment;
import com.chwl.core.im.custom.bean.RoomAlbumAttachment;
import com.chwl.core.im.custom.bean.RoomAlbumMsgInfo;
@@ -152,6 +154,7 @@ import com.chwl.core.noble.NobleUtil;
import com.chwl.core.noble.bean.NobleInfo;
import com.chwl.core.praise.PraiseModel;
import com.chwl.core.redpackage.bean.RedEnvelopeRoomMsg;
import com.chwl.core.redpackage.bean.RedPackageLuckyBag;
import com.chwl.core.room.anotherroompk.ShowUserInfoDialogEvent;
import com.chwl.core.room.bean.DatingNotifyInfo;
import com.chwl.core.room.bean.RoomInfo;
@@ -177,7 +180,6 @@ import com.chwl.core.utils.extension.StringExtensionKt;
import com.chwl.core.utils.net.DontWarnObserver;
import com.chwl.core.utils.net.RxHelper;
import com.chwl.core.vip.bean.VipMessageInfo;
import com.chwl.core.widget.img.MyCircleImageView;
import com.chwl.library.common.util.OtherExtKt;
import com.chwl.library.common.util.Utils;
import com.chwl.library.rxbus.RxBus;
@@ -188,6 +190,7 @@ import com.chwl.library.utils.ResUtil;
import com.chwl.library.utils.SingleToastUtil;
import com.chwl.library.utils.SizeUtils;
import com.example.lib_utils.UiUtils;
import com.example.lib_utils.ktx.ResourcesKtxKt;
import com.netease.nim.uikit.business.uinfo.UserInfoHelper;
import com.netease.nim.uikit.common.ui.span.RadiusBackgroundSpan;
import com.netease.nim.uikit.common.util.log.LogUtil;
@@ -774,6 +777,8 @@ public class MessageView extends FrameLayout {
if (attachment instanceof CustomAttachment) {
if (((CustomAttachment) attachment).getFirst() == CustomAttachment.CUSTOM_MSG_ROOM_ALBUM) {
return CustomAttachment.CUSTOM_MSG_ROOM_ALBUM;
}if (((CustomAttachment) attachment).getFirst() == CustomAttachment.CUSTOM_MSG_RED_PACKAGE) {
return CustomAttachment.CUSTOM_MSG_RED_PACKAGE;
}
}
}
@@ -789,7 +794,7 @@ public class MessageView extends FrameLayout {
}
if (viewType == ROOM_LUCKY_BAG_FIRST) {
if (viewType == CustomAttachment.CUSTOM_MSG_RED_PACKAGE) {
return new MessageViewHolder(LayoutInflater.from(parent.getContext())
.inflate(R.layout.layout_msg_view_holder_room_lucky_bag, parent, false));
@@ -1042,7 +1047,10 @@ public class MessageView extends FrameLayout {
} else if (first == CUSTOM_MSG_RED_PACKAGE) {
if (second == CustomAttachment.CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_MSG) {
setRedPackageMsg(chatRoomMessage, tvContent);
}else if (second == CustomAttachment.CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_LUCKY_BAG){
setRedPackageMsgByLuckyBag(baseViewHolder,chatRoomMessage);
}
} else if (first == CustomAttachment.CUSTOM_MSG_DATING) {
setDatingMsg(chatRoomMessage, tvContent, second);
} else if (first == CustomAttachment.CUSTOM_MESS_TAROT) {
@@ -1059,9 +1067,7 @@ public class MessageView extends FrameLayout {
setFairyMsg(chatRoomMessage, tvContent);
} else if (first == CUSTOM_MSG_ROOM_ALBUM) {
setRoomAlbumMsg(chatRoomMessage, baseViewHolder);
} else if (first == ROOM_LUCKY_BAG_FIRST) {
setLuckyBagMsg(chatRoomMessage, baseViewHolder);
} else if (first == CUSTOM_MSG_ROOM_TEMPLATE) {
}else if (first == CUSTOM_MSG_ROOM_TEMPLATE) {
TemplateMessageAttachment templateMessageAttachment = (TemplateMessageAttachment) chatRoomMessage.getAttachment();
if (templateMessageAttachment != null) {
getTemplateMessageAdapter().convert(tvContent, templateMessageAttachment.getTemplateMessage());
@@ -1171,22 +1177,6 @@ public class MessageView extends FrameLayout {
tvUnlock.setOnClickListener(v -> unlockRoomPhoto(baseViewHolder.getAbsoluteAdapterPosition(), roomPhoto));
}
//----幸运礼包消息
private void setLuckyBagMsg(ChatRoomMessage chatRoomMessage, MessageViewHolder baseViewHolder) {
RoomAlbumAttachment attachment = (RoomAlbumAttachment) chatRoomMessage.getAttachment();
RoomAlbumMsgInfo mRoomAlbumMsgInfo = attachment.getMRoomAlbumMsgInfo();
if (mRoomAlbumMsgInfo == null) {
return;
}
ImageView luckyBagBg = baseViewHolder.itemView.findViewById(R.id.bg);
MyCircleImageView luckyBagAvatar = baseViewHolder.itemView.findViewById(R.id.avatar);
TextView luckyBagNick = baseViewHolder.itemView.findViewById(R.id.nick);
TextView luckyBagContent = baseViewHolder.itemView.findViewById(R.id.content);
}
private void unlockRoomPhoto(int position, RoomPhoto roomPhoto) {
UnlockRoomAlbumPhotoDialog unlockRoomAlbumPhotoDialog = UnlockRoomAlbumPhotoDialog.Companion
@@ -1614,6 +1604,33 @@ public class MessageView extends FrameLayout {
}
//幸运礼包
private void setRedPackageMsgByLuckyBag(MessageViewHolder baseViewHolder,ChatRoomMessage chatRoomMessage) {
MsgAttachment attachment = chatRoomMessage.getAttachment();
if (attachment instanceof RedPackageLuckyBagAttachment) {
RedPackageLuckyBag redPackageLuckyBag = ((RedPackageLuckyBagAttachment) attachment).getRedPackageLuckyBag();
if (redPackageLuckyBag!= null) {
ImageView avatar = baseViewHolder.itemView.findViewById(R.id.avatar);
TextView nick = baseViewHolder.itemView.findViewById(R.id.nick);
TextView content = baseViewHolder.itemView.findViewById(R.id.content);
ImageView bg = baseViewHolder.itemView.findViewById(R.id.bg);
ImageLoadKt.loadAvatar(avatar, redPackageLuckyBag.getSendUserAvatar());
nick.setText(redPackageLuckyBag.getSendUserNick());
content.setText(ResourcesKtxKt.getString(R.string._ver_24_lucky_bag_room_msg, redPackageLuckyBag.getSendUserNick()));
if (redPackageLuckyBag.getRedEnvelopeType().equals(LuckyBagEntity.Type.GIFT)) {
bg.setImageResource(R.drawable.ic_lucky_bag_msg_gift_bg);
} else {
bg.setImageResource(R.drawable.ic_lucky_bag_msg_gold_bg);
}
}
}
}
/**
* 提示加入話題
*

View File

@@ -6,6 +6,7 @@ import android.view.ViewGroup
import androidx.viewbinding.ViewBinding
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chwl.app.R
import com.chwl.library.common.util.isVerify
import java.lang.reflect.ParameterizedType
open class BaseBindingAdapter<VB : ViewBinding?, T>() : BaseQuickAdapter<T, BaseBindingViewHolder<VB>>(R.layout.item_empty_list) {
@@ -33,8 +34,32 @@ open class BaseBindingAdapter<VB : ViewBinding?, T>() : BaseQuickAdapter<T, Base
}
override fun convert(helper: BaseBindingViewHolder<VB>, item: T) {
helper.binding?.let {
val pos = helper.bindingAdapterPosition
onBindView(helper.binding,item,pos)
}
}
override fun convertPayloads(
helper: BaseBindingViewHolder<VB>,
item: T,
payloads: MutableList<Any>
) {
if (payloads.isVerify()) {
helper.binding?.let {
val pos = helper.bindingAdapterPosition
onBindViewByPayloads(helper.binding,item,pos,payloads)
}
} else {
super.convertPayloads(helper, item, payloads)
}
}
open fun onBindView(viewBinding: VB,data : T,pos:Int) {}
open fun onBindViewByPayloads(viewBinding: VB,data : T,pos:Int,payloads: MutableList<Any>) {}
}

View File

@@ -22,6 +22,15 @@ public class EmptyViewHelper {
return view;
}
public static View createEmptyView(Context context,int imgId, String text) {
if (!NetworkUtils.isNetworkAvailable(context)) text = ResUtil.getString(R.string.erban_common_emptyviewhelper_01);
View view = LayoutInflater.from(context).inflate(R.layout.layout_ktv_empty, null);
view.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
((TextView) view.findViewById(R.id.tv_hint)).setText(text);
((ImageView) view.findViewById(R.id.iv_status)).setImageResource(imgId);
return view;
}
public static View createEmptyTextViewHeight(Context context, String text) {
if (!NetworkUtils.isNetworkAvailable(context)) text = ResUtil.getString(R.string.erban_common_emptyviewhelper_01);
View view = LayoutInflater.from(context).inflate(R.layout.layout_wrap_empty, null);

View File

@@ -22,6 +22,7 @@ import com.bumptech.glide.util.Util
import com.chwl.app.R
import com.chwl.core.utils.LogUtils
import com.chwl.library.common.glide.GlideUtils
import com.chwl.library.common.util.isVerify
import com.netease.nim.uikit.common.util.sys.ScreenUtil
import com.netease.nim.uikit.support.glide.GlideApp
import com.opensource.svgaplayer.SVGADrawable
@@ -79,7 +80,9 @@ fun ImageView.load(
fun ImageView.loadAvatar(url: String?) {
if (context.isDestroyed()) return
ImageLoadUtils.loadAvatar(url,this)
if (url.isVerify()) {
ImageLoadUtils.loadAvatar(url,this)
}
}

View File

@@ -1,19 +1,70 @@
package com.chwl.app.utils
import android.icu.util.Calendar
import android.icu.util.TimeZone
import com.chwl.app.avroom.bean.LuckyBagConfig
import com.chwl.app.avroom.bean.LuckyBagEntity
import com.chwl.app.avroom.bean.RoomLuckyBagInfo
import com.chwl.app.avroom.widget.LuckyBagBtn
import com.chwl.core.bean.response.ServiceResult
import com.chwl.core.gift.bean.RoomNotifyDialogBean
import com.chwl.core.im.custom.bean.RedPackageLuckyBagAttachment
import com.chwl.core.manager.AvRoomDataManager
import com.chwl.core.manager.RoomEvent
import com.chwl.core.utils.net.RxHelper
import com.chwl.library.common.util.doLog
import com.chwl.library.net.rxnet.RxNet
import io.reactivex.Single
import retrofit2.http.GET
import retrofit2.http.Query
import java.util.Locale
object RoomLuckyBagManager {
var mLuckyBagConfig : LuckyBagConfig?= null
fun getTimeDown(beginTime:Long) : Long {
var downTime = 0L
val timez = TimeZone.getDefault()
val localTime = System.currentTimeMillis()
val timeOffset = timez.getOffset(localTime)
val east8 = TimeZone.getTimeZone("Asia/Shanghai").getOffset(localTime)
val cTime = localTime + (east8 - timeOffset)
downTime = (beginTime - cTime).coerceAtLeast(0) / 1000
"倒计时 计算 localTime=$localTime timeOffset=$timeOffset east8=$east8 beginTime=$beginTime cTime=$cTime downTime=$downTime ".doLog()
return downTime
}
fun getTimeString(seconds:Long): String {
val minutes = seconds / 60
val reSeconds = seconds % 60
return String.format(Locale.ENGLISH,"%02d:%02d",minutes,reSeconds)
}
fun timeToUtc(time:Long):Long{
val calendar = Calendar.getInstance(TimeZone.getTimeZone("Asia/Shanghai"))
calendar.timeInMillis = time
val utcCalender = Calendar.getInstance(TimeZone.getTimeZone("UTC"))
utcCalender.timeInMillis = calendar.timeInMillis
utcCalender.timeZone = TimeZone.getTimeZone("UTC")
"倒计时 timeToUtc() time = $time utcCalender.timeInMillis=${ utcCalender.timeInMillis} ".doLog()
return utcCalender.timeInMillis
}
fun is8Hours() :Boolean{
val i = TimeZone.getDefault().rawOffset / 3600000
return i == 8
}
public fun getLuckyBagInfo(run:(info:RoomLuckyBagInfo)->Unit) {
val roomUid = AvRoomDataManager.get().roomUid
if (roomUid > 0) {
@@ -35,6 +86,26 @@ object RoomLuckyBagManager {
.compose(RxHelper.handleSchedulers())
}
fun onLuckyBagAdd(roomEvent: RoomEvent, luckyBagBtn: LuckyBagBtn) {
try {
val attachment = roomEvent.chatRoomMessage.attachment as RedPackageLuckyBagAttachment
if (attachment.redPackageLuckyBag?.roomUid == AvRoomDataManager.get().roomUid) {
luckyBagBtn.addData(LuckyBagEntity().apply {
beginTime = attachment.redPackageLuckyBag.beginTime
type = attachment.redPackageLuckyBag.redEnvelopeType
nick = attachment.redPackageLuckyBag.sendUserAvatar
avatar = attachment.redPackageLuckyBag.sendUserAvatar
userId = attachment.redPackageLuckyBag.roomUid
roomUid = attachment.redPackageLuckyBag.roomUid
id = attachment.redPackageLuckyBag.redEnvelopeId
})
}
RoomNotifyDialogManager.addDialog(RoomNotifyDialogBean(attachment.first,attachment.second,attachment.redPackageLuckyBag))
} catch (e: Exception) {
"红包 红包推送 处理出错 ${e.message}".doLog()
}
}
private val api: Api = RxNet.create(Api::class.java);
interface Api {

View File

@@ -10,6 +10,7 @@ import com.chwl.app.avroom.dialog.RoomNotifyBoomDialog
import com.chwl.app.avroom.dialog.RoomNotifyCpBindDialog
import com.chwl.app.avroom.dialog.RoomNotifyCpGiftDialog
import com.chwl.app.avroom.dialog.RoomNotifyLevelUpDialog
import com.chwl.app.avroom.dialog.RoomNotifyLuckBagDialog
import com.chwl.app.avroom.dialog.RoomNotifyLuckGiftDialog
import com.chwl.app.databinding.LayoutRoomNotifyLuckyGiftTipBinding
import com.chwl.core.gift.bean.BoomMsgDialogBean
@@ -18,6 +19,7 @@ import com.chwl.core.gift.bean.LuckyGiftMsgAllBean
import com.chwl.core.gift.bean.LuckyGiftMsgSelfBean
import com.chwl.core.gift.bean.RoomNotifyDialogBean
import com.chwl.core.im.custom.bean.CustomAttachment
import com.chwl.core.redpackage.bean.RedPackageLuckyBag
import com.chwl.library.common.util.doLog
import com.chwl.library.common.util.setAutoSizeModel
import java.util.LinkedList
@@ -97,6 +99,12 @@ object RoomNotifyDialogManager {
this.data = bean.data as BoomMsgDialogBean
}
}
}else if (bean.first == CustomAttachment.CUSTOM_MSG_RED_PACKAGE){
if (bean.data is RedPackageLuckyBag) {
dialog = RoomNotifyLuckBagDialog(activity).apply {
this.data = bean.data as RedPackageLuckyBag
}
}
}
return dialog
}
@@ -139,10 +147,12 @@ object RoomNotifyDialogManager {
}
fun clear() {
dialogBuffer?.clear()
queue?.clear()
luckyGiftTipPool?.clear()
dialog?.clearDialog()
dialog = null
queue.clear()
}
}

View File

@@ -191,7 +191,7 @@
android:orientation="horizontal"
android:visibility="invisible"
tools:contentDescription="@string/layout_dialog_bottom_gift_02"
tools:visibility="visible">
tools:visibility="gone">
<com.chwl.app.common.widget.CircleImageView
android:id="@+id/avatar"

View File

@@ -1,447 +1,499 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:orientation="vertical">
android:layout_gravity="bottom">
<include
android:id="@+id/notifyView"
layout="@layout/view_room_lucky_bag_notify" />
<androidx.constraintlayout.widget.ConstraintLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="650dp"
android:background="@drawable/ic_lucky_bag_bg"
android:layout_marginTop="-43dp"
android:orientation="vertical">
android:orientation="vertical"
android:gravity="bottom"
android:layout_height="match_parent">
<include
android:id="@+id/notifyView"
layout="@layout/view_room_lucky_bag_notify" />
<!-- 顶部-->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/topLayout"
android:layout_width="match_parent"
android:layout_height="650dp"
android:background="@drawable/ic_lucky_bag_bg"
android:layout_marginTop="-43dp"
android:orientation="vertical">
android:layoutDirection="ltr"
android:layout_height="wrap_content"
android:layout_marginTop="108dp"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/bgGiftBag"
android:layout_width="0dp"
android:background="@drawable/ic_lucky_bag_tab_bg_left_s"
android:layout_height="47dp"
android:layout_marginStart="9dp"
app:layout_constraintEnd_toStartOf="@id/bgGoldBag"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/btnGiftBag"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:lines="1"
android:text="@string/_ver_24_Gift_Lucky_Bag"
android:textColor="@color/color_FFEA5C"
app:layout_constraintBottom_toBottomOf="@+id/bgGiftBag"
app:layout_constraintEnd_toEndOf="@+id/bgGiftBag"
app:layout_constraintStart_toStartOf="@+id/bgGiftBag"
app:layout_constraintTop_toTopOf="@+id/bgGiftBag" />
<ImageView
android:id="@+id/bgGoldBag"
android:layout_width="0dp"
android:layout_height="47dp"
android:background="@drawable/ic_lucky_bag_tab_bg_right_n"
android:layout_marginEnd="9dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/bgGiftBag"
app:layout_constraintTop_toTopOf="@+id/bgGiftBag" />
<TextView
android:id="@+id/btnGoldBag"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:lines="1"
android:text="@string/_ver_24_Coin_Lucky_Bag"
android:textColor="@color/color_FFEA5C"
app:layout_constraintBottom_toBottomOf="@+id/bgGoldBag"
app:layout_constraintEnd_toEndOf="@+id/bgGoldBag"
app:layout_constraintStart_toStartOf="@+id/bgGoldBag"
app:layout_constraintTop_toTopOf="@+id/bgGoldBag" />
<ImageView
android:layout_width="62dp"
android:layout_height="31dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- 中间-->
<FrameLayout
android:id="@+id/centerLayout"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/bottomLayout"
app:layout_constraintTop_toBottomOf="@id/topLayout">
<!-- 礼物红包布局-->
<!-- 顶部-->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/giftBagLayout"
android:id="@+id/topLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="invisible"
tools:visibility="visible">
<LinearLayout
android:id="@+id/lineGiftType"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="9dp"
android:layoutDirection="ltr"
android:gravity="center_horizontal|center_vertical"
app:layout_constraintTop_toTopOf="parent">
android:layoutDirection="ltr"
android:layout_height="wrap_content"
android:layout_marginTop="108dp"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="80dp"
android:layout_height="15dp"
android:src="@drawable/ic_lucky_bag_title_left" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:text="@string/_ver_24_Choose_Gift"
android:textColor="@color/color_FFEA5C"
android:textSize="14sp" />
<ImageView
android:layout_width="80dp"
android:layout_height="15dp"
android:src="@drawable/ic_lucky_bag_title_right" />
</LinearLayout>
<FrameLayout
android:id="@+id/flListGiftTypeLayout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="37dp"
android:layout_marginBottom="94dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvListGiftType"
android:layout_marginHorizontal="17dp"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</FrameLayout>
<com.chwl.app.view.MyCircleIndicator
android:id="@+id/giftIndicator"
tools:background="@color/blue"
android:layout_width="100dp"
android:layout_height="10dp"
app:layout_constraintEnd_toEndOf="parent"
<ImageView
android:id="@+id/bgGiftBag"
android:layout_width="0dp"
android:background="@drawable/ic_lucky_bag_tab_bg_left_s"
android:layout_height="47dp"
android:layout_marginStart="9dp"
app:layout_constraintEnd_toStartOf="@id/bgGoldBag"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/flListGiftTypeLayout" />
<LinearLayout
android:id="@+id/lineGiftTime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layoutDirection="ltr"
android:layout_marginBottom="12dp"
android:gravity="center_horizontal|center_vertical"
app:layout_constraintBottom_toTopOf="@+id/rvListGiftTime">
<ImageView
android:layout_width="80dp"
android:layout_height="15dp"
android:src="@drawable/ic_lucky_bag_title_left" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:text="@string/_ver_24_Waiting_time"
android:textColor="@color/color_FFEA5C"
android:textSize="14sp" />
<ImageView
android:layout_width="80dp"
android:layout_height="15dp"
android:src="@drawable/ic_lucky_bag_title_right" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvListGiftTime"
android:layout_width="match_parent"
android:layout_marginHorizontal="17dp"
android:layout_marginBottom="16dp"
android:layout_height="30dp"
app:layout_constraintBottom_toBottomOf="parent"/>
<TextView
android:id="@+id/reviewTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:text="@string/_ver_24_reviewTime"
android:textColor="@color/color_FFEA5C"
android:textSize="14sp"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/flListGiftTypeLayout"
tools:visibility="visible" />
<com.chwl.library.widget.text.DrawableTextView
android:id="@+id/btnModify"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:drawablePadding="3.5dp"
android:text="@string/text_modify"
android:textColor="@color/color_FFEA5C"
android:textSize="12sp"
android:visibility="gone"
app:dt_drawableRightHeight="11dp"
app:dt_drawableRightSrc="@drawable/ic_login_next"
app:dt_drawableRightWidth="11dp"
app:layout_constraintEnd_toEndOf="@+id/reviewTime"
app:layout_constraintStart_toStartOf="@+id/reviewTime"
app:layout_constraintTop_toBottomOf="@+id/reviewTime"
tools:visibility="visible" />
<androidx.constraintlayout.widget.Group
android:id="@+id/groupGiftSelect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="visible"
app:constraint_referenced_ids="lineGiftType,lineGiftTime,rvListGiftTime"
tools:visibility="visible" />
<androidx.constraintlayout.widget.Group
android:id="@+id/groupReViewGift"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
app:constraint_referenced_ids="reviewTime,btnModify"
tools:visibility="gone" />
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- 金币红包布局-->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/goldBagLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="invisible"
app:layout_constraintTop_toBottomOf="@id/topLayout"
tools:visibility="gone">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvListGoldType"
android:layout_width="match_parent"
android:layout_marginHorizontal="17dp"
android:layout_height="100dp"
android:layout_marginTop="52dp"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/lineGoldNum"
android:layout_width="match_parent"
<TextView
android:id="@+id/btnGiftBag"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="47dp"
android:layoutDirection="ltr"
android:gravity="center_horizontal|center_vertical"
app:layout_constraintTop_toBottomOf="@+id/rvListGoldType">
android:ellipsize="end"
android:gravity="center"
android:lines="1"
android:text="@string/_ver_24_Gift_Lucky_Bag"
android:textColor="@color/color_FFEA5C"
app:layout_constraintBottom_toBottomOf="@+id/bgGiftBag"
app:layout_constraintEnd_toEndOf="@+id/bgGiftBag"
app:layout_constraintStart_toStartOf="@+id/bgGiftBag"
app:layout_constraintTop_toTopOf="@+id/bgGiftBag" />
<ImageView
android:layout_width="80dp"
android:layout_height="15dp"
android:src="@drawable/ic_lucky_bag_title_left" />
<ImageView
android:id="@+id/bgGoldBag"
android:layout_width="0dp"
android:layout_height="47dp"
android:background="@drawable/ic_lucky_bag_tab_bg_right_n"
android:layout_marginEnd="9dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/bgGiftBag"
app:layout_constraintTop_toTopOf="@+id/bgGiftBag" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:text="@string/_ver_24_Lucky_Bag_Numbers"
android:textColor="@color/color_FFEA5C"
android:textSize="14sp" />
<ImageView
android:layout_width="80dp"
android:layout_height="15dp"
android:src="@drawable/ic_lucky_bag_title_right" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvListGoldNum"
android:layout_width="match_parent"
android:layout_marginHorizontal="17dp"
android:layout_height="30dp"
android:layout_marginTop="12dp"
app:layout_constraintTop_toBottomOf="@id/lineGoldNum" />
<LinearLayout
android:id="@+id/lineGoldTime"
android:layout_width="match_parent"
<TextView
android:id="@+id/btnGoldBag"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="44dp"
android:layoutDirection="ltr"
android:gravity="center_horizontal|center_vertical"
app:layout_constraintTop_toBottomOf="@+id/rvListGoldNum">
android:ellipsize="end"
android:gravity="center"
android:lines="1"
android:text="@string/_ver_24_Coin_Lucky_Bag"
android:textColor="@color/color_FFEA5C"
app:layout_constraintBottom_toBottomOf="@+id/bgGoldBag"
app:layout_constraintEnd_toEndOf="@+id/bgGoldBag"
app:layout_constraintStart_toStartOf="@+id/bgGoldBag"
app:layout_constraintTop_toTopOf="@+id/bgGoldBag" />
<ImageView
android:layout_width="80dp"
android:layout_height="15dp"
android:src="@drawable/ic_lucky_bag_title_left" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:text="@string/_ver_24_Waiting_time"
android:textColor="@color/color_FFEA5C"
android:textSize="14sp" />
<ImageView
android:layout_width="80dp"
android:layout_height="15dp"
android:src="@drawable/ic_lucky_bag_title_right" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvListGoldTime"
android:layout_width="match_parent"
android:layout_marginHorizontal="17dp"
android:layout_height="30dp"
android:layout_marginTop="12dp"
app:layout_constraintTop_toBottomOf="@id/lineGoldTime" />
<ImageView
android:layout_width="62dp"
android:layout_height="31dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- 中间-->
<FrameLayout
android:id="@+id/centerLayout"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@id/bottomLayout"
app:layout_constraintTop_toBottomOf="@id/topLayout">
</FrameLayout>
<!-- 礼物红包布局-->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/giftBagLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="invisible"
tools:visibility="visible">
<!-- 底部-->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/bottomLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="20dp"
android:layout_marginBottom="10dp"
app:layout_constraintBottom_toBottomOf="parent">
<LinearLayout
android:id="@+id/lineGiftType"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="9dp"
android:layoutDirection="ltr"
android:gravity="center_horizontal|center_vertical"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/redBagDesc"
android:layout_width="wrap_content"
<ImageView
android:layout_width="80dp"
android:layout_height="15dp"
android:src="@drawable/ic_lucky_bag_title_left" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:text="@string/_ver_24_Choose_Gift"
android:textColor="@color/color_FFEA5C"
android:textSize="14sp" />
<ImageView
android:layout_width="80dp"
android:layout_height="15dp"
android:src="@drawable/ic_lucky_bag_title_right" />
</LinearLayout>
<FrameLayout
android:id="@+id/flListGiftTypeLayout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="37dp"
android:layout_marginBottom="94dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvListGiftType"
android:layout_marginHorizontal="17dp"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</FrameLayout>
<com.chwl.app.view.MyCircleIndicator
android:id="@+id/giftIndicator"
tools:background="@color/blue"
android:layout_width="100dp"
android:layout_height="10dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/flListGiftTypeLayout" />
<LinearLayout
android:id="@+id/lineGiftTime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layoutDirection="ltr"
android:layout_marginBottom="12dp"
android:gravity="center_horizontal|center_vertical"
app:layout_constraintBottom_toTopOf="@+id/rvListGiftTime">
<ImageView
android:layout_width="80dp"
android:layout_height="15dp"
android:src="@drawable/ic_lucky_bag_title_left" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:text="@string/_ver_24_Waiting_time"
android:textColor="@color/color_FFEA5C"
android:textSize="14sp" />
<ImageView
android:layout_width="80dp"
android:layout_height="15dp"
android:src="@drawable/ic_lucky_bag_title_right" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvListGiftTime"
android:layout_width="match_parent"
android:layout_marginHorizontal="17dp"
android:layout_marginBottom="16dp"
android:layout_height="30dp"
app:layout_constraintBottom_toBottomOf="parent"/>
<TextView
android:id="@+id/reviewTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:text="@string/_ver_24_reviewTime"
android:textColor="@color/color_FFEA5C"
android:textSize="14sp"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/flListGiftTypeLayout"
tools:visibility="visible" />
<com.chwl.library.widget.text.DrawableTextView
android:id="@+id/btnModify"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:drawablePadding="3.5dp"
android:text="@string/text_modify"
android:textColor="@color/color_FFEA5C"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="20dp"
android:visibility="gone"
app:dt_drawableRightHeight="11dp"
app:dt_drawableRightSrc="@drawable/ic_login_next"
app:dt_drawableRightWidth="11dp"
app:layout_constraintEnd_toEndOf="@+id/reviewTime"
app:layout_constraintStart_toStartOf="@+id/reviewTime"
tools:visibility="visible" />
<androidx.constraintlayout.widget.Group
android:id="@+id/groupGiftSelect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="visible"
app:constraint_referenced_ids="lineGiftType,lineGiftTime,rvListGiftTime,giftIndicator"
tools:visibility="gone" />
<androidx.constraintlayout.widget.Group
android:id="@+id/groupReViewGift"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="invisible"
app:constraint_referenced_ids="reviewTime,btnModify"
tools:visibility="visible" />
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- 金币红包布局-->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/goldBagLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="invisible"
app:layout_constraintTop_toBottomOf="@id/topLayout"
tools:visibility="gone">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvListGoldType"
android:layout_width="match_parent"
android:layout_marginHorizontal="17dp"
android:layout_height="100dp"
android:layout_marginTop="52dp"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/lineGoldNum"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="47dp"
android:layoutDirection="ltr"
android:gravity="center_horizontal|center_vertical"
app:layout_constraintTop_toBottomOf="@+id/rvListGoldType">
<ImageView
android:layout_width="80dp"
android:layout_height="15dp"
android:src="@drawable/ic_lucky_bag_title_left" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:text="@string/_ver_24_Lucky_Bag_Numbers"
android:textColor="@color/color_FFEA5C"
android:textSize="14sp" />
<ImageView
android:layout_width="80dp"
android:layout_height="15dp"
android:src="@drawable/ic_lucky_bag_title_right" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvListGoldNum"
android:layout_width="match_parent"
android:layout_marginHorizontal="17dp"
android:layout_height="30dp"
android:layout_marginTop="12dp"
app:layout_constraintTop_toBottomOf="@id/lineGoldNum" />
<LinearLayout
android:id="@+id/lineGoldTime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="44dp"
android:layoutDirection="ltr"
android:gravity="center_horizontal|center_vertical"
app:layout_constraintTop_toBottomOf="@+id/rvListGoldNum">
<ImageView
android:layout_width="80dp"
android:layout_height="15dp"
android:src="@drawable/ic_lucky_bag_title_left" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:text="@string/_ver_24_Waiting_time"
android:textColor="@color/color_FFEA5C"
android:textSize="14sp" />
<ImageView
android:layout_width="80dp"
android:layout_height="15dp"
android:src="@drawable/ic_lucky_bag_title_right" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvListGoldTime"
android:layout_width="match_parent"
android:layout_marginHorizontal="17dp"
android:layout_height="30dp"
android:layout_marginTop="12dp"
app:layout_constraintTop_toBottomOf="@id/lineGoldTime" />
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>
<!-- 底部-->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/bottomLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/_ver_24_sendHint"
android:textColor="@color/color_FFEA5C"
android:textSize="12sp"
android:paddingHorizontal="20dp"
android:layout_marginBottom="10dp"
app:layout_constraintBottom_toBottomOf="parent">
<TextView
android:id="@+id/redBagDesc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/_ver_24_sendHint"
android:textColor="@color/color_FFEA5C"
android:textSize="12sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.chwl.library.widget.text.DrawableTextView
android:id="@+id/userGold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="22dp"
android:drawablePadding="4dp"
android:gravity="center_vertical"
android:text="0000"
android:textColor="@color/color_FFEA5C"
android:textSize="15sp"
android:textStyle="bold"
app:dt_drawableLeftHeight="21dp"
app:dt_drawableLeftSrc="@drawable/ic_coin_84"
app:dt_drawableLeftWidth="21dp"
app:dt_drawableRightHeight="17dp"
app:dt_drawableRightSrc="@drawable/ic_lucky_bag_add"
app:dt_drawableRightWidth="17dp"
app:dt_drawableType="shape"
app:layout_constraintEnd_toStartOf="@id/bottomSpace"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/redBagDesc" />
<androidx.legacy.widget.Space
android:id="@+id/bottomSpace"
android:layout_width="0dp"
android:layout_height="40dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/btnConfirm"
app:layout_constraintStart_toEndOf="@+id/userGold" />
<TextView
android:id="@+id/btnConfirm"
android:layout_width="190dp"
android:layout_height="47dp"
android:layout_marginTop="9.5dp"
android:background="@drawable/ic_lucky_bag_confirm"
android:gravity="center"
android:text="@string/_ver_24_Send_Gift_Lucky_Bag"
android:textColor="#292601"
android:textSize="15sp"
app:dt_drawableType="shape"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/bottomSpace"
app:layout_constraintTop_toBottomOf="@+id/redBagDesc" />
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- 更多按钮-->
<ImageView
android:id="@+id/btnBill"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginEnd="3dp"
android:paddingTop="3dp"
android:src="@drawable/ic_lucky_bag_bili"
app:layout_constraintEnd_toStartOf="@id/btnMore"
app:layout_constraintTop_toBottomOf="@id/topLayout" />
<ImageView
android:id="@+id/btnMore"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginEnd="15dp"
android:src="@drawable/ic_lucky_bag_rule"
android:paddingTop="3dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.chwl.library.widget.text.DrawableTextView
android:id="@+id/userGold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="22dp"
android:drawablePadding="4dp"
android:gravity="center_vertical"
android:text="0000"
android:textColor="@color/color_FFEA5C"
android:textSize="15sp"
android:textStyle="bold"
app:dt_drawableLeftHeight="21dp"
app:dt_drawableLeftSrc="@drawable/ic_coin_84"
app:dt_drawableLeftWidth="21dp"
app:dt_drawableRightHeight="17dp"
app:dt_drawableRightSrc="@drawable/ic_lucky_bag_add"
app:dt_drawableRightWidth="17dp"
app:dt_drawableType="shape"
app:layout_constraintEnd_toStartOf="@id/bottomSpace"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/redBagDesc" />
<androidx.legacy.widget.Space
android:id="@+id/bottomSpace"
android:layout_width="0dp"
android:layout_height="40dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/btnConfirm"
app:layout_constraintStart_toEndOf="@+id/userGold" />
<TextView
android:id="@+id/btnConfirm"
android:layout_width="190dp"
android:layout_height="47dp"
android:layout_marginTop="9.5dp"
android:background="@drawable/ic_lucky_bag_confirm"
android:gravity="center"
android:text="@string/_ver_24_Send_Gift_Lucky_Bag"
android:textColor="#292601"
android:textSize="15sp"
app:dt_drawableType="shape"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/bottomSpace"
app:layout_constraintTop_toBottomOf="@+id/redBagDesc" />
app:layout_constraintTop_toBottomOf="@id/topLayout" />
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- 更多按钮-->
<ImageView
android:id="@+id/btnMore"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginEnd="3dp"
android:paddingTop="3dp"
android:src="@drawable/ic_lucky_bag_bili"
app:layout_constraintEnd_toStartOf="@id/btnBill"
app:layout_constraintTop_toBottomOf="@id/topLayout" />
</LinearLayout>
<ImageView
android:id="@+id/btnBill"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginEnd="15dp"
android:src="@drawable/ic_lucky_bag_rule"
android:paddingTop="3dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/topLayout" />
<RelativeLayout
android:id="@+id/input_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:visibility="visible"
android:visibility="gone">
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:paddingHorizontal="15dp"
android:background="@color/color_F4F4F4"
android:gravity="center_vertical"
android:orientation="horizontal">
</LinearLayout>
<EditText
android:id="@+id/input_edit"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/shape_white_20dp_round"
android:hint="@string/room_say_here"
android:paddingStart="10dp"
android:paddingTop="10dp"
android:maxLength="2"
android:inputType="number"
android:paddingEnd="0dp"
android:paddingBottom="10dp"
android:textColor="#313131"
android:textColorHint="#afb1b3"
android:textSize="12sp" />
<TextView
android:id="@+id/input_send"
android:layout_width="wrap_content"
android:layout_height="34dp"
android:textColor="@color/white"
android:gravity="center"
android:paddingHorizontal="25dp"
android:text="@string/ok"
android:layout_marginStart="10dp"
android:background="@drawable/base_selector_theme_30dp" />
</LinearLayout>
</RelativeLayout>
</FrameLayout>

View File

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="485dp"
android:layout_gravity="bottom"
@@ -42,7 +41,7 @@
app:dt_endColor="@color/transparent"
app:dt_radius="17dp"
app:dt_startColor="@color/transparent"
tools:text="@string/send" />
android:text="@string/_ver_24_lucky_bag_bili_received" />
<com.chwl.library.widget.text.DrawableTextView
android:id="@+id/btnSent"
@@ -58,7 +57,7 @@
app:dt_endColor="@color/transparent"
app:dt_radius="17dp"
app:dt_startColor="@color/transparent"
tools:text="@string/send" />
android:text="@string/_ver_24_lucky_bag_bili_sent" />
</LinearLayout>
@@ -89,12 +88,22 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/avatar" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvList"
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id="@+id/srlLayout"
android:layout_marginHorizontal="23dp"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="23dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/nick" />
app:layout_constraintTop_toBottomOf="@+id/nick">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvList"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -129,7 +129,8 @@
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="60:00"
android:text=""
android:visibility="invisible"
android:textColor="#292601"
android:textSize="20sp"
android:textStyle="bold"
@@ -141,7 +142,7 @@
android:id="@+id/viewOthers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="11dp"
android:layout_marginTop="7dp"
android:text="@string/_ver_24_View_Others"
android:textColor="#292601"
android:textSize="12sp"
@@ -157,20 +158,21 @@
android:layout_height="0dp"
android:layout_marginTop="9dp"
tools:listitem="@layout/item_room_lucky_bag_view_others"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="1"
android:orientation="vertical"
android:visibility="gone"
android:layout_marginBottom="30dp"
android:layout_marginHorizontal="40dp"
tools:visibility="visible"
android:layout_marginBottom="47dp"
app:layout_constraintBottom_toTopOf="@id/viewOthersHint"
app:layout_constraintTop_toTopOf="@id/title" />
app:layout_constraintTop_toBottomOf="@id/title" />
<TextView
android:id="@+id/viewOthersHint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="6.5dp"
android:visibility="gone"
tools:visibility="visible"
android:text="@string/_ver_24_View_Others_24"
android:textColor="@color/white_transparent_80"
android:textSize="11sp"

View File

@@ -1,29 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="23dp"
android:layout_marginBottom="14dp">
android:layout_marginBottom="14dp"
tools:background="@color/red_font">
<TextView
android:id="@+id/nick"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="4.5dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="2dp"
android:ellipsize="end"
android:lines="1"
android:textColor="@color/color_FFEA5C"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@id/time"
app:layout_constraintEnd_toStartOf="@id/item"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
tools:text="111" />
<TextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="4.5dp"
android:layout_marginTop="2dp"
android:alpha="0.6"
android:ellipsize="end"
android:lines="1"
android:textColor="@color/color_FFEA5C"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/nick"
app:layout_constraintStart_toStartOf="@id/nick"
app:layout_constraintTop_toBottomOf="@id/nick" />
app:layout_constraintTop_toBottomOf="@id/nick"
tools:text="111" />
<com.chwl.library.widget.text.DrawableTextView
@@ -31,18 +46,23 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="4.5dp"
android:lines="1"
android:textColor="@color/color_FFEA5C"
android:textSize="15sp"
app:dt_drawableRightHeight="17dp"
app:dt_drawableRightSrc="@drawable/transparent_draw"
app:dt_drawableRightWidth="17dp"
app:layout_constraintBottom_toBottomOf="@id/time"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/nick" />
app:layout_constraintTop_toTopOf="@id/nick"
tools:text="111" />
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
app:layout_constraintBottom_toBottomOf="parent" />
android:layout_marginTop="11dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/item" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -86,13 +86,12 @@
app:layout_constraintStart_toStartOf="@id/bgNumber"
app:layout_constraintTop_toTopOf="@id/bgNumber" />
<EditText
<TextView
android:id="@+id/etNum"
android:layout_width="20dp"
android:layout_height="20dp"
android:background="@drawable/bg_black_a30_r4"
android:gravity="center"
android:inputType="number"
android:maxLength="2"
android:text="0"
android:textAlignment="center"

View File

@@ -38,7 +38,7 @@
android:textColor="@color/color_FFEA5C"
android:textSize="13sp"
app:dt_drawableRightHeight="16dp"
app:dt_drawableRightSrc="@drawable/ic_login_next"
app:dt_drawableRightSrc="@drawable/ic_coin_84"
app:dt_drawableRightWidth="16dp"
app:dt_drawableType="shape"
app:layout_constraintEnd_toEndOf="@+id/goldPic"

View File

@@ -44,8 +44,10 @@
android:layout_height="wrap_content"
android:layout_marginStart="7dp"
android:layout_marginEnd="8dp"
android:ellipsize="end"
android:lines="1"
android:layout_marginBottom="4dp"
android:text="loading..."
tools:text="loadingloadingloadingloadingloadingloadingloadingloadingloadingloadingloading"
android:textColor="#292601"
android:textSize="14sp"
android:textStyle="bold"
@@ -57,21 +59,28 @@
<TextView
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="@+id/name"
android:layout_marginTop="4dp"
android:text="loading..."
android:textColor="#CC292601"
android:lines="1"
app:layout_constraintBottom_toBottomOf="@+id/avatar"
app:layout_constraintStart_toStartOf="@id/name"
app:layout_constraintTop_toBottomOf="@id/name" />
<TextView
<com.chwl.library.widget.text.DrawableTextView
android:id="@+id/giftInfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/loading"
android:textColor="#292601"
android:drawablePadding="4dp"
app:dt_drawableType="shape"
app:dt_drawableRightWidth="17dp"
app:dt_drawableRightHeight="17dp"
app:dt_drawableRightSrc="@drawable/transparent_draw"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/name"

View File

@@ -2,14 +2,15 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ic_lucky_bag_msg_gift_bg">
android:layout_height="wrap_content">
<ImageView
android:id="@+id/bg"
android:layout_width="match_parent"
android:minHeight="90dp"
android:scaleType="fitXY"
android:src="@drawable/ic_lucky_bag_msg_gift_bg"
android:layout_height="match_parent" />
<com.chwl.core.widget.img.MyCircleImageView
@@ -46,9 +47,17 @@
android:layout_marginTop="6dp"
android:paddingBottom="13dp"
android:text="@string/loading"
android:lines="2"
android:textColor="@color/color_FFEA5C"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@id/avatar" />
<TextView
android:id="@+id/tv_content"
android:alpha="0"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -35,6 +35,8 @@
android:textSize="12sp"
app:dt_drawableType="shape"
app:dt_endColor="#e55f00"
android:visibility="gone"
tools:visibility="visible"
app:dt_radius="115dp"
app:dt_startColor="#cd1700"
app:dt_strikeColor="#fff2ca"

View File

@@ -3,8 +3,14 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="100dp"
android:id="@+id/rootBg"
android:background="@drawable/ic_lucky_bag_room_notify_gift_bg">
<androidx.legacy.widget.Space
app:layout_constraintTop_toTopOf="parent"
android:layout_width="match_parent"
android:layout_height="100dp"/>
<ImageView
android:id="@+id/avatar"
android:layout_width="36dp"
@@ -34,6 +40,8 @@
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:text="@string/loading"
android:lines="1"
android:ellipsize="end"
android:textColor="#ffea5c"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@id/avatar"
@@ -49,4 +57,13 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/nick" />
<View
android:id="@+id/clickView"
app:layout_constraintStart_toStartOf="@id/avatar"
app:layout_constraintEnd_toEndOf="@id/btnGo"
app:layout_constraintTop_toTopOf="@id/avatar"
app:layout_constraintBottom_toBottomOf="@id/avatar"
android:layout_width="0dp"
android:layout_height="0dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -5429,6 +5429,18 @@ You cannot join again within 24 hours after leaving</string>
<string name="_ver_24_Lucky_Bag_Numbers">Lucky Bag Numbers</string>
<string name="_ver_24_Total_spend_s_coins">Total spend %s coins</string>
<string name="_ver_24_Modify">Modify</string>
<string name="_ver_24_lucky_bag_room_notify">幸运礼包飘屏 %s</string>
<string name="_ver_24_lucky_bag_room_msg">幸运礼包公屏消息 %s</string>
<string name="_ver_24_lucky_bag_bili_received">幸运礼包-收</string>
<string name="_ver_24_lucky_bag_bili_sent">幸运礼包-送</string>
<string name="_ver_24_Coin_Lucky_Bag_Bili">金币礼包</string>
<string name="_ver_24_Gift_Lucky_Bag_Bili">礼物礼包</string>
<string name="_ver_24_Mins_s">Mins%s</string>
<!-- <string name="_ver_23_">xxxx</string>-->
<!-- <string name="_ver_23_">xxxx</string>-->
<!-- <string name="_ver_23_">xxxx</string>-->

View File

@@ -7,6 +7,8 @@ public class LuckyBagGift {
public String giftName;
public String giftPic;
public int giftPrice;
public long giftId;
public int count;
public boolean isReView;
public boolean isSelect;
}

View File

@@ -1,9 +1,12 @@
package com.chwl.core.gift.bean;
public class LuckyBagViewOthers {
public long uid;
public String avatar;
public String nick;
public long time;
public String timeStr;
public String giftName;
public int giftNum;
public int goldNum;
}

View File

@@ -21,7 +21,7 @@ public class HomeTabMapInfo implements MultiItemEntity, Serializable {
*/
private int onlineNum;
private int roomUid;
private long roomUid;
private String title;
private String avatar;
private int seq;
@@ -55,11 +55,11 @@ public class HomeTabMapInfo implements MultiItemEntity, Serializable {
this.onlineNum = onlineNum;
}
public int getRoomUid() {
public long getRoomUid() {
return roomUid;
}
public void setRoomUid(int roomUid) {
public void setRoomUid(long roomUid) {
this.roomUid = roomUid;
}

View File

@@ -401,6 +401,9 @@ public class CustomAttachParser implements MsgAttachmentParser {
case CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_MSG:
attachment = new RedPackageRoomMsgAttachment(second);
break;
case CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_LUCKY_BAG:
attachment = new RedPackageLuckyBagAttachment();
break;
}
break;

View File

@@ -319,6 +319,7 @@ public class CustomAttachment implements MsgAttachment {
public static final int CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ALL_DIAMOND = 604;//全服红包
public static final int CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_MSG = 605;
public static final int CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_DIAMOND2 = 606;//新版本-厅内红包
public static final int CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_LUCKY_BAG = 607;//新版本-幸运礼包
//开福袋飘屏
public static final int CUSTOM_MSG_LUCKY_GIFT = 61;
public static final int CUSTOM_MSG_LUCKY_GIFT_ROOM_NOTIFY = 610;// 福袋礼物房间飘屏通知
@@ -564,8 +565,6 @@ public class CustomAttachment implements MsgAttachment {
//-----房間等级修改消息
public static final int ROOM_LEVEL_CHANGE_FIRST = 114;
public static final int ROOM_LEVEL_CHANGE_SECOND = 1141;
//-----幸运礼包
public static final int ROOM_LUCKY_BAG_FIRST = 1142;
/**

View File

@@ -5,7 +5,7 @@ import lombok.Data;
@Data
public class NotifyH5Info {
private int roomUid;
private long roomUid;
/**
* 飘屏类型 0 房间静态飘屏 1 全服动态飘屏

View File

@@ -0,0 +1,33 @@
package com.chwl.core.im.custom.bean;
import com.alibaba.fastjson.JSONObject;
import com.chwl.core.redpackage.bean.RedPackageLuckyBag;
import com.google.gson.Gson;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* Created by MadisonRong on 17/06/2018.
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class RedPackageLuckyBagAttachment extends CustomAttachment {
public RedPackageLuckyBag redPackageLuckyBag;
public RedPackageLuckyBagAttachment() {
super(CUSTOM_MSG_RED_PACKAGE, CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_LUCKY_BAG);
}
@Override
protected void parseData(JSONObject data) {
redPackageLuckyBag = new Gson().fromJson(data.toJSONString(), RedPackageLuckyBag.class);
}
@Override
protected JSONObject packData() {
String jsonStr = new Gson().toJson(redPackageLuckyBag);
return JSONObject.parseObject(jsonStr);
}
}

View File

@@ -60,6 +60,7 @@ import com.chwl.core.im.custom.bean.MonsterHuntingResultAttachment;
import com.chwl.core.im.custom.bean.MonsterStatusAttachment;
import com.chwl.core.im.custom.bean.MultiGiftAttachment;
import com.chwl.core.im.custom.bean.NobleAttachment;
import com.chwl.core.im.custom.bean.RedPackageLuckyBagAttachment;
import com.chwl.core.im.custom.bean.RoomBgChangeMsgAttachment;
import com.chwl.core.im.custom.bean.RoomBoxPrizeAttachment;
import com.chwl.core.im.custom.bean.RoomFreeGiftAttachment;
@@ -95,6 +96,7 @@ import com.chwl.core.noble.NobleResourceType;
import com.chwl.core.noble.NobleUtil;
import com.chwl.core.noble.bean.NobleInfo;
import com.chwl.core.public_chat_hall.manager.PublicChatHallDataManager;
import com.chwl.core.redpackage.bean.RedPackageLuckyBag;
import com.chwl.core.retry.ImRetryManager;
import com.chwl.core.retry.ReconnectListener;
import com.chwl.core.retry.RetryChatRoomMessage;
@@ -837,10 +839,10 @@ public final class IMNetEaseManager {
if (!giftReceiveInfo.isRoomAlbum() && giftInfo.getGiftType() != GiftType.GIFT_TYPE_SUPER_LUCKY) {
addMessages(msg);
}
}if (customAttachment.getSecond() == CUSTOM_MSG_SUB_TYPE_SEND_ALL_SERVICE_GIFT) { // 35-全服礼物
}else if (customAttachment.getSecond() == CUSTOM_MSG_SUB_TYPE_SEND_ALL_SERVICE_GIFT) { // 35-全服礼物
messages.add(msg);
gift = true;
}if (customAttachment.getSecond() == CUSTOM_MSG_ALL_SERVICE_GIFT) { //32-全服礼物飘屏
}else if (customAttachment.getSecond() == CUSTOM_MSG_ALL_SERVICE_GIFT) { //32-全服礼物飘屏
messages.add(msg);
gift = true;
} else if (customAttachment.getSecond() == CustomAttachment.CUSTOM_MSG_SUB_TYPE_SEND_LUCKY_GIFT) {
@@ -1231,6 +1233,17 @@ public final class IMNetEaseManager {
case CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_DIAMOND2:
noticeRoomEvent(msg, RoomEvent.RECEIVE_RED_PACKAGE);
break;
case CUSTOM_MSG_SUB_RED_PACKAGE_RECEIVE_ROOM_LUCKY_BAG:
if (attachment instanceof RedPackageLuckyBagAttachment) {
RedPackageLuckyBag redPackageLuckyBag = ((RedPackageLuckyBagAttachment) attachment).getRedPackageLuckyBag();
if (redPackageLuckyBag != null) {
noticeRoomEvent(msg, RoomEvent.MSG_ROOM_LUCKY_BAG_ADD);
if (redPackageLuckyBag.getRoomUid() == AvRoomDataManager.get().getRoomUid()) {
addMessages(msg);
}
}
}
break;
}
break;

View File

@@ -295,6 +295,12 @@ public class RoomEvent {
public static final int RECEIVE_NORMALE_GIFT_ALL_SERVICE = 118;
public static final int RECEIVE_NORMALE_GIFT_ALL_SERVICE_NOTIFY = 120; //全服飘屏
/**
* 收到 幸运礼包
*/
public static final int MSG_ROOM_LUCKY_BAG_ADD = 121;
private int event = NONE;
private int micPosition = Integer.MIN_VALUE;
private int posState = -1;

View File

@@ -0,0 +1,15 @@
package com.chwl.core.redpackage.bean;
import lombok.Data;
@Data
public class RedPackageLuckyBag {
public long roomUid;
public long redEnvelopeId ;
public int redEnvelopeNum ;
public String redEnvelopeType ;
public String sendUserAvatar;
public String sendUserNick;
public long beginTime;
}

View File

@@ -46,4 +46,8 @@ public class GameInfo {
return code.equals("BAISHUN");
}
public boolean isLuckyBag() {
return code.equals("LUCKY_BAG");
}
}

View File

@@ -144,6 +144,13 @@ fun String?.doToast() {
ToastUtils.show(this)
}
}
fun String?.doToastDeBug() {
if (BuildConfig.DEBUG) {
if (this.isVerify()) {
ToastUtils.show(this)
}
}
}
fun String?.doLog() {
if (BuildConfig.DEBUG) {
if (this.isVerify()) {
@@ -193,6 +200,22 @@ fun List<Any>?.isVerify() : Boolean{
return this?.isEmpty() == false
}
fun<D> List<D>?.isVerify(pos:Int,run:(data:D)->Unit = {}) : D? {
return if (this.isNullOrEmpty()) {
null
} else {
if (pos >= 0 && pos < this.size) {
val d = this[pos]
if (d != null) {
run(d)
}
d
} else {
null
}
}
}
fun Int.isVerify(list : List<Any>?) : Boolean{
if (list.isVerify()) {
if (list!!.getOrNull(this) != null) {

420
mode.json
View File

@@ -3,113 +3,351 @@
"message": "success",
"data": [
{
"bannerId": 55,
"bannerName": "每日消费",
"bannerPic": "https://image.pekolive.com/banner .png",
"id": 109,
"code": "BAISHUN",
"name": "Greedy",
"icon": "https://image.molistar.xyz/greedy.png",
"type": 3,
"skipType": 3,
"skipUri": "http://beta.api.molistar.xyz/molistar/modules/dailyConsumption/index.html",
"androidVersion": "1.0.0",
"iosVersion": "1.0.0",
"platform": "all",
"skipUrl": "http://beta.api.molistar.xyz/molistar/modules/dailyConsumption/index.html",
"showType": 1
"skipContent": "https://game-center-test.jieyou.shop/game-packages/common-web/greedy/1.2.3/web-mobile/index.html",
"isEnabled": 1,
"isManual": 1,
"seqNo": 0,
"ruleValue": "{\"PLATFORM\":\"\",\"IOS_LOW_VERSION\":\"\",\"ANDROID_LOW_VERSION\":\"\",\"RESERVE\":\"{\\\"appChannel\\\":\\\"molistar\\\",\\\"appId\\\":9498014797,\\\"code\\\":\\\"ac868010-b9d2-4c0c-a334-f70a4311f496\\\",\\\"gameConfig\\\":{\\\"currencyIcon\\\":\\\"https://image.molistar.xyz/ic_gold.png\\\",\\\"sceneMode\\\":1},\\\"gameMode\\\":\\\"2\\\",\\\"gsp\\\":101}\",\"NOT_CHANNELS\":\"\",\"ANDROID_HIGH_VERSION\":\"\",\"IOS_HIGH_VERSION\":\"\"}",
"showType": 2,
"createTime": "2024-04-30 17:45:50",
"updateTime": "2024-07-29 17:26:56",
"partitionId": 2
},
{
"bannerId": 48,
"bannerName": "月充值",
"bannerPic": "https://image.pekolive.com/banner.png",
"id": 110,
"code": "BAISHUN",
"name": "MagicSlot",
"icon": "https://image.pekolive.com/108c11cb9c637ea8711d25d1a9ca1500.png",
"url": null,
"type": 3,
"skipType": 3,
"skipUri": "http://beta.api.molistar.xyz/molistar/activity/rechargeNew/index.html",
"androidVersion": "1.0.0",
"iosVersion": "1.0.0",
"platform": "all",
"skipUrl": "http://beta.api.molistar.xyz/molistar/activity/rechargeNew/index.html",
"showType": 1
"skipContent": "https://game-center-test.jieyou.shop/game-packages/common-web/magicslot/1.0.6/web-mobile/index.html",
"isEnabled": 1,
"isManual": 0,
"startTime": "2024-06-04 00:00:00",
"seqNo": 0,
"ruleValue": "{\"PLATFORM\":\"\",\"IOS_LOW_VERSION\":\"\",\"ANDROID_LOW_VERSION\":\"\",\"USER_PHONE\":\"\",\"RESERVE\":\"{\\\"appChannel\\\":\\\"molistar\\\",\\\"appId\\\":9498014797,\\\"code\\\":\\\"ecbb0770-e5a2-495c-bfb5-fa1c7ca0c56b\\\",\\\"gameConfig\\\":{\\\"currencyIcon\\\":\\\"https://image.molistar.xyz/ic_gold.png\\\",\\\"sceneMode\\\":1},\\\"gameMode\\\":\\\"3\\\",\\\"gsp\\\":101}\",\"NOT_CHANNELS\":\"\",\"ANDROID_HIGH_VERSION\":\"\",\"IOS_HIGH_VERSION\":\"\",\"USER_LEVEL\":\"\"}",
"showType": 2,
"createTime": "2024-06-05 16:16:59",
"updateTime": "2024-07-29 17:27:04",
"partitionId": 2
},
{
"bannerId": 50,
"bannerName": "周星榜",
"bannerPic": "https://image.pekolive.com/zhouxing-banner-ar.svga",
"skipType": 5,
"skipUri": "http://beta.api.molistar.xyz/molistar/modules/weekStar/newWeekStar.html",
"androidVersion": "1.0.0",
"iosVersion": "1.0.0",
"platform": "all",
"skipUrl": "http://beta.api.molistar.xyz/molistar/modules/weekStar/newWeekStar.html",
"showType": 1
},
{
"bannerId": 52,
"bannerName": "靓号活动",
"bannerPic": "https://image.pekolive.com/sid.png",
"id": 111,
"code": "BAISHUN",
"name": "HorseRacing2",
"icon": "https://image.pekolive.com/1feaee88d1ab0fc91df72951f2454164.png",
"url": null,
"type": 3,
"skipType": 3,
"skipUri": "http://beta.api.molistar.xyz/molistar/modules/superId/index.html",
"androidVersion": "1.0.0",
"iosVersion": "1.0.0",
"platform": "all",
"skipUrl": "http://beta.api.molistar.xyz/molistar/modules/superId/index.html",
"showType": 1
"skipContent": "https://game-center-test.jieyou.shop/game-packages/common-web/horseracing2/1.1.1/web-mobile/index.html",
"isEnabled": 1,
"isManual": 1,
"seqNo": 0,
"ruleValue": "{\"PLATFORM\":\"\",\"IOS_LOW_VERSION\":\"\",\"ANDROID_LOW_VERSION\":\"\",\"USER_PHONE\":\"\",\"RESERVE\":\"{\\\"appChannel\\\":\\\"molistar\\\",\\\"appId\\\":9498014797,\\\"code\\\":\\\"65f0bce3-56a9-4fb7-a2c5-af297be80d27\\\",\\\"gameConfig\\\":{\\\"currencyIcon\\\":\\\"https://image.molistar.xyz/ic_gold.png\\\",\\\"sceneMode\\\":1},\\\"gameMode\\\":\\\"2\\\",\\\"gsp\\\":101}\",\"NOT_CHANNELS\":\"\",\"ANDROID_HIGH_VERSION\":\"\",\"IOS_HIGH_VERSION\":\"\",\"USER_LEVEL\":\"\"}",
"showType": 1,
"createTime": "2024-06-05 16:20:47",
"updateTime": "2024-07-29 15:35:59",
"partitionId": 2
},
{
"bannerId": 59,
"bannerName": "定制活动",
"bannerPic": "https://image.pekolive.com/dingzhi-banner-ar.svga",
"skipType": 6,
"skipUri": "http://beta.api.molistar.xyz/molistar/activity/customizedGift/index.html",
"androidVersion": "1",
"iosVersion": "1",
"platform": "all",
"skipUrl": "http://beta.api.molistar.xyz/molistar/activity/customizedGift/index.html",
"showType": 1
},
{
"bannerId": 62,
"bannerName": "元旦",
"bannerPic": "https://image.pekolive.com/yuand-yingyu.png",
"id": 112,
"code": "BAISHUN",
"name": "UEFAClubs",
"icon": "https://image.pekolive.com/77EAFA55-ACD5-4466-826C-85455FBFF6EB.png",
"url": null,
"type": 3,
"skipType": 3,
"skipUri": "http://beta.api.molistar.xyz/molistar/activity/2024-newYear/index.html",
"androidVersion": "1",
"iosVersion": "1",
"platform": "all",
"skipUrl": "http://beta.api.molistar.xyz/molistar/activity/2024-newYear/index.html",
"showType": 1
"skipContent": "https://game-center-test.jieyou.shop/game-packages/common-web/uefa-clubs/1.0.1/web-mobile/index.html",
"isEnabled": 1,
"isManual": 1,
"seqNo": 0,
"ruleValue": "{\"PLATFORM\":\"\",\"IOS_LOW_VERSION\":\"\",\"ANDROID_LOW_VERSION\":\"\",\"USER_PHONE\":\"\",\"RESERVE\":\"{\\\"appChannel\\\":\\\"molistar\\\",\\\"appId\\\":9498014797,\\\"code\\\":\\\"b510a113-ec1f-4669-8713-6ab70b55e995\\\",\\\"gameConfig\\\":{\\\"currencyIcon\\\":\\\"https://image.molistar.xyz/ic_gold.png\\\",\\\"sceneMode\\\":1},\\\"gameMode\\\":\\\"3\\\",\\\"gsp\\\":101}\",\"NOT_CHANNELS\":\"\",\"ANDROID_HIGH_VERSION\":\"\",\"IOS_HIGH_VERSION\":\"\",\"USER_LEVEL\":\"\"}",
"showType": 1,
"createTime": "2024-06-19 14:53:43",
"updateTime": "2024-08-08 17:01:05",
"partitionId": 2
},
{
"bannerId": 64,
"bannerName": "CP活动",
"bannerPic": "https://image.pekolive.com/cp-banner-ar.svga",
"skipType": 4,
"skipUri": "http://beta.api.molistar.xyz/molistar/activity/2024-cpActive/index.html",
"androidVersion": "1",
"iosVersion": "1",
"platform": "all",
"skipUrl": "http://beta.api.molistar.xyz/molistar/activity/2024-cpActive/index.html",
"showType": 1
},
{
"bannerId": 65,
"bannerName": "年度",
"bannerPic": "https://image.pekolive.com/niandu-ar.png",
"id": 114,
"code": "BAISHUN",
"name": "Crash",
"icon": "https://image.pekolive.com/e98a03b089fabe5e6099efa3cbd9bdc8.png",
"url": null,
"type": 3,
"skipType": 3,
"skipUri": "http://beta.api.molistar.xyz/molistar/activity/annualReport/index.html",
"androidVersion": "1",
"iosVersion": "1",
"platform": "all",
"skipUrl": "http://beta.api.molistar.xyz/molistar/activity/annualReport/index.html",
"showType": 1
"skipContent": "https://game-center-test.jieyou.shop/game-packages/common-web/rocket/1.1.8/web-mobile/index.html",
"isEnabled": 1,
"isManual": 1,
"seqNo": 0,
"ruleValue": "{\"PLATFORM\":\"\",\"IOS_LOW_VERSION\":\"\",\"ANDROID_LOW_VERSION\":\"\",\"USER_PHONE\":\"\",\"RESERVE\":\"{\\\"appChannel\\\":\\\"molistar\\\",\\\"appId\\\":9498014797,\\\"code\\\":\\\"cc4910ab-842b-4dda-977d-c698298ddcf9\\\",\\\"gameConfig\\\":{\\\"currencyIcon\\\":\\\"https://image.molistar.xyz/ic_gold.png\\\",\\\"sceneMode\\\":1},\\\"gameMode\\\":\\\"2\\\",\\\"gsp\\\":101}\",\"NOT_CHANNELS\":\"\",\"ANDROID_HIGH_VERSION\":\"\",\"IOS_HIGH_VERSION\":\"\",\"USER_LEVEL\":\"\"}",
"showType": 1,
"createTime": "2024-07-03 14:55:20",
"updateTime": "2024-11-12 13:50:32",
"partitionId": 2
},
{
"bannerId": 66,
"bannerName": "lucky1122",
"bannerPic": "https://image.pekolive.com/lucky-ar.png",
"id": 116,
"code": "BAISHUN",
"name": "PyramidSlots",
"icon": "https://image.pekolive.com/5496902cbd0bf0a84e27e804140f12df.png",
"url": null,
"type": 3,
"skipType": 3,
"skipUri": "http://beta.api.molistar.xyz/molistar/modules/superLucky/index.html",
"androidVersion": "1",
"iosVersion": "1",
"platform": "all",
"skipUrl": "http://beta.api.molistar.xyz/molistar/modules/superLucky/index.html",
"showType": 1
"skipContent": "https://game-center-test.jieyou.shop/game-packages/common-web/sphinx/1.6.3/web-mobile/index.html",
"isEnabled": 1,
"isManual": 1,
"seqNo": 0,
"ruleValue": "{\"PLATFORM\":\"\",\"IOS_LOW_VERSION\":\"\",\"ANDROID_LOW_VERSION\":\"\",\"USER_PHONE\":\"\",\"RESERVE\":\"{\\\"appChannel\\\":\\\"molistar\\\",\\\"appId\\\":9498014797,\\\"code\\\":\\\"c252ecde-0d83-4999-90a1-9c0234bb25e0\\\",\\\"gameConfig\\\":{\\\"currencyIcon\\\":\\\"https://image.molistar.xyz/ic_gold.png\\\",\\\"sceneMode\\\":1},\\\"gameMode\\\":\\\"3\\\",\\\"gsp\\\":101}\",\"NOT_CHANNELS\":\"\",\"ANDROID_HIGH_VERSION\":\"\",\"IOS_HIGH_VERSION\":\"\",\"USER_LEVEL\":\"\"}",
"showType": 1,
"createTime": "2024-07-03 14:57:40",
"updateTime": "2024-07-29 17:27:44",
"partitionId": 2
},
{
"id": 117,
"code": "BAISHUN",
"name": "GreedyPro",
"icon": "https://image.pekolive.com/7734ac0b8c25f8d6bf2918f7ca16867b.png",
"url": null,
"type": 3,
"skipType": 3,
"skipContent": "https://game-center-test.jieyou.shop/game-packages/common-web/greedypro/1.2.1/web-mobile/index.html",
"isEnabled": 1,
"isManual": 1,
"seqNo": 0,
"ruleValue": "{\"PLATFORM\":\"\",\"IOS_LOW_VERSION\":\"\",\"ANDROID_LOW_VERSION\":\"\",\"USER_PHONE\":\"\",\"RESERVE\":\"{\\\"appChannel\\\":\\\"molistar\\\",\\\"appId\\\":9498014797,\\\"code\\\":\\\"1e738fea-13b9-48e1-bbfd-44f4f7e8f1d7\\\",\\\"gameConfig\\\":{\\\"currencyIcon\\\":\\\"https://image.molistar.xyz/ic_gold.png\\\",\\\"sceneMode\\\":1},\\\"gameMode\\\":\\\"2\\\",\\\"gsp\\\":101}\",\"NOT_CHANNELS\":\"\",\"ANDROID_HIGH_VERSION\":\"\",\"IOS_HIGH_VERSION\":\"\",\"USER_LEVEL\":\"\"}",
"showType": 1,
"createTime": "2024-07-03 14:58:41",
"updateTime": "2024-07-29 17:28:00",
"partitionId": 2
},
{
"id": 118,
"code": "BAISHUN",
"name": "Roulette",
"icon": "https://image.pekolive.com/f59abcd97c04325c80996b27138f5277.png",
"url": null,
"type": 3,
"skipType": 3,
"skipContent": "https://game-center-test.jieyou.shop/game-packages/common-web/roulette/1.1.9/web-mobile/index.html",
"isEnabled": 1,
"isManual": 1,
"seqNo": 0,
"ruleValue": "{\"PLATFORM\":\"\",\"IOS_LOW_VERSION\":\"\",\"ANDROID_LOW_VERSION\":\"\",\"USER_PHONE\":\"\",\"RESERVE\":\"{\\\"appChannel\\\":\\\"molistar\\\",\\\"appId\\\":9498014797,\\\"code\\\":\\\"f15fd548-b5ab-45ed-ad90-02494846f63b\\\",\\\"gameConfig\\\":{\\\"currencyIcon\\\":\\\"https://image.molistar.xyz/ic_gold.png\\\",\\\"sceneMode\\\":1},\\\"gameMode\\\":\\\"2\\\",\\\"gsp\\\":101}\",\"NOT_CHANNELS\":\"\",\"ANDROID_HIGH_VERSION\":\"\",\"IOS_HIGH_VERSION\":\"\",\"USER_LEVEL\":\"\"}",
"showType": 1,
"createTime": "2024-07-03 15:00:35",
"updateTime": "2024-07-29 17:27:52",
"partitionId": 2
},
{
"id": 119,
"code": "BAISHUN",
"name": "Lucky77",
"icon": "https://image.pekolive.com/Lucky77.png",
"url": null,
"type": 3,
"skipType": 3,
"skipContent": "https://game-center-test.jieyou.shop/game-packages/common-web/fruitroulette/1.1.5/web-mobile/index.html",
"isEnabled": 1,
"isManual": 1,
"seqNo": 0,
"ruleValue": "{\"PLATFORM\":\"\",\"IOS_LOW_VERSION\":\"\",\"ANDROID_LOW_VERSION\":\"\",\"USER_PHONE\":\"\",\"RESERVE\":\"{\\\"appChannel\\\":\\\"molistar\\\",\\\"appId\\\":9498014797,\\\"code\\\":\\\"d6f6a307-4607-4b06-9282-55c7659675bf\\\",\\\"gameConfig\\\":{\\\"currencyIcon\\\":\\\"https://image.molistar.xyz/ic_gold.png\\\",\\\"sceneMode\\\":1},\\\"gameMode\\\":\\\"2\\\",\\\"gsp\\\":301}\",\"NOT_CHANNELS\":\"\",\"ANDROID_HIGH_VERSION\":\"\",\"IOS_HIGH_VERSION\":\"\",\"USER_LEVEL\":\"\"}",
"showType": 2,
"createTime": "2024-07-29 15:13:36",
"updateTime": "2024-07-29 17:07:38",
"partitionId": 2
},
{
"id": 120,
"code": "BAISHUN",
"name": "DragonTiger",
"icon": "https://image.pekolive.com/DragonTiger.png",
"url": null,
"type": 3,
"skipType": 3,
"skipContent": "https://game-center-test.jieyou.shop/game-packages/common-web/dragon-tiger/1.0.3/web-mobile/index.html",
"isEnabled": 1,
"isManual": 1,
"seqNo": 0,
"ruleValue": "{\"PLATFORM\":\"\",\"IOS_LOW_VERSION\":\"\",\"ANDROID_LOW_VERSION\":\"\",\"USER_PHONE\":\"\",\"RESERVE\":\"{\\\"appChannel\\\":\\\"molistar\\\",\\\"appId\\\":9498014797,\\\"code\\\":\\\"f6db6ca3-5bb3-4d04-a09a-529ddf514025\\\",\\\"gameConfig\\\":{\\\"currencyIcon\\\":\\\"https://image.molistar.xyz/ic_gold.png\\\",\\\"sceneMode\\\":1},\\\"gameMode\\\":\\\"2\\\",\\\"gsp\\\":101}\",\"NOT_CHANNELS\":\"\",\"ANDROID_HIGH_VERSION\":\"\",\"IOS_HIGH_VERSION\":\"\",\"USER_LEVEL\":\"\"}",
"showType": 2,
"createTime": "2024-07-29 15:14:21",
"updateTime": "2024-07-29 16:09:39",
"partitionId": 2
},
{
"id": 161,
"code": "LEADERCC",
"name": "Fruit",
"icon": "https://image.pekolive.com/speepyturntable2.png",
"url": null,
"type": 3,
"skipType": 3,
"skipContent": "https://gztest.leadercc.com/molistar_games/fruit_party_medium/index.html?pl=molistar",
"isEnabled": 1,
"isManual": 1,
"seqNo": 0,
"ruleValue": "{\"PLATFORM\":\"\",\"IOS_LOW_VERSION\":\"\",\"ANDROID_LOW_VERSION\":\"\",\"USER_PHONE\":\"是\",\"RESERVE\":\"{\\\"appChannel\\\":\\\"molistar\\\",\\\"appId\\\":123456,\\\"code\\\":\\\"ef75a0e4-aef8-4117-9da7-8f27a81bbf84\\\"}\",\"NOT_CHANNELS\":\"\",\"ANDROID_HIGH_VERSION\":\"\",\"IOS_HIGH_VERSION\":\"\",\"USER_LEVEL\":\"\"}",
"showType": 2,
"createTime": "2024-11-29 15:01:36",
"updateTime": "2024-11-29 15:05:10",
"partitionId": 2
},
{
"id": 162,
"code": "LEADERCC",
"name": "Beer Wheel",
"icon": "https://image.pekolive.com/birthdaycake123.png",
"url": null,
"type": 3,
"skipType": 3,
"skipContent": "https://gztest.leadercc.com/molistar_games/wheel5_medium/index.html?pl=molistar",
"isEnabled": 1,
"isManual": 1,
"seqNo": 0,
"ruleValue": "{\"PLATFORM\":\"\",\"IOS_LOW_VERSION\":\"\",\"ANDROID_LOW_VERSION\":\"\",\"USER_PHONE\":\"是\",\"RESERVE\":\"{\\\"appChannel\\\":\\\"molistar\\\",\\\"appId\\\":123456,\\\"code\\\":\\\"ef75a0e4-aef8-4117-9da7-8f27a81bbf84\\\"}\",\"NOT_CHANNELS\":\"\",\"ANDROID_HIGH_VERSION\":\"\",\"IOS_HIGH_VERSION\":\"\",\"USER_LEVEL\":\"\"}",
"showType": 2,
"createTime": "2024-12-25 14:56:53",
"updateTime": "2024-12-25 15:02:57",
"partitionId": 2
},
{
"id": 163,
"code": "LEADERCC",
"name": "Rocket Flying",
"icon": "https://image.pekolive.com/Dr.ooocustom.png",
"url": null,
"type": 3,
"skipType": 3,
"skipContent": "https://gztest.leadercc.com/molistar_games/crash_medium/index.html?pl=molistar",
"isEnabled": 1,
"isManual": 1,
"seqNo": 0,
"ruleValue": "{\"PLATFORM\":\"\",\"IOS_LOW_VERSION\":\"\",\"ANDROID_LOW_VERSION\":\"\",\"USER_PHONE\":\"是\",\"RESERVE\":\"{\\\"appChannel\\\":\\\"molistar\\\",\\\"appId\\\":123456,\\\"code\\\":\\\"ef75a0e4-aef8-4117-9da7-8f27a81bbf84\\\"}\",\"NOT_CHANNELS\":\"\",\"ANDROID_HIGH_VERSION\":\"\",\"IOS_HIGH_VERSION\":\"\",\"USER_LEVEL\":\"\"}",
"showType": 2,
"createTime": "2024-12-30 13:48:42",
"updateTime": "2024-12-30 13:52:26",
"partitionId": 2
},
{
"id": 164,
"code": "LEADERCC",
"name": "Lucky 77",
"icon": "https://image.pekolive.com/ALZAEIMiV.png",
"url": null,
"type": 3,
"skipType": 3,
"skipContent": "https://gztest.leadercc.com/molistar_games/luck77_2_medium/index.html?pl=molistar",
"isEnabled": 1,
"isManual": 1,
"seqNo": 0,
"ruleValue": "{\"PLATFORM\":\"\",\"IOS_LOW_VERSION\":\"\",\"ANDROID_LOW_VERSION\":\"\",\"USER_PHONE\":\"是\",\"RESERVE\":\"{\\\"appChannel\\\":\\\"molistar\\\",\\\"appId\\\":123456,\\\"code\\\":\\\"ef75a0e4-aef8-4117-9da7-8f27a81bbf84\\\"}\",\"NOT_CHANNELS\":\"\",\"ANDROID_HIGH_VERSION\":\"\",\"IOS_HIGH_VERSION\":\"\",\"USER_LEVEL\":\"\"}",
"showType": 2,
"createTime": "2024-12-30 13:49:36",
"updateTime": "2024-12-30 13:52:27",
"partitionId": 2
},
{
"id": 165,
"code": "LEADERCC",
"name": "Dragon and Tiger",
"icon": "https://image.pekolive.com/IbnAl-SheikhII.png",
"url": null,
"type": 3,
"skipType": 3,
"skipContent": "https://gztest.leadercc.com/molistar_games/dragon_tiger2_medium/index.html?pl=molistar",
"isEnabled": 1,
"isManual": 1,
"seqNo": 0,
"ruleValue": "{\"PLATFORM\":\"\",\"IOS_LOW_VERSION\":\"\",\"ANDROID_LOW_VERSION\":\"\",\"USER_PHONE\":\"是\",\"RESERVE\":\"{\\\"appChannel\\\":\\\"molistar\\\",\\\"appId\\\":123456,\\\"code\\\":\\\"ef75a0e4-aef8-4117-9da7-8f27a81bbf84\\\"}\",\"NOT_CHANNELS\":\"\",\"ANDROID_HIGH_VERSION\":\"\",\"IOS_HIGH_VERSION\":\"\",\"USER_LEVEL\":\"\"}",
"showType": 2,
"createTime": "2024-12-30 13:50:30",
"updateTime": "2024-12-30 13:52:28",
"partitionId": 2
},
{
"id": 166,
"code": "LEADERCC",
"name": "Turntable",
"icon": "https://image.pekolive.com/ThePharaohs1.png",
"url": null,
"type": 3,
"skipType": 3,
"skipContent": "https://gztest.leadercc.com/molistar_games/zhuanpan2_medium/index.html?pl=molistar",
"isEnabled": 1,
"isManual": 1,
"seqNo": 0,
"ruleValue": "{\"PLATFORM\":\"\",\"IOS_LOW_VERSION\":\"\",\"ANDROID_LOW_VERSION\":\"\",\"USER_PHONE\":\"是\",\"RESERVE\":\"{\\\"appChannel\\\":\\\"molistar\\\",\\\"appId\\\":123456,\\\"code\\\":\\\"ef75a0e4-aef8-4117-9da7-8f27a81bbf84\\\"}\",\"NOT_CHANNELS\":\"\",\"ANDROID_HIGH_VERSION\":\"\",\"IOS_HIGH_VERSION\":\"\",\"USER_LEVEL\":\"\"}",
"showType": 2,
"createTime": "2024-12-30 13:51:23",
"updateTime": "2024-12-30 13:52:29",
"partitionId": 2
},
{
"id": 167,
"code": "LEADERCC",
"name": "Multiplayer Fishing",
"icon": "https://image.pekolive.com/LuckyApple10.png",
"url": null,
"type": 3,
"skipType": 3,
"skipContent": "https://gztest.leadercc.com/molistar_games/fish4_medium/index.html?pl=molistar",
"isEnabled": 1,
"isManual": 1,
"seqNo": 0,
"ruleValue": "{\"PLATFORM\":\"\",\"IOS_LOW_VERSION\":\"\",\"ANDROID_LOW_VERSION\":\"\",\"USER_PHONE\":\"是\",\"RESERVE\":\"{\\\"appChannel\\\":\\\"molistar\\\",\\\"appId\\\":123456,\\\"code\\\":\\\"ef75a0e4-aef8-4117-9da7-8f27a81bbf84\\\"}\",\"NOT_CHANNELS\":\"\",\"ANDROID_HIGH_VERSION\":\"\",\"IOS_HIGH_VERSION\":\"\",\"USER_LEVEL\":\"\"}",
"showType": 2,
"createTime": "2024-12-30 13:52:16",
"updateTime": "2024-12-30 13:52:31",
"partitionId": 2
},
{
"id": 86,
"code": "FIND_LOVE",
"name": "寻爱之旅",
"icon": "https://image.pekolive.com/find_love.png",
"url": null,
"type": 3,
"skipType": 1,
"skipContent": null,
"isEnabled": 1,
"isManual": 1,
"startTime": "2024-02-28 00:00:00",
"endTime": "2025-03-01 00:00:00",
"seqNo": 1,
"ruleValue": "{\"PLATFORM\": \"\", \"USER_LEVEL\": \"1\", \"USER_PHONE\": \"否\", \"NOT_CHANNELS\": \"\", \"IOS_LOW_VERSION\": \"\", \"IOS_HIGH_VERSION\": \"\", \"ANDROID_LOW_VERSION\": \"\", \"ANDROID_HIGH_VERSION\": \"\"}",
"showType": 0,
"createTime": "2024-02-20 14:27:15",
"updateTime": "2024-11-29 18:29:31",
"partitionId": 2
},
{
"id": 138,
"code": "LEADERCC",
"name": "Lucky Wheel",
"icon": "https://image.pekolive.com/luck5y.png",
"url": null,
"type": 3,
"skipType": 3,
"skipContent": "https://gztest.leadercc.com/molistar_games/wheel_medium/index.html?pl=molistar",
"isEnabled": 1,
"isManual": 1,
"startTime": "2024-10-20 00:00:00",
"endTime": "2025-10-30 00:00:00",
"seqNo": 1,
"ruleValue": "{\"PLATFORM\":\"\",\"IOS_LOW_VERSION\":\"\",\"ANDROID_LOW_VERSION\":\"\",\"USER_PHONE\":\"\",\"RESERVE\":\"{\\\"appChannel\\\":\\\"molistar\\\",\\\"appId\\\":123456,\\\"code\\\":\\\"ef75a0e4-aef8-4117-9da7-8f27a81bbf84\\\"}\",\"NOT_CHANNELS\":\"\",\"ANDROID_HIGH_VERSION\":\"\",\"IOS_HIGH_VERSION\":\"\",\"USER_LEVEL\":\"\"}",
"showType": 2,
"createTime": "2024-10-21 15:21:06",
"updateTime": "2024-10-22 16:05:25",
"partitionId": 2
}
],
"timestamp": 1737603645090
"timestamp": 1739265586403
}