贵族迭代:支持钻石开通,首充优惠,贵族排行榜
@@ -1281,6 +1281,10 @@
|
|||||||
android:name=".avroom.wishlist.WishListHistoryActivity"
|
android:name=".avroom.wishlist.WishListHistoryActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".vip.VipRankActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
@@ -61,7 +61,11 @@ class FirstChargeDialog : BaseViewBindingActivity<DialogFirstChargeBinding>() {
|
|||||||
val starter = Intent(context, FirstChargeDialog::class.java)
|
val starter = Intent(context, FirstChargeDialog::class.java)
|
||||||
context.startActivity(starter)
|
context.startActivity(starter)
|
||||||
StatisticManager.Instance()
|
StatisticManager.Instance()
|
||||||
.onEvent(StatisticsProtocol.EVENT_ROOM_POP_CLICK, "房间pop点击", mapOf("name" to "新人充值"))
|
.onEvent(
|
||||||
|
StatisticsProtocol.EVENT_ROOM_POP_CLICK,
|
||||||
|
"房间pop点击",
|
||||||
|
mapOf("name" to "新人充值")
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private const val BIND_CODE_GOLD = 200
|
private const val BIND_CODE_GOLD = 200
|
||||||
@@ -103,7 +107,10 @@ class FirstChargeDialog : BaseViewBindingActivity<DialogFirstChargeBinding>() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
rvDelegate = RVDelegate.Builder<FirstChargeReward>()
|
rvDelegate = RVDelegate.Builder<FirstChargeReward>()
|
||||||
.setAdapter(RewardAdapter().also { rewardAdapter = it })
|
.setAdapter(
|
||||||
|
RewardAdapter((ScreenUtil.screenWidth * 0.66f / 3f).toInt())
|
||||||
|
.also { rewardAdapter = it }
|
||||||
|
)
|
||||||
.setLayoutManager(FlexboxLayoutManager(context).apply {
|
.setLayoutManager(FlexboxLayoutManager(context).apply {
|
||||||
alignItems = AlignItems.STRETCH
|
alignItems = AlignItems.STRETCH
|
||||||
justifyContent = JustifyContent.SPACE_EVENLY
|
justifyContent = JustifyContent.SPACE_EVENLY
|
||||||
|
@@ -10,19 +10,20 @@ import com.mango.moshen.treasure_box.widget.dialog.BaseBindingDialog
|
|||||||
import com.mango.moshen.ui.utils.RVDelegate
|
import com.mango.moshen.ui.utils.RVDelegate
|
||||||
import com.mango.core.pay.bean.FirstChargeReward
|
import com.mango.core.pay.bean.FirstChargeReward
|
||||||
import com.mango.xchat_android_library.annatation.ActLayoutRes
|
import com.mango.xchat_android_library.annatation.ActLayoutRes
|
||||||
|
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||||
|
|
||||||
@ActLayoutRes(R.layout.dialog_first_charge_prize)
|
@ActLayoutRes(R.layout.dialog_first_charge_prize)
|
||||||
class FirstChargePrizeDialog(
|
class FirstChargePrizeDialog(
|
||||||
context: Context,
|
context: Context,
|
||||||
val title: String?,
|
val title: String?,
|
||||||
private val firstChargeRewardList: List<FirstChargeReward>?
|
private val firstChargeRewardList: List<FirstChargeReward>?
|
||||||
) : BaseBindingDialog<DialogFirstChargePrizeBinding>(context) {
|
) : BaseBindingDialog<DialogFirstChargePrizeBinding>(context) {
|
||||||
|
|
||||||
private lateinit var rvDelegate: RVDelegate<FirstChargeReward>
|
private lateinit var rvDelegate: RVDelegate<FirstChargeReward>
|
||||||
|
|
||||||
override fun init() {
|
override fun init() {
|
||||||
rvDelegate = RVDelegate.Builder<FirstChargeReward>()
|
rvDelegate = RVDelegate.Builder<FirstChargeReward>()
|
||||||
.setAdapter(RewardAdapter())
|
.setAdapter(RewardAdapter(ScreenUtil.dip2px(248f) / 3))
|
||||||
.setLayoutManager(FlexboxLayoutManager(context).apply {
|
.setLayoutManager(FlexboxLayoutManager(context).apply {
|
||||||
alignItems = AlignItems.STRETCH
|
alignItems = AlignItems.STRETCH
|
||||||
justifyContent = JustifyContent.SPACE_EVENLY
|
justifyContent = JustifyContent.SPACE_EVENLY
|
||||||
|
@@ -4,17 +4,16 @@ import androidx.core.view.updateLayoutParams
|
|||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
import com.chad.library.adapter.base.BaseViewHolder
|
import com.chad.library.adapter.base.BaseViewHolder
|
||||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
|
||||||
import com.mango.moshen.R
|
import com.mango.moshen.R
|
||||||
import com.mango.core.pay.bean.FirstChargeReward
|
import com.mango.core.pay.bean.FirstChargeReward
|
||||||
import com.mango.moshen.ui.utils.ImageLoadUtils
|
import com.mango.moshen.ui.utils.ImageLoadUtils
|
||||||
import com.mango.core.utils.TextUtils
|
import com.mango.core.utils.TextUtils
|
||||||
|
|
||||||
class RewardAdapter :
|
class RewardAdapter(private val itemWidth: Int) :
|
||||||
BaseQuickAdapter<FirstChargeReward, BaseViewHolder>(R.layout.item_first_charge_reward) {
|
BaseQuickAdapter<FirstChargeReward, BaseViewHolder>(R.layout.item_first_charge_reward) {
|
||||||
override fun convert(helper: BaseViewHolder, item: FirstChargeReward) {
|
override fun convert(helper: BaseViewHolder, item: FirstChargeReward) {
|
||||||
helper.itemView.updateLayoutParams<RecyclerView.LayoutParams> {
|
helper.itemView.updateLayoutParams<RecyclerView.LayoutParams> {
|
||||||
width = (ScreenUtil.screenWidth * 0.66f / 3f).toInt()
|
width = itemWidth
|
||||||
}
|
}
|
||||||
ImageLoadUtils.loadImage(
|
ImageLoadUtils.loadImage(
|
||||||
mContext,
|
mContext,
|
||||||
|
@@ -1,20 +1,27 @@
|
|||||||
package com.mango.moshen.avroom.firstcharge
|
package com.mango.moshen.avroom.firstcharge
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
|
import android.content.res.ColorStateList
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.text.style.TextAppearanceSpan
|
||||||
import android.view.Gravity
|
import android.view.Gravity
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import com.mango.moshen.R
|
import androidx.core.graphics.toColorInt
|
||||||
import com.mango.moshen.base.BaseDialog
|
import androidx.core.view.isVisible
|
||||||
import com.mango.moshen.databinding.DialogSelectPayTypeBinding
|
|
||||||
import com.mango.moshen.ui.pay.ChargeActivity
|
|
||||||
import com.mango.core.Constants
|
import com.mango.core.Constants
|
||||||
import com.mango.core.pay.PayModel
|
import com.mango.core.pay.PayModel
|
||||||
import com.mango.core.pay.PaymentActivity
|
import com.mango.core.pay.PaymentActivity
|
||||||
import com.mango.core.pay.bean.WalletInfo
|
import com.mango.core.pay.bean.WalletInfo
|
||||||
|
import com.mango.moshen.R
|
||||||
|
import com.mango.moshen.base.BaseDialog
|
||||||
|
import com.mango.moshen.databinding.DialogSelectPayTypeBinding
|
||||||
|
import com.mango.moshen.ui.pay.ChargeActivity
|
||||||
|
import com.mango.moshen.utils.SpannableBuilder
|
||||||
import com.mango.xchat_android_library.annatation.ActLayoutRes
|
import com.mango.xchat_android_library.annatation.ActLayoutRes
|
||||||
|
import com.mango.xchat_android_library.utils.FormatUtils
|
||||||
import com.mango.xchat_android_library.utils.SingleToastUtil
|
import com.mango.xchat_android_library.utils.SingleToastUtil
|
||||||
|
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 充值方式选择弹窗
|
* 充值方式选择弹窗
|
||||||
@@ -24,16 +31,32 @@ class SelectPayTypeDialog : BaseDialog<DialogSelectPayTypeBinding>() {
|
|||||||
|
|
||||||
private val chargeProdId by lazy { requireArguments().getString("chargeProdId", "") }
|
private val chargeProdId by lazy { requireArguments().getString("chargeProdId", "") }
|
||||||
private val descText by lazy { requireArguments().getString("descText", "") }
|
private val descText by lazy { requireArguments().getString("descText", "") }
|
||||||
|
private val money by lazy { requireArguments().getInt("money", 0) }
|
||||||
|
private val showDiamondCharge by lazy {
|
||||||
|
requireArguments().getBoolean(
|
||||||
|
"showDiamondCharge",
|
||||||
|
false
|
||||||
|
)
|
||||||
|
}
|
||||||
private var removeView: View? = null
|
private var removeView: View? = null
|
||||||
|
|
||||||
|
private var onDiamondChargeClick: (() -> Unit)? = null
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun newInstance(chargeProdId: String, descText: String): SelectPayTypeDialog {
|
fun newInstance(
|
||||||
|
chargeProdId: String,
|
||||||
|
descText: String,
|
||||||
|
showDiamondCharge: Boolean = false,
|
||||||
|
money: Int = 0
|
||||||
|
): SelectPayTypeDialog {
|
||||||
return SelectPayTypeDialog().apply {
|
return SelectPayTypeDialog().apply {
|
||||||
arguments = Bundle().apply {
|
arguments = Bundle().apply {
|
||||||
putString("chargeProdId", chargeProdId)
|
putString("chargeProdId", chargeProdId)
|
||||||
putString("descText", descText)
|
putString("descText", descText)
|
||||||
|
putBoolean("showDiamondCharge", showDiamondCharge)
|
||||||
|
putInt("money", money)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -41,6 +64,10 @@ class SelectPayTypeDialog : BaseDialog<DialogSelectPayTypeBinding>() {
|
|||||||
|
|
||||||
private var payChannel = ""
|
private var payChannel = ""
|
||||||
|
|
||||||
|
fun setOnDiamondChargeClick(onDiamondChargeClick: (() -> Unit)) {
|
||||||
|
this.onDiamondChargeClick = onDiamondChargeClick
|
||||||
|
}
|
||||||
|
|
||||||
override fun onStart() {
|
override fun onStart() {
|
||||||
width = WindowManager.LayoutParams.MATCH_PARENT
|
width = WindowManager.LayoutParams.MATCH_PARENT
|
||||||
gravity = Gravity.BOTTOM
|
gravity = Gravity.BOTTOM
|
||||||
@@ -57,8 +84,6 @@ class SelectPayTypeDialog : BaseDialog<DialogSelectPayTypeBinding>() {
|
|||||||
SingleToastUtil.showToast(it.message)
|
SingleToastUtil.showToast(it.message)
|
||||||
it.printStackTrace()
|
it.printStackTrace()
|
||||||
})
|
})
|
||||||
binding.tvDesc.text = descText
|
|
||||||
|
|
||||||
binding.tvConfirm.setOnClickListener {
|
binding.tvConfirm.setOnClickListener {
|
||||||
if (payChannel.isEmpty()) {
|
if (payChannel.isEmpty()) {
|
||||||
SingleToastUtil.showToast("数据初始化中,请稍后~")
|
SingleToastUtil.showToast("数据初始化中,请稍后~")
|
||||||
@@ -66,6 +91,8 @@ class SelectPayTypeDialog : BaseDialog<DialogSelectPayTypeBinding>() {
|
|||||||
}
|
}
|
||||||
if (binding.rbAlipay.isChecked) {
|
if (binding.rbAlipay.isChecked) {
|
||||||
PaymentActivity.start(requireActivity(), Constants.CHARGE_ALIPAY, chargeProdId)
|
PaymentActivity.start(requireActivity(), Constants.CHARGE_ALIPAY, chargeProdId)
|
||||||
|
} else if (binding.rbDiamond.isChecked) {
|
||||||
|
onDiamondChargeClick?.invoke()
|
||||||
} else {
|
} else {
|
||||||
PaymentActivity.start(requireActivity(), Constants.CHARGE_WX, chargeProdId)
|
PaymentActivity.start(requireActivity(), Constants.CHARGE_WX, chargeProdId)
|
||||||
}
|
}
|
||||||
@@ -82,6 +109,18 @@ class SelectPayTypeDialog : BaseDialog<DialogSelectPayTypeBinding>() {
|
|||||||
binding.ivClose.setOnClickListener {
|
binding.ivClose.setOnClickListener {
|
||||||
dismissAllowingStateLoss()
|
dismissAllowingStateLoss()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (showDiamondCharge) {
|
||||||
|
binding.rg.setOnCheckedChangeListener { _, _ ->
|
||||||
|
if (binding.rbDiamond.isChecked) {
|
||||||
|
binding.tvDesc.text = "${money * 10}钻石"
|
||||||
|
} else {
|
||||||
|
binding.tvDesc.text = descText
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
binding.tvDesc.text = descText
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -89,30 +128,53 @@ class SelectPayTypeDialog : BaseDialog<DialogSelectPayTypeBinding>() {
|
|||||||
*/
|
*/
|
||||||
private fun setWalletData(walletInfo: WalletInfo) {
|
private fun setWalletData(walletInfo: WalletInfo) {
|
||||||
binding.rg.visibility = View.VISIBLE
|
binding.rg.visibility = View.VISIBLE
|
||||||
|
var defaultDiamond = false
|
||||||
|
if (showDiamondCharge) {
|
||||||
|
binding.rbDiamond.isVisible = true
|
||||||
|
val states = arrayOf(intArrayOf(android.R.attr.state_enabled))
|
||||||
|
val colors = intArrayOf("#8A8CAB".toColorInt())
|
||||||
|
binding.rbDiamond.text = SpannableBuilder()
|
||||||
|
.append("钻石支付")
|
||||||
|
.append(
|
||||||
|
"(${FormatUtils.formatBigInteger(walletInfo.diamondNum)}钻石)",
|
||||||
|
TextAppearanceSpan(
|
||||||
|
null,
|
||||||
|
0,
|
||||||
|
ScreenUtil.sp2px(10f),
|
||||||
|
ColorStateList(states, colors),
|
||||||
|
null
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
defaultDiamond = money != 0 && money <= walletInfo.diamondNum
|
||||||
|
binding.rbDiamond.isChecked = defaultDiamond
|
||||||
|
} else {
|
||||||
|
binding.rbDiamond.isVisible = false
|
||||||
|
}
|
||||||
when (walletInfo.defaultPay) {
|
when (walletInfo.defaultPay) {
|
||||||
ChargeActivity.ALI_PAY_CLOSE -> {
|
ChargeActivity.ALI_PAY_CLOSE -> {
|
||||||
payChannel = Constants.CHARGE_ALIPAY
|
payChannel = Constants.CHARGE_ALIPAY
|
||||||
removeView = binding.rbAlipay
|
removeView = binding.rbAlipay
|
||||||
binding.rg.removeView(binding.rbAlipay)
|
binding.rg.removeView(binding.rbAlipay)
|
||||||
binding.rbWechat.isChecked = true
|
binding.rbWechat.isChecked = !defaultDiamond
|
||||||
binding.tvMore.visibility = View.VISIBLE
|
binding.tvMore.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
ChargeActivity.WX_PAY_CLOSE -> {
|
ChargeActivity.WX_PAY_CLOSE -> {
|
||||||
payChannel = Constants.CHARGE_WX
|
payChannel = Constants.CHARGE_WX
|
||||||
removeView = binding.rbWechat
|
removeView = binding.rbWechat
|
||||||
binding.rg.removeView(binding.rbWechat)
|
binding.rg.removeView(binding.rbWechat)
|
||||||
binding.rbAlipay.isChecked = true
|
binding.rbAlipay.isChecked = !defaultDiamond
|
||||||
binding.tvMore.visibility = View.VISIBLE
|
binding.tvMore.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
ChargeActivity.WX_PAY_OPEN -> {
|
ChargeActivity.WX_PAY_OPEN -> {
|
||||||
payChannel = Constants.CHARGE_WX
|
payChannel = Constants.CHARGE_WX
|
||||||
binding.rbWechat.isChecked = true
|
binding.rbWechat.isChecked = !defaultDiamond
|
||||||
binding.rg.removeView(binding.rbAlipay)
|
binding.rg.removeView(binding.rbAlipay)
|
||||||
binding.rg.addView(binding.rbAlipay)
|
binding.rg.addView(binding.rbAlipay)
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
payChannel = Constants.CHARGE_ALIPAY
|
payChannel = Constants.CHARGE_ALIPAY
|
||||||
binding.rbAlipay.isChecked = true
|
binding.rbAlipay.isChecked = !defaultDiamond
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -288,7 +288,6 @@ public class HomePartyFragment extends BaseFragment implements View.OnClickListe
|
|||||||
}
|
}
|
||||||
addTipMsg();
|
addTipMsg();
|
||||||
case RoomEvent.ROOM_INFO_UPDATE:
|
case RoomEvent.ROOM_INFO_UPDATE:
|
||||||
updateView(AvRoomDataManager.get().mCurrentRoomInfo);
|
|
||||||
setRoomBg(AvRoomDataManager.get().mCurrentRoomInfo);
|
setRoomBg(AvRoomDataManager.get().mCurrentRoomInfo);
|
||||||
break;
|
break;
|
||||||
case RoomEvent.RECEIVE_NORMALE_GIFT:
|
case RoomEvent.RECEIVE_NORMALE_GIFT:
|
||||||
|
@@ -484,7 +484,7 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
|||||||
.takeWhile(aBoolean -> !aBoolean && getMvpView() != null)
|
.takeWhile(aBoolean -> !aBoolean && getMvpView() != null)
|
||||||
.doOnNext(aBoolean -> getMvpView().noFollow())
|
.doOnNext(aBoolean -> getMvpView().noFollow())
|
||||||
//个人主播房新加的关注提醒弹窗,以后还会不会有呢???
|
//个人主播房新加的关注提醒弹窗,以后还会不会有呢???
|
||||||
.takeWhile(aBoolean -> !AvRoomDataManager.get().isSingleRoom())
|
.takeWhile(aBoolean -> AvRoomDataManager.get().isSingleRoom())
|
||||||
.delay(4, TimeUnit.MINUTES)
|
.delay(4, TimeUnit.MINUTES)
|
||||||
.single(false)
|
.single(false)
|
||||||
.flatMap(aBoolean -> PraiseModel.get().isPraised(AuthModel.get().getCurrentUid(), uid))
|
.flatMap(aBoolean -> PraiseModel.get().isPraised(AuthModel.get().getCurrentUid(), uid))
|
||||||
@@ -493,7 +493,7 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
|||||||
.doOnNext(aBoolean -> getMvpView().showAttentionDialog())
|
.doOnNext(aBoolean -> getMvpView().showAttentionDialog())
|
||||||
.subscribe();
|
.subscribe();
|
||||||
|
|
||||||
Observable.interval(1, 5, TimeUnit.MINUTES)
|
Observable.timer(5, TimeUnit.MINUTES)
|
||||||
.compose(bindUntilEvent(PresenterEvent.DESTROY))
|
.compose(bindUntilEvent(PresenterEvent.DESTROY))
|
||||||
.takeWhile(aLong -> !AvRoomDataManager.get().isRoomFans && getMvpView() != null)
|
.takeWhile(aLong -> !AvRoomDataManager.get().isRoomFans && getMvpView() != null)
|
||||||
.subscribe(aLong -> getMvpView().noFollow2());
|
.subscribe(aLong -> getMvpView().noFollow2());
|
||||||
|
@@ -711,7 +711,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
rvLuckyMsg.setAdapter(luckyMsgAdapter);
|
rvLuckyMsg.setAdapter(luckyMsgAdapter);
|
||||||
rvLuckyMsg.setLayoutManager(new ScrollSpeedLinearLayoutManger(context, LinearLayoutManager.HORIZONTAL, false));
|
rvLuckyMsg.setLayoutManager(new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false));
|
||||||
}
|
}
|
||||||
luckyMsgDisposable = GiftModel.get().getLuckyGiftMsgList()
|
luckyMsgDisposable = GiftModel.get().getLuckyGiftMsgList()
|
||||||
.compose(RxHelper.bindContext(context))
|
.compose(RxHelper.bindContext(context))
|
||||||
|
@@ -3,20 +3,29 @@ package com.mango.moshen.vip
|
|||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.graphics.Paint
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.LinearLayout
|
import android.widget.LinearLayout
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.activity.viewModels
|
import androidx.activity.viewModels
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
import androidx.core.view.isGone
|
||||||
import androidx.core.view.isInvisible
|
import androidx.core.view.isInvisible
|
||||||
import androidx.core.view.isVisible
|
import androidx.core.view.isVisible
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import com.netease.nim.uikit.StatusBarUtil
|
import com.mango.core.UriProvider
|
||||||
import com.netease.nim.uikit.common.util.sys.TimeUtil
|
import com.mango.core.auth.AuthModel
|
||||||
import com.opensource.svgaplayer.SVGADrawable
|
import com.mango.core.pay.PayModel
|
||||||
import com.opensource.svgaplayer.SVGAImageView
|
import com.mango.core.pay.PaymentActivity
|
||||||
import com.opensource.svgaplayer.SVGAParser
|
import com.mango.core.pay.bean.PaymentResult
|
||||||
import com.opensource.svgaplayer.SVGAVideoEntity
|
import com.mango.core.pay.model.unionpay.UnionPayModel
|
||||||
|
import com.mango.core.statistic.StatisticManager
|
||||||
|
import com.mango.core.statistic.protocol.StatisticsProtocol
|
||||||
|
import com.mango.core.utils.toIntOrDef
|
||||||
|
import com.mango.core.utils.toast
|
||||||
|
import com.mango.core.vip.VipAuthInfo
|
||||||
|
import com.mango.core.vip.VipInfo
|
||||||
|
import com.mango.core.vip.VipOpenEvent
|
||||||
import com.mango.moshen.R
|
import com.mango.moshen.R
|
||||||
import com.mango.moshen.avroom.firstcharge.SelectPayTypeDialog
|
import com.mango.moshen.avroom.firstcharge.SelectPayTypeDialog
|
||||||
import com.mango.moshen.bank_card.activity.AddBankCardAgreementActivity
|
import com.mango.moshen.bank_card.activity.AddBankCardAgreementActivity
|
||||||
@@ -29,25 +38,18 @@ import com.mango.moshen.ui.setting.ModifyPwdActivity
|
|||||||
import com.mango.moshen.ui.utils.RVDelegate
|
import com.mango.moshen.ui.utils.RVDelegate
|
||||||
import com.mango.moshen.ui.webview.CommonWebViewActivity
|
import com.mango.moshen.ui.webview.CommonWebViewActivity
|
||||||
import com.mango.moshen.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator
|
import com.mango.moshen.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator
|
||||||
import com.mango.core.UriProvider
|
|
||||||
import com.mango.core.auth.AuthModel
|
|
||||||
import com.mango.core.pay.PayModel
|
|
||||||
import com.mango.core.pay.PaymentActivity
|
|
||||||
import com.mango.core.pay.bean.PaymentResult
|
|
||||||
import com.mango.core.pay.model.unionpay.UnionPayModel
|
|
||||||
import com.mango.core.statistic.StatisticManager
|
|
||||||
import com.mango.core.statistic.protocol.StatisticsProtocol
|
|
||||||
import com.mango.core.utils.toast
|
|
||||||
import com.mango.core.vip.VipAuthInfo
|
|
||||||
import com.mango.core.vip.VipInfo
|
|
||||||
import com.mango.core.vip.VipOpenEvent
|
|
||||||
import com.mango.xchat_android_library.utils.JavaUtil
|
import com.mango.xchat_android_library.utils.JavaUtil
|
||||||
|
import com.netease.nim.uikit.StatusBarUtil
|
||||||
|
import com.netease.nim.uikit.common.util.sys.TimeUtil
|
||||||
|
import com.opensource.svgaplayer.SVGADrawable
|
||||||
|
import com.opensource.svgaplayer.SVGAImageView
|
||||||
|
import com.opensource.svgaplayer.SVGAParser
|
||||||
|
import com.opensource.svgaplayer.SVGAVideoEntity
|
||||||
import org.greenrobot.eventbus.EventBus
|
import org.greenrobot.eventbus.EventBus
|
||||||
import org.greenrobot.eventbus.Subscribe
|
import org.greenrobot.eventbus.Subscribe
|
||||||
import org.greenrobot.eventbus.ThreadMode
|
import org.greenrobot.eventbus.ThreadMode
|
||||||
import java.net.MalformedURLException
|
import java.net.MalformedURLException
|
||||||
import java.net.URL
|
import java.net.URL
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class VipMainActivity : BaseViewBindingActivity<ActivityVipMainBinding>(),
|
class VipMainActivity : BaseViewBindingActivity<ActivityVipMainBinding>(),
|
||||||
VipMagicIndicatorAdapter.OnItemSelectListener {
|
VipMagicIndicatorAdapter.OnItemSelectListener {
|
||||||
@@ -81,6 +83,10 @@ class VipMainActivity : BaseViewBindingActivity<ActivityVipMainBinding>(),
|
|||||||
VipRemainTimeDialog.newInstance().show(this)
|
VipRemainTimeDialog.newInstance().show(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.stvRank.setOnClickListener {
|
||||||
|
VipRankActivity.start(this)
|
||||||
|
}
|
||||||
|
|
||||||
rvDelegate = RVDelegate.Builder<VipAuthInfo>()
|
rvDelegate = RVDelegate.Builder<VipAuthInfo>()
|
||||||
.setLayoutManager(GridLayoutManager(this, 3))
|
.setLayoutManager(GridLayoutManager(this, 3))
|
||||||
.setRecyclerView(binding.recyclerView)
|
.setRecyclerView(binding.recyclerView)
|
||||||
@@ -117,7 +123,7 @@ class VipMainActivity : BaseViewBindingActivity<ActivityVipMainBinding>(),
|
|||||||
vipViewModel.myVipInfoLiveData.observe(this) {
|
vipViewModel.myVipInfoLiveData.observe(this) {
|
||||||
it?.let {
|
it?.let {
|
||||||
binding.llMyVipInfo.isVisible = true
|
binding.llMyVipInfo.isVisible = true
|
||||||
binding.tvOpenVip.isVisible = false
|
binding.flOpenVip.isVisible = false
|
||||||
binding.tvNotOpen.text = "当前权力值:${it.currScore}"
|
binding.tvNotOpen.text = "当前权力值:${it.currScore}"
|
||||||
binding.tvCurrValue.text = "当前${it.currScore}"
|
binding.tvCurrValue.text = "当前${it.currScore}"
|
||||||
binding.tvCurrLevelName.text = it.vipName
|
binding.tvCurrLevelName.text = it.vipName
|
||||||
@@ -159,15 +165,13 @@ class VipMainActivity : BaseViewBindingActivity<ActivityVipMainBinding>(),
|
|||||||
|
|
||||||
} ?: run {
|
} ?: run {
|
||||||
binding.llMyVipInfo.isVisible = false
|
binding.llMyVipInfo.isVisible = false
|
||||||
binding.tvOpenVip.isVisible = true
|
|
||||||
binding.slAuth.isVisible = true
|
binding.slAuth.isVisible = true
|
||||||
binding.tvNotOpen.text = "尚未开通贵族"
|
binding.tvNotOpen.text = "尚未开通贵族"
|
||||||
loadData()
|
vipViewModel.getOpenVipProd()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vipViewModel.currVipInfoLiveData.observe(this) {
|
vipViewModel.currVipInfoLiveData.observe(this) {
|
||||||
|
|
||||||
it?.let {
|
it?.let {
|
||||||
if (it.comingSoon == 2) {
|
if (it.comingSoon == 2) {
|
||||||
binding.llNotOpen.isVisible = true
|
binding.llNotOpen.isVisible = true
|
||||||
@@ -194,6 +198,39 @@ class VipMainActivity : BaseViewBindingActivity<ActivityVipMainBinding>(),
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vipViewModel.chargeBeanLiveData.observe(this) {
|
||||||
|
it?.let { chargeBean ->
|
||||||
|
binding.flOpenVip.isVisible = true
|
||||||
|
val oriPrice = chargeBean.oriPrice.toIntOrDef(0)
|
||||||
|
val isDiscountPrice = oriPrice != 0 && oriPrice != chargeBean.getMoney()
|
||||||
|
binding.tvOpenVip.isGone = isDiscountPrice
|
||||||
|
binding.clOpenVipFirst.isGone = !isDiscountPrice
|
||||||
|
if (isDiscountPrice) {
|
||||||
|
binding.tvFirstOpenPriceOriginal.paint.flags = Paint.STRIKE_THRU_TEXT_FLAG
|
||||||
|
binding.tvFirstOpenPriceOriginal.text = chargeBean.oriPrice
|
||||||
|
binding.tvFirstOpenPrice.text = "仅需${chargeBean.money}¥"
|
||||||
|
} else {
|
||||||
|
binding.tvOpenVip.text = "${chargeBean.getMoney()}立刻成为魔力贵族"
|
||||||
|
}
|
||||||
|
binding.flOpenVip.setOnClickListener {
|
||||||
|
StatisticManager.Instance()
|
||||||
|
.onEvent(StatisticsProtocol.EVENT_VIP_OPEN_CLICK, "开通贵族点击事件")
|
||||||
|
SelectPayTypeDialog.newInstance(
|
||||||
|
chargeBean.chargeProdId,
|
||||||
|
"¥${chargeBean.money}",
|
||||||
|
true,
|
||||||
|
chargeBean.money
|
||||||
|
)
|
||||||
|
.apply {
|
||||||
|
setOnDiamondChargeClick {
|
||||||
|
vipViewModel.openVipWithDiamond()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.show(context)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
vipViewModel.pageLiveData.observe(this) {
|
vipViewModel.pageLiveData.observe(this) {
|
||||||
it?.let {
|
it?.let {
|
||||||
binding.magicIndicator.onPageSelected(it)
|
binding.magicIndicator.onPageSelected(it)
|
||||||
@@ -255,32 +292,6 @@ class VipMainActivity : BaseViewBindingActivity<ActivityVipMainBinding>(),
|
|||||||
vipViewModel.onItemSelect(position)
|
vipViewModel.onItemSelect(position)
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("CheckResult", "SetTextI18n")
|
|
||||||
private fun loadData() {
|
|
||||||
PayModel.get().getChargeList(9, AuthModel.get().currentUid)
|
|
||||||
.compose(bindToLifecycle())
|
|
||||||
.subscribe(
|
|
||||||
{
|
|
||||||
val chargeInfo = it.list.getOrNull(0)
|
|
||||||
chargeInfo?.let { chargeBean ->
|
|
||||||
binding.tvOpenVip.text = "${chargeBean.getMoney()}立刻成为魔力贵族"
|
|
||||||
binding.tvOpenVip.setOnClickListener {
|
|
||||||
StatisticManager.Instance()
|
|
||||||
.onEvent(StatisticsProtocol.EVENT_VIP_OPEN_CLICK, "开通贵族点击事件")
|
|
||||||
SelectPayTypeDialog.newInstance(
|
|
||||||
chargeBean.chargeProdId,
|
|
||||||
"¥${chargeBean.money}",
|
|
||||||
)
|
|
||||||
.show(context)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
it.printStackTrace()
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
super.onActivityResult(requestCode, resultCode, data)
|
super.onActivityResult(requestCode, resultCode, data)
|
||||||
dialogManager.dismissDialog()
|
dialogManager.dismissDialog()
|
||||||
@@ -317,8 +328,6 @@ class VipMainActivity : BaseViewBindingActivity<ActivityVipMainBinding>(),
|
|||||||
})
|
})
|
||||||
else -> {
|
else -> {
|
||||||
toast(paymentResult.msg)
|
toast(paymentResult.msg)
|
||||||
//重新获取钱包信息
|
|
||||||
PayModel.get().getWalletInfo(AuthModel.get().currentUid).subscribe()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -333,6 +342,8 @@ class VipMainActivity : BaseViewBindingActivity<ActivityVipMainBinding>(),
|
|||||||
fun onVipOpenEvent(vipOpenEvent: VipOpenEvent) {
|
fun onVipOpenEvent(vipOpenEvent: VipOpenEvent) {
|
||||||
"恭喜开通贵族成功!".toast()
|
"恭喜开通贵族成功!".toast()
|
||||||
vipViewModel.getVipPageInfo()
|
vipViewModel.getVipPageInfo()
|
||||||
|
//重新获取钱包信息
|
||||||
|
PayModel.get().getWalletInfo(AuthModel.get().currentUid).subscribe()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
109
app/src/main/java/com/mango/moshen/vip/VipRankActivity.kt
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
package com.mango.moshen.vip
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import androidx.activity.viewModels
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import com.mango.core.vip.RankInfo
|
||||||
|
import com.mango.core.vip.VipMessageInfo
|
||||||
|
import com.mango.moshen.R
|
||||||
|
import com.mango.moshen.base.BaseViewBindingActivity
|
||||||
|
import com.mango.moshen.databinding.ActivityVipRankBinding
|
||||||
|
import com.mango.moshen.ui.utils.RVDelegate
|
||||||
|
import com.netease.nim.uikit.StatusBarUtil
|
||||||
|
import io.reactivex.Observable
|
||||||
|
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||||
|
import io.reactivex.disposables.Disposable
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
|
class VipRankActivity : BaseViewBindingActivity<ActivityVipRankBinding>() {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
fun start(context: Context) {
|
||||||
|
val starter = Intent(context, VipRankActivity::class.java)
|
||||||
|
context.startActivity(starter)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private lateinit var bannerRvDelegate: RVDelegate<VipMessageInfo>
|
||||||
|
private lateinit var rankRvDelegate: RVDelegate<RankInfo>
|
||||||
|
private val viewModel: VipRankViewModel by viewModels()
|
||||||
|
private var disposable: Disposable? = null
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
|
override fun init() {
|
||||||
|
initWhiteTitleBar("贵族设置")
|
||||||
|
bannerRvDelegate = RVDelegate.Builder<VipMessageInfo>()
|
||||||
|
.setLayoutManager(LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false))
|
||||||
|
.setRecyclerView(binding.rvBanner)
|
||||||
|
.setAdapter(VipRankBannerAdapter())
|
||||||
|
.build()
|
||||||
|
|
||||||
|
rankRvDelegate = RVDelegate.Builder<RankInfo>()
|
||||||
|
.setLayoutManager(LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false))
|
||||||
|
.setRecyclerView(binding.rvRank)
|
||||||
|
.setAdapter(VipRankAdapter())
|
||||||
|
.build()
|
||||||
|
|
||||||
|
viewModel.loadingLiveData.observe(this) {
|
||||||
|
if (it == true) {
|
||||||
|
dialogManager.showProgressDialog(this)
|
||||||
|
} else {
|
||||||
|
dialogManager.dismissDialog()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
viewModel.rankLiveData.observe(this) {
|
||||||
|
rankRvDelegate.loadData(it)
|
||||||
|
}
|
||||||
|
|
||||||
|
viewModel.bannerLiveData.observe(this) {
|
||||||
|
bannerRvDelegate.loadData(it)
|
||||||
|
}
|
||||||
|
|
||||||
|
viewModel.myRankLiveData.observe(this) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
disposable = Observable.intervalRange(0, Int.MAX_VALUE.toLong(), 0, 5, TimeUnit.SECONDS)
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.filter { bannerRvDelegate.adapter.itemCount > 0 }
|
||||||
|
.subscribe {
|
||||||
|
val index = (it % bannerRvDelegate.adapter.itemCount).toInt()
|
||||||
|
if (index == 0) {
|
||||||
|
binding.rvBanner.scrollToPosition(index)
|
||||||
|
} else {
|
||||||
|
binding.rvBanner.smoothScrollToPosition(index)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroy() {
|
||||||
|
super.onDestroy()
|
||||||
|
disposable?.dispose()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initWhiteTitleBar(title: String?) {
|
||||||
|
mTitleBar = findViewById(R.id.title_bar)
|
||||||
|
if (mTitleBar != null) {
|
||||||
|
mTitleBar.setTitle(title)
|
||||||
|
mTitleBar.setImmersive(false)
|
||||||
|
mTitleBar.setTitleColor(resources.getColor(R.color.white))
|
||||||
|
mTitleBar.setLeftImageResource(R.drawable.arrow_left_white)
|
||||||
|
mTitleBar.setCommonBackgroundColor(resources.getColor(R.color.transparent))
|
||||||
|
mTitleBar.setLeftClickListener { onLeftClickListener() }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun needSteepStateBar() = true
|
||||||
|
|
||||||
|
override fun setStatusBar() {
|
||||||
|
super.setStatusBar()
|
||||||
|
StatusBarUtil.transparencyBar(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
45
app/src/main/java/com/mango/moshen/vip/VipRankAdapter.kt
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
package com.mango.moshen.vip
|
||||||
|
|
||||||
|
import android.view.View
|
||||||
|
import android.widget.ImageView
|
||||||
|
import android.widget.TextView
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
|
import com.chad.library.adapter.base.BaseViewHolder
|
||||||
|
import com.mango.core.vip.RankInfo
|
||||||
|
import com.mango.moshen.R
|
||||||
|
import com.mango.moshen.ui.utils.loadAvatar
|
||||||
|
|
||||||
|
|
||||||
|
class VipRankAdapter : BaseQuickAdapter<RankInfo, BaseViewHolder>(R.layout.item_vip_rank) {
|
||||||
|
|
||||||
|
override fun convert(helper: BaseViewHolder, item: RankInfo) {
|
||||||
|
helper.setText(R.id.tv_userName, item.nick)
|
||||||
|
.setText(R.id.tv_value, item.score.toString() + "")
|
||||||
|
helper.getView<ImageView>(R.id.iv_avatar).loadAvatar(item.avatar)
|
||||||
|
helper.getView<ImageView>(R.id.iv_vip_icon).loadAvatar(item.vipLogo)
|
||||||
|
val tvPosition = helper.getView<TextView>(R.id.tv_position)
|
||||||
|
val ivPosition = helper.getView<ImageView>(R.id.iv_position)
|
||||||
|
when (helper.layoutPosition) {
|
||||||
|
0 -> {
|
||||||
|
tvPosition.visibility = View.GONE
|
||||||
|
ivPosition.visibility = View.VISIBLE
|
||||||
|
ivPosition.setImageDrawable(mContext.resources.getDrawable(R.drawable.ic_box_ranking_first))
|
||||||
|
}
|
||||||
|
1 -> {
|
||||||
|
tvPosition.visibility = View.GONE
|
||||||
|
ivPosition.visibility = View.VISIBLE
|
||||||
|
ivPosition.setImageDrawable(mContext.resources.getDrawable(R.drawable.ic_box_ranking_second))
|
||||||
|
}
|
||||||
|
2 -> {
|
||||||
|
tvPosition.visibility = View.GONE
|
||||||
|
ivPosition.visibility = View.VISIBLE
|
||||||
|
ivPosition.setImageDrawable(mContext.resources.getDrawable(R.drawable.ic_box_ranking_third))
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
|
tvPosition.visibility = View.VISIBLE
|
||||||
|
ivPosition.visibility = View.GONE
|
||||||
|
tvPosition.text = (helper.layoutPosition + 1).toString()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,42 @@
|
|||||||
|
package com.mango.moshen.vip
|
||||||
|
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.graphics.drawable.ColorDrawable
|
||||||
|
import android.text.style.ForegroundColorSpan
|
||||||
|
import android.widget.TextView
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
|
import com.chad.library.adapter.base.BaseViewHolder
|
||||||
|
import com.mango.core.utils.sub
|
||||||
|
import com.mango.core.vip.VipMessageInfo
|
||||||
|
import com.mango.moshen.R
|
||||||
|
import com.mango.moshen.common.widget.CircleImageSpan
|
||||||
|
import com.mango.moshen.utils.SpannableBuilder
|
||||||
|
|
||||||
|
|
||||||
|
class VipRankBannerAdapter :
|
||||||
|
BaseQuickAdapter<VipMessageInfo, BaseViewHolder>(R.layout.item_vip_rank_banner) {
|
||||||
|
|
||||||
|
override fun convert(helper: BaseViewHolder, item: VipMessageInfo) {
|
||||||
|
val tvContent: TextView = helper.getView(R.id.tv_content)
|
||||||
|
val text = SpannableBuilder()
|
||||||
|
.append("恭喜 ", ForegroundColorSpan(Color.WHITE))
|
||||||
|
.append(
|
||||||
|
"-",
|
||||||
|
CircleImageSpan(
|
||||||
|
ColorDrawable(Color.TRANSPARENT),
|
||||||
|
item.avatar,
|
||||||
|
50,
|
||||||
|
50
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.append(
|
||||||
|
" " + item.nick.sub(6) + " ",
|
||||||
|
ForegroundColorSpan(mContext.resources.getColor(R.color.notice_nick))
|
||||||
|
)
|
||||||
|
.append(
|
||||||
|
"贵族身份升级为" + item.currVipName,
|
||||||
|
ForegroundColorSpan(Color.WHITE).toString() + "!"
|
||||||
|
)
|
||||||
|
tvContent.text = text.build()
|
||||||
|
}
|
||||||
|
}
|
53
app/src/main/java/com/mango/moshen/vip/VipRankViewModel.kt
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
package com.mango.moshen.vip
|
||||||
|
|
||||||
|
import androidx.lifecycle.LiveData
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import com.mango.core.bean.response.ListResult
|
||||||
|
import com.mango.core.vip.RankInfo
|
||||||
|
import com.mango.core.vip.VipMessageInfo
|
||||||
|
import com.mango.core.vip.VipModel
|
||||||
|
import com.mango.moshen.base.BaseViewModel
|
||||||
|
|
||||||
|
class VipRankViewModel : BaseViewModel() {
|
||||||
|
|
||||||
|
|
||||||
|
private val _rankLiveData = MutableLiveData<ListResult<RankInfo>>()
|
||||||
|
val rankLiveData: LiveData<ListResult<RankInfo>> = _rankLiveData
|
||||||
|
|
||||||
|
private val _myRankLiveData = MutableLiveData<RankInfo>()
|
||||||
|
val myRankLiveData: LiveData<RankInfo> = _myRankLiveData
|
||||||
|
|
||||||
|
private val _bannerLiveData = MutableLiveData<ListResult<VipMessageInfo>>()
|
||||||
|
val bannerLiveData: LiveData<ListResult<VipMessageInfo>> = _bannerLiveData
|
||||||
|
|
||||||
|
init {
|
||||||
|
getVipRank()
|
||||||
|
getVipRankBanner()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getVipRank() {
|
||||||
|
safeLaunch(
|
||||||
|
true,
|
||||||
|
onError = {
|
||||||
|
_rankLiveData.value = ListResult.failed(1)
|
||||||
|
},
|
||||||
|
block = {
|
||||||
|
val data = VipModel.getVipRank()
|
||||||
|
_rankLiveData.value = ListResult.success(data?.ranks, 1)
|
||||||
|
_myRankLiveData.value = data?.myRank
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private fun getVipRankBanner() {
|
||||||
|
safeLaunch(
|
||||||
|
onError = {
|
||||||
|
_bannerLiveData.value = ListResult.failed(1)
|
||||||
|
},
|
||||||
|
block = {
|
||||||
|
val data = VipModel.getVipRankBanner()
|
||||||
|
_bannerLiveData.value = ListResult.success(data, 1)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -4,6 +4,7 @@ import androidx.lifecycle.LiveData
|
|||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
import com.mango.moshen.base.BaseViewModel
|
import com.mango.moshen.base.BaseViewModel
|
||||||
import com.mango.core.bean.response.BeanResult
|
import com.mango.core.bean.response.BeanResult
|
||||||
|
import com.mango.core.pay.bean.ChargeBean
|
||||||
import com.mango.core.user.UserModel
|
import com.mango.core.user.UserModel
|
||||||
import com.mango.core.utils.toast
|
import com.mango.core.utils.toast
|
||||||
import com.mango.core.vip.VipAuthInfo
|
import com.mango.core.vip.VipAuthInfo
|
||||||
@@ -41,6 +42,9 @@ class VipViewModel : BaseViewModel() {
|
|||||||
private val _enterHideLiveData = MutableLiveData<Boolean>()
|
private val _enterHideLiveData = MutableLiveData<Boolean>()
|
||||||
val enterHideLiveData: LiveData<Boolean> = _enterHideLiveData
|
val enterHideLiveData: LiveData<Boolean> = _enterHideLiveData
|
||||||
|
|
||||||
|
private val _chargeBeanLiveData = MutableLiveData<ChargeBean>()
|
||||||
|
val chargeBeanLiveData: LiveData<ChargeBean> = _chargeBeanLiveData
|
||||||
|
|
||||||
fun getVipPageInfo() {
|
fun getVipPageInfo() {
|
||||||
safeLaunch(
|
safeLaunch(
|
||||||
true,
|
true,
|
||||||
@@ -140,4 +144,16 @@ class VipViewModel : BaseViewModel() {
|
|||||||
_currVipInfoLiveData.value = vipInfosLiveData.value?.getOrNull(position)
|
_currVipInfoLiveData.value = vipInfosLiveData.value?.getOrNull(position)
|
||||||
_pageLiveData.value = position
|
_pageLiveData.value = position
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun openVipWithDiamond() {
|
||||||
|
safeLaunch(true) {
|
||||||
|
VipModel.openVipWithDiamond()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getOpenVipProd() {
|
||||||
|
safeLaunch {
|
||||||
|
_chargeBeanLiveData.value = VipModel.getOpenVipProd()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
BIN
app/src/main/res/drawable-xhdpi/bg_vip_first_charge_tip.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_diamond_charge.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
app/src/main/res/drawable-xhdpi/vip_rank_bg_msg.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
app/src/main/res/drawable-xhdpi/vip_rank_bg_rank.png
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
app/src/main/res/drawable-xhdpi/vip_rank_bg_top.png
Normal file
After Width: | Height: | Size: 138 KiB |
BIN
app/src/main/res/drawable-xhdpi/vip_rank_ic_entrance.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/drawable-xhdpi/vip_rank_ic_top1.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
app/src/main/res/drawable-xhdpi/vip_rank_ic_top2.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/drawable-xhdpi/vip_rank_ic_top3.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
@@ -1,117 +1,125 @@
|
|||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
<LinearLayout 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/shape_white_top_10dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<data>
|
<FrameLayout
|
||||||
|
|
||||||
</data>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/shape_white_top_10dp"
|
android:layout_marginTop="10dp">
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<FrameLayout
|
<ImageView
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/iv_close"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="40dp"
|
||||||
android:layout_marginTop="10dp">
|
android:layout_height="40dp"
|
||||||
|
android:layout_marginStart="5dp"
|
||||||
<ImageView
|
android:scaleType="center"
|
||||||
android:id="@+id/iv_close"
|
android:src="@drawable/ic_pwd_close" />
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:scaleType="center"
|
|
||||||
android:src="@drawable/ic_pwd_close" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:text="支付"
|
|
||||||
android:textColor="@color/color_666666"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_desc"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center"
|
||||||
android:layout_marginTop="20dp"
|
android:text="支付"
|
||||||
android:text="¥60"
|
|
||||||
android:textColor="@color/color_333333"
|
|
||||||
android:textSize="28sp" />
|
|
||||||
|
|
||||||
|
|
||||||
<RadioGroup
|
|
||||||
android:id="@+id/rg"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingStart="30dp"
|
|
||||||
android:paddingEnd="30dp"
|
|
||||||
android:visibility="invisible">
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/rb_alipay"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:background="@color/transparent"
|
|
||||||
android:button="@null"
|
|
||||||
android:drawableStart="@drawable/ic_ali_charge"
|
|
||||||
android:drawableEnd="@drawable/selector_check_box_pic_check"
|
|
||||||
android:drawablePadding="10dp"
|
|
||||||
android:text="支付宝"
|
|
||||||
android:textColor="@color/color_333333"
|
|
||||||
android:textSize="15sp" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/rb_wechat"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:background="@color/transparent"
|
|
||||||
android:button="@null"
|
|
||||||
android:drawableStart="@drawable/ic_wechat_charge"
|
|
||||||
android:drawableEnd="@drawable/selector_check_box_pic_check"
|
|
||||||
android:drawablePadding="10dp"
|
|
||||||
android:text="微信支付"
|
|
||||||
android:textColor="@color/color_333333"
|
|
||||||
android:textSize="15sp" />
|
|
||||||
|
|
||||||
</RadioGroup>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_more"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:drawableEnd="@drawable/ic_charge_arrow"
|
|
||||||
android:drawablePadding="4dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="展开更多支付方式"
|
|
||||||
android:textColor="@color/color_666666"
|
android:textColor="@color/color_666666"
|
||||||
android:textSize="@dimen/dp_13"
|
android:textSize="16sp" />
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<TextView
|
</FrameLayout>
|
||||||
android:id="@+id/tv_confirm"
|
|
||||||
android:layout_width="225dp"
|
<TextView
|
||||||
android:layout_height="45dp"
|
android:id="@+id/tv_desc"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_width="wrap_content"
|
||||||
android:layout_marginStart="15dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="40dp"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_marginBottom="15dp"
|
android:layout_marginTop="20dp"
|
||||||
android:background="@drawable/bg_common_confirm"
|
android:text="¥60"
|
||||||
android:gravity="center"
|
android:textColor="@color/color_333333"
|
||||||
android:text="确认支付"
|
android:textSize="28sp" />
|
||||||
android:textColor="@color/white"
|
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/rg"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingStart="15dp"
|
||||||
|
android:paddingEnd="15dp"
|
||||||
|
android:visibility="invisible">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/rb_diamond"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="@drawable/bottom_line"
|
||||||
|
android:button="@null"
|
||||||
|
android:drawableStart="@drawable/ic_diamond_charge"
|
||||||
|
android:drawableEnd="@drawable/selector_check_box_pic_check"
|
||||||
|
android:drawablePadding="10dp"
|
||||||
|
android:text="钻石支付"
|
||||||
|
android:textColor="@color/color_333333"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
<RadioButton
|
||||||
</layout>
|
android:id="@+id/rb_alipay"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="@drawable/bottom_line"
|
||||||
|
android:button="@null"
|
||||||
|
android:drawableStart="@drawable/ic_ali_charge"
|
||||||
|
android:drawableEnd="@drawable/selector_check_box_pic_check"
|
||||||
|
android:drawablePadding="10dp"
|
||||||
|
android:text="支付宝"
|
||||||
|
android:textColor="@color/color_333333"
|
||||||
|
android:textSize="15sp" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/rb_wechat"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="@drawable/bottom_line"
|
||||||
|
android:button="@null"
|
||||||
|
android:drawableStart="@drawable/ic_wechat_charge"
|
||||||
|
android:drawableEnd="@drawable/selector_check_box_pic_check"
|
||||||
|
android:drawablePadding="10dp"
|
||||||
|
android:text="微信支付"
|
||||||
|
android:textColor="@color/color_333333"
|
||||||
|
android:textSize="15sp" />
|
||||||
|
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_more"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:drawableEnd="@drawable/ic_charge_arrow"
|
||||||
|
android:drawablePadding="4dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="展开更多支付方式"
|
||||||
|
android:textColor="@color/color_666666"
|
||||||
|
android:textSize="@dimen/dp_13"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_confirm"
|
||||||
|
android:layout_width="225dp"
|
||||||
|
android:layout_height="45dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginStart="15dp"
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:layout_marginBottom="15dp"
|
||||||
|
android:background="@drawable/bg_common_confirm"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="确认支付"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="15sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
90
app/src/main/res/layout/item_vip_rank.xml
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout 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:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="70dp"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_position"
|
||||||
|
android:layout_width="@dimen/dp_25"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
android:layout_gravity="center" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_position"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:textColor="@color/color_666666"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="50" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<com.mango.moshen.common.widget.CircleImageView
|
||||||
|
android:id="@+id/iv_avatar"
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:src="@drawable/default_avatar" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_vip_icon"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="8dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_userName"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:lines="1"
|
||||||
|
android:textColor="@color/color_333333"
|
||||||
|
android:textSize="15sp"
|
||||||
|
app:layout_flexShrink="1"
|
||||||
|
tools:text="我的我的我的我的我的我的" />
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="50dp"
|
||||||
|
android:layout_marginEnd="22dp"
|
||||||
|
android:gravity="end"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="权利值"
|
||||||
|
android:textColor="#9E9E9E"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_value"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:drawablePadding="5dp"
|
||||||
|
android:gravity="end"
|
||||||
|
android:textColor="#F7DA94"
|
||||||
|
android:textSize="@dimen/dp_14"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="1236843" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
11
app/src/main/res/layout/item_vip_rank_banner.xml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/tv_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="@color/color_999999"
|
||||||
|
android:textSize="12dp"
|
||||||
|
tools:text="每整点半小时内,房间礼物流水排名前十将有机会登上房间首页的官方推荐哦~" />
|
||||||
|
|
@@ -146,23 +146,95 @@
|
|||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
<com.mango.xchat_android_library.widget.DrawableCenterTextView
|
<FrameLayout
|
||||||
android:id="@+id/tv_open_vip"
|
android:id="@+id/fl_open_vip"
|
||||||
android:layout_width="300dp"
|
android:layout_width="300dp"
|
||||||
android:layout_height="44dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="30dp"
|
android:layout_marginBottom="30dp"
|
||||||
android:background="@drawable/bg_vip_open_btn"
|
|
||||||
android:drawableStart="@drawable/ic_vip_open_btn"
|
|
||||||
android:drawablePadding="3dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:textColor="@color/color_333333"
|
|
||||||
android:textSize="16dp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
tools:text="¥6立刻成为魔力贵族" />
|
|
||||||
|
<com.mango.xchat_android_library.widget.DrawableCenterTextView
|
||||||
|
android:id="@+id/tv_open_vip"
|
||||||
|
android:layout_width="300dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:background="@drawable/bg_vip_open_btn"
|
||||||
|
android:drawableStart="@drawable/ic_vip_open_btn"
|
||||||
|
android:drawablePadding="3dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textColor="@color/color_333333"
|
||||||
|
android:textSize="16dp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:text="¥6立刻成为魔力贵族" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/cl_open_vip_first"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/view_open_vip_first_bg"
|
||||||
|
android:layout_width="300dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:layout_marginTop="17dp"
|
||||||
|
android:layout_marginBottom="30dp"
|
||||||
|
android:background="@drawable/bg_vip_open_btn"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:text="即刻体验大鹅贵族"
|
||||||
|
android:textColor="@color/color_333333"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_first_open_price_original"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="7dp"
|
||||||
|
android:textColor="#BABBCD"
|
||||||
|
android:textSize="10sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_first_open_price"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tv_first_open_price"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_first_open_price"
|
||||||
|
tools:text="18" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_first_open_price"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:textColor="#EA2B0D"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/view_open_vip_first_bg"
|
||||||
|
tools:text="仅需12¥" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_open_tip"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:src="@drawable/bg_vip_first_charge_tip"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
<com.mango.moshen.base.TitleBar
|
<com.mango.moshen.base.TitleBar
|
||||||
android:id="@+id/title_bar"
|
android:id="@+id/title_bar"
|
||||||
@@ -184,6 +256,27 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/title_bar" />
|
app:layout_constraintTop_toBottomOf="@id/title_bar" />
|
||||||
|
|
||||||
|
<com.coorchice.library.SuperTextView
|
||||||
|
android:id="@+id/stv_rank"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="22dp"
|
||||||
|
android:layout_marginTop="7dp"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
|
android:drawableStart="@drawable/vip_rank_ic_entrance"
|
||||||
|
android:drawablePadding="2dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:includeFontPadding="false"
|
||||||
|
android:paddingStart="6dp"
|
||||||
|
android:paddingEnd="6dp"
|
||||||
|
android:text="贵族榜"
|
||||||
|
android:textColor="#F5C277"
|
||||||
|
android:textSize="10sp"
|
||||||
|
app:corner="@dimen/dp_20"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/magic_indicator"
|
||||||
|
app:stroke_color="#FFE3AF"
|
||||||
|
app:stroke_width="1dp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_my_vip_info"
|
android:id="@+id/ll_my_vip_info"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -193,7 +286,7 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
tools:visibility="visible">
|
tools:visibility="gone">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
141
app/src/module_labour_union/res/layout/activity_vip_rank.xml
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
<?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="match_parent"
|
||||||
|
android:background="#221F20"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<com.mango.moshen.base.TitleBar
|
||||||
|
android:id="@+id/title_bar"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
-->
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_top"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:src="@drawable/vip_rank_bg_top"
|
||||||
|
app:layout_constraintDimensionRatio="750:567"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/fl_msg"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
|
android:background="@drawable/vip_rank_bg_msg"
|
||||||
|
app:layout_constraintDimensionRatio="670:80"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/iv_top">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_banner"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginStart="15dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_marginEnd="15dp"
|
||||||
|
android:background="@drawable/vip_rank_bg_rank"
|
||||||
|
app:layout_constraintDimensionRatio="690:887"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/fl_msg">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_rank"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:itemCount="5"
|
||||||
|
tools:listitem="@layout/item_vip_rank" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="#2A2417"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="10dp"
|
||||||
|
android:paddingBottom="10dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="30dp"
|
||||||
|
android:text="未上榜"
|
||||||
|
android:textColor="#4dffffff"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="44dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:src="@drawable/default_avatar" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:layout_marginStart="8dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="84dp"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:text="你还没有贵族吧"
|
||||||
|
android:textColor="#ffffffff"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="37dp"
|
||||||
|
android:gravity="end"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="权利值"
|
||||||
|
android:textColor="#ff616161"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="99999"
|
||||||
|
android:textColor="#F7DA94"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -1,5 +1,7 @@
|
|||||||
package com.mango.core.bean.response;
|
package com.mango.core.bean.response;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -7,76 +9,7 @@ import java.io.Serializable;
|
|||||||
*/
|
*/
|
||||||
public class ServiceResult<T> implements Serializable {
|
public class ServiceResult<T> implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -1954065564856833013L;
|
|
||||||
|
|
||||||
public static final int SC_SUCCESS = 200;
|
public static final int SC_SUCCESS = 200;
|
||||||
|
|
||||||
private int code = -1;
|
|
||||||
|
|
||||||
private String message = "";
|
|
||||||
|
|
||||||
private T data;
|
|
||||||
|
|
||||||
private long timestamp;
|
|
||||||
|
|
||||||
public ServiceResult() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSuccess() {
|
|
||||||
return this.code == SC_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static <T> ServiceResult<T> success(T data) {
|
|
||||||
return success(data, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static <T> ServiceResult<T> success(T data, String message) {
|
|
||||||
ServiceResult<T> result = new ServiceResult<T>();
|
|
||||||
result.setCodeSuccess().setMessage(message).setData(data);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getCode() {
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ServiceResult<T> setCode(int code) {
|
|
||||||
this.code = code;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ServiceResult<T> setCodeSuccess() {
|
|
||||||
this.code = SC_SUCCESS;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public String getMessage() {
|
|
||||||
return message;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ServiceResult<T> setMessage(String message) {
|
|
||||||
this.message = message;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public T getData() {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ServiceResult<T> setData(T data) {
|
|
||||||
this.data = data;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getTimestamp() {
|
|
||||||
return timestamp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTimestamp(long timestamp) {
|
|
||||||
this.timestamp = timestamp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final int SUCCESS = 200;//成功
|
public static final int SUCCESS = 200;//成功
|
||||||
public static final int INVALID_SERVICE = 199;//服务不可用
|
public static final int INVALID_SERVICE = 199;//服务不可用
|
||||||
public static final int SERVEXCEPTION = 5000;//服务端异常
|
public static final int SERVEXCEPTION = 5000;//服务端异常
|
||||||
@@ -93,11 +26,74 @@ public class ServiceResult<T> implements Serializable {
|
|||||||
public static final int SMSCODEERROR = 4003;//短信验证码错误
|
public static final int SMSCODEERROR = 4003;//短信验证码错误
|
||||||
public static final int WEEKNOTWITHCASHTOWNUMS = 1600;//每周提现俩次
|
public static final int WEEKNOTWITHCASHTOWNUMS = 1600;//每周提现俩次
|
||||||
public static final int CODE_NEED_COMPLETE_USER_INFO = 1415;//每周提现俩次
|
public static final int CODE_NEED_COMPLETE_USER_INFO = 1415;//每周提现俩次
|
||||||
|
/**
|
||||||
/** 没有网络 */
|
* 没有网络
|
||||||
|
*/
|
||||||
public static final int NOT_NET = 50010;
|
public static final int NOT_NET = 50010;
|
||||||
public static final int OTHER = 50011;
|
public static final int OTHER = 50011;
|
||||||
|
private static final long serialVersionUID = -1954065564856833013L;
|
||||||
|
private int code = -1;
|
||||||
|
private String message = "";
|
||||||
|
@Nullable
|
||||||
|
private T data;
|
||||||
|
private long timestamp;
|
||||||
|
public ServiceResult() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> ServiceResult<T> success(T data) {
|
||||||
|
return success(data, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static <T> ServiceResult<T> success(T data, String message) {
|
||||||
|
ServiceResult<T> result = new ServiceResult<T>();
|
||||||
|
result.setCodeSuccess().setMessage(message).setData(data);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSuccess() {
|
||||||
|
return this.code == SC_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ServiceResult<T> setCode(int code) {
|
||||||
|
this.code = code;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ServiceResult<T> setCodeSuccess() {
|
||||||
|
this.code = SC_SUCCESS;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ServiceResult<T> setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
public T getData() {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ServiceResult<T> setData(@Nullable T data) {
|
||||||
|
this.data = data;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getTimestamp() {
|
||||||
|
return timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTimestamp(long timestamp) {
|
||||||
|
this.timestamp = timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
public String getErrorMessage() {
|
public String getErrorMessage() {
|
||||||
String errorStr = "服务器正在维护";
|
String errorStr = "服务器正在维护";
|
||||||
|
@@ -23,23 +23,8 @@ public class ChargeBean implements Serializable{
|
|||||||
public int giftGoldNum;
|
public int giftGoldNum;
|
||||||
public int channel;
|
public int channel;
|
||||||
public String prodDesc;
|
public String prodDesc;
|
||||||
|
|
||||||
public boolean isSelected;
|
public boolean isSelected;
|
||||||
|
private String oriPrice;
|
||||||
|
|
||||||
public ChargeBean(int money) {
|
|
||||||
this.money = money;
|
|
||||||
}
|
|
||||||
// public int seqNo;
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// public int getSeqNo() {
|
|
||||||
// return seqNo;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public void setSeqNo(int seqNo) {
|
|
||||||
// this.seqNo = seqNo;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
public String getChargeProdId() {
|
public String getChargeProdId() {
|
||||||
@@ -82,6 +67,14 @@ public class ChargeBean implements Serializable{
|
|||||||
this.channel = channel;
|
this.channel = channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getOriPrice() {
|
||||||
|
return oriPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOriPrice(String oriPrice) {
|
||||||
|
this.oriPrice = oriPrice;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ChargeBean{" +
|
return "ChargeBean{" +
|
||||||
|
@@ -3,9 +3,11 @@ package com.mango.core.vip
|
|||||||
import com.mango.core.base.BaseModel
|
import com.mango.core.base.BaseModel
|
||||||
import com.mango.core.bean.response.ServiceResult
|
import com.mango.core.bean.response.ServiceResult
|
||||||
import com.mango.core.manager.AvRoomDataManager
|
import com.mango.core.manager.AvRoomDataManager
|
||||||
|
import com.mango.core.pay.bean.ChargeBean
|
||||||
import com.mango.core.utils.net.launchRequest
|
import com.mango.core.utils.net.launchRequest
|
||||||
import com.mango.xchat_android_library.net.rxnet.RxNet
|
import com.mango.xchat_android_library.net.rxnet.RxNet
|
||||||
import retrofit2.http.GET
|
import retrofit2.http.GET
|
||||||
|
import retrofit2.http.POST
|
||||||
import retrofit2.http.Query
|
import retrofit2.http.Query
|
||||||
|
|
||||||
object VipModel : BaseModel() {
|
object VipModel : BaseModel() {
|
||||||
@@ -37,6 +39,25 @@ object VipModel : BaseModel() {
|
|||||||
api.changeInvisibleInRoom(open)
|
api.changeInvisibleInRoom(open)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
suspend fun getVipRank(): VipRankInfo? =
|
||||||
|
launchRequest {
|
||||||
|
api.getVipRank()
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun getVipRankBanner(): List<VipMessageInfo>? =
|
||||||
|
launchRequest {
|
||||||
|
api.getVipRankBanner()
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun openVipWithDiamond(): Any? =
|
||||||
|
launchRequest {
|
||||||
|
api.openVipWithDiamond()
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun getOpenVipProd(): ChargeBean? =
|
||||||
|
launchRequest {
|
||||||
|
api.getOpenVipProd()
|
||||||
|
}
|
||||||
|
|
||||||
private interface Api {
|
private interface Api {
|
||||||
|
|
||||||
@@ -83,6 +104,38 @@ object VipModel : BaseModel() {
|
|||||||
*/
|
*/
|
||||||
@GET("/vip/changeInvisibleInRoom")
|
@GET("/vip/changeInvisibleInRoom")
|
||||||
suspend fun changeInvisibleInRoom(@Query("open") open: Boolean): ServiceResult<String>
|
suspend fun changeInvisibleInRoom(@Query("open") open: Boolean): ServiceResult<String>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取贵族排行榜信息
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GET("/vip/listRank")
|
||||||
|
suspend fun getVipRank(): ServiceResult<VipRankInfo>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取贵族升级的轮播列表
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GET("/vip/listUpgrade")
|
||||||
|
suspend fun getVipRankBanner(): ServiceResult<List<VipMessageInfo>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使用钻石开通贵族
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@POST("/vip/openWithDiamond")
|
||||||
|
suspend fun openVipWithDiamond(): ServiceResult<Any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取开通贵族产品
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GET("/vip/getOpenVipProd")
|
||||||
|
suspend fun getOpenVipProd(): ServiceResult<ChargeBean>
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
16
core/src/main/java/com/mango/core/vip/VipRankInfo.kt
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
package com.mango.core.vip
|
||||||
|
|
||||||
|
data class VipRankInfo(
|
||||||
|
val myRank: RankInfo? = null,
|
||||||
|
val ranks: List<RankInfo>? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
data class RankInfo(
|
||||||
|
val uid: Long? = null,
|
||||||
|
val erbanNo: Long? = null,
|
||||||
|
val nick: String? = null,
|
||||||
|
val avatar: String? = null,
|
||||||
|
val vipLogo: String? = null,
|
||||||
|
val score: Long? = null,
|
||||||
|
val rankNo: Int? = null
|
||||||
|
)
|