feat : 修复麦位UI异常, 信誉等级 提交
This commit is contained in:
@@ -196,9 +196,12 @@ class MeFragment : BaseFragment(), View.OnClickListener {
|
|||||||
|
|
||||||
private fun setDonation(userInfo: UserInfo) {
|
private fun setDonation(userInfo: UserInfo) {
|
||||||
val initInfo = InitialModel.get().cacheInitInfo
|
val initInfo = InitialModel.get().cacheInitInfo
|
||||||
|
|
||||||
val diamondList = initInfo?.giveDiamondErbanNoList
|
val diamondList = initInfo?.giveDiamondErbanNoList
|
||||||
val giftList = initInfo?.giveGiftErbanNoList
|
val giftList = initInfo?.giveGiftErbanNoList
|
||||||
|
|
||||||
val levelSep = userInfo.userLevelVo.experLevelSeq
|
val levelSep = userInfo.userLevelVo.experLevelSeq
|
||||||
|
|
||||||
if (diamondList?.contains(userInfo.erbanNo) == true
|
if (diamondList?.contains(userInfo.erbanNo) == true
|
||||||
|| giftList?.contains(userInfo.erbanNo) == true
|
|| giftList?.contains(userInfo.erbanNo) == true
|
||||||
|| levelSep >= (initInfo?.giveDiamondExperLevel ?: 0)
|
|| levelSep >= (initInfo?.giveDiamondExperLevel ?: 0)
|
||||||
@@ -208,6 +211,7 @@ class MeFragment : BaseFragment(), View.OnClickListener {
|
|||||||
} else {
|
} else {
|
||||||
meViewModel.updateDonationMenuVisible(false)
|
meViewModel.updateDonationMenuVisible(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun copyName(erbanNo: String) {
|
private fun copyName(erbanNo: String) {
|
||||||
|
@@ -17,16 +17,24 @@ import com.chwl.app.common.EmptyViewHelper
|
|||||||
import com.chwl.app.databinding.ActivityGiveGoldBinding
|
import com.chwl.app.databinding.ActivityGiveGoldBinding
|
||||||
import com.chwl.app.pay.GiveGoldModel
|
import com.chwl.app.pay.GiveGoldModel
|
||||||
import com.chwl.app.pay.adapter.LatelyGiveAdapter
|
import com.chwl.app.pay.adapter.LatelyGiveAdapter
|
||||||
|
import com.chwl.app.ui.bean.RechargeUserInfo
|
||||||
import com.chwl.app.ui.utils.RVDelegate
|
import com.chwl.app.ui.utils.RVDelegate
|
||||||
import com.chwl.app.ui.utils.load
|
import com.chwl.app.ui.utils.load
|
||||||
import com.chwl.app.ui.utils.loadAvatar
|
import com.chwl.app.ui.utils.loadAvatar
|
||||||
|
import com.chwl.core.bean.response.ServiceResult
|
||||||
import com.chwl.core.gift.GiftModel
|
import com.chwl.core.gift.GiftModel
|
||||||
import com.chwl.core.user.UserModel
|
import com.chwl.core.user.UserModel
|
||||||
import com.chwl.core.user.bean.DiamondGiveHistoryInfo
|
import com.chwl.core.user.bean.DiamondGiveHistoryInfo
|
||||||
|
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.setViewWH
|
import com.chwl.library.common.util.setViewWH
|
||||||
|
import com.chwl.library.net.rxnet.RxNet
|
||||||
import com.chwl.library.utils.ResUtil
|
import com.chwl.library.utils.ResUtil
|
||||||
import com.example.lib_utils.ktx.getString
|
import com.example.lib_utils.ktx.getString
|
||||||
import com.netease.nim.uikit.StatusBarUtil
|
import com.netease.nim.uikit.StatusBarUtil
|
||||||
|
import io.reactivex.Single
|
||||||
|
import retrofit2.http.GET
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 轉贈鉆石頁面
|
* 轉贈鉆石頁面
|
||||||
@@ -111,25 +119,39 @@ class GiveGoldActivity : BaseViewBindingActivity<ActivityGiveGoldBinding>() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.more.click {
|
||||||
|
//todo do 待完善: 规则h5
|
||||||
|
|
||||||
UserModel.get().cacheLoginUserInfo?.let { user->
|
|
||||||
|
|
||||||
binding.enbanNo.text = R.string.text_user_id.getString(user.erbanNo)
|
|
||||||
binding.charmLevel.load(user.userLevelVo?.charmUrl?:"")
|
|
||||||
binding.userLevel.load(user.userLevelVo?.experUrl?:"")
|
|
||||||
binding.nick.text = user.nick
|
|
||||||
binding.avatar.loadAvatar(user.avatar)
|
|
||||||
|
|
||||||
binding.starLayout.removeAllViews()
|
|
||||||
for (i in 0 until 5) {
|
|
||||||
val star = ImageView(context)
|
|
||||||
star.setViewWH(15, 15)
|
|
||||||
star.setImageResource( if (true) R.drawable.c_draw_un else R.drawable.c_draw_un)
|
|
||||||
binding.starLayout.addView(star)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
getRechargeUserInfo()
|
||||||
|
.compose(bindToLifecycle())
|
||||||
|
.doOnSuccess {
|
||||||
|
" data = $it".doLog()
|
||||||
|
UserModel.get().cacheLoginUserInfo?.let { user->
|
||||||
|
|
||||||
|
binding.enbanNo.text = R.string.text_user_id.getString(user.erbanNo)
|
||||||
|
binding.charmLevel.load(user.userLevelVo?.charmUrl?:"")
|
||||||
|
binding.userLevel.load(user.userLevelVo?.experUrl?:"")
|
||||||
|
binding.nick.text = user.nick
|
||||||
|
binding.avatar.loadAvatar(user.avatar)
|
||||||
|
|
||||||
|
binding.starLayout.removeAllViews()
|
||||||
|
if (it != null) {
|
||||||
|
for (i in 0 until 5) {
|
||||||
|
val star = ImageView(context)
|
||||||
|
star.setViewWH(15, 15)
|
||||||
|
//todo do 待完善: 信誉等级 星星图片
|
||||||
|
star.setImageResource( if (i < it.starLevel) R.drawable.c_draw_focused else R.drawable.c_draw_un)
|
||||||
|
binding.starLayout.addView(star)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}.subscribe()
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
@@ -155,4 +177,18 @@ class GiveGoldActivity : BaseViewBindingActivity<ActivityGiveGoldBinding>() {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private fun getRechargeUserInfo(): Single<RechargeUserInfo> {
|
||||||
|
return api.getRechargeUserInfo()
|
||||||
|
.compose(RxHelper.handleBeanData())
|
||||||
|
.compose(RxHelper.handleSchedulers())
|
||||||
|
}
|
||||||
|
|
||||||
|
private val api: Api = RxNet.create(Api::class.java);
|
||||||
|
interface Api {
|
||||||
|
@GET("/recharge/user/info")
|
||||||
|
fun getRechargeUserInfo(): Single<ServiceResult<RechargeUserInfo>>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
16
app/src/main/java/com/chwl/app/ui/bean/RechargeUserInfo.java
Normal file
16
app/src/main/java/com/chwl/app/ui/bean/RechargeUserInfo.java
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
package com.chwl.app.ui.bean;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RechargeUserInfo {
|
||||||
|
public long id;
|
||||||
|
public long uid;
|
||||||
|
public long type;
|
||||||
|
public int starLevel;
|
||||||
|
public long erbanNo;
|
||||||
|
public String nick;
|
||||||
|
public String avatar;
|
||||||
|
public int isOnline;
|
||||||
|
}
|
@@ -1,19 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:id="@+id/rootView"
|
android:id="@+id/rootView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical"
|
android:clipChildren="false"
|
||||||
android:layout_height="wrap_content">
|
android:clipToPadding="false"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clipChildren="false"
|
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
|
android:clipChildren="false"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingTop="@dimen/dp_10"
|
android:paddingTop="@dimen/dp_10"
|
||||||
@@ -23,16 +24,18 @@
|
|||||||
android:id="@+id/micro_layout"
|
android:id="@+id/micro_layout"
|
||||||
android:layout_width="@dimen/dp_66"
|
android:layout_width="@dimen/dp_66"
|
||||||
android:layout_height="@dimen/dp_66"
|
android:layout_height="@dimen/dp_66"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
tools:background="#3F51B5">
|
tools:background="#3F51B5">
|
||||||
|
|
||||||
<com.opensource.svgaplayer.SVGAImageView
|
<com.opensource.svgaplayer.SVGAImageView
|
||||||
android:id="@+id/iv_halo"
|
android:id="@+id/iv_halo"
|
||||||
android:layout_width="@dimen/dp_90"
|
android:layout_width="@dimen/dp_90"
|
||||||
android:layout_height="@dimen/dp_90"
|
android:layout_height="@dimen/dp_90"
|
||||||
tools:layout_gravity="center" />
|
tools:background="#FF5722"
|
||||||
|
android:layout_gravity="center" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/avatar"
|
android:id="@+id/avatar"
|
||||||
|
53
mode.json
53
mode.json
@@ -2,46 +2,17 @@
|
|||||||
"code": 200,
|
"code": 200,
|
||||||
"message": "success",
|
"message": "success",
|
||||||
"data": {
|
"data": {
|
||||||
"roomVal": 60576.5,
|
"id": 2083,
|
||||||
"currentLevelIcon": "https://image.pekolive.com/63room_lv.png",
|
"uid": 3224,
|
||||||
"currnetLevel": 63,
|
"type": 64,
|
||||||
"currentLevelExp": 0,
|
"starLevel": 5,
|
||||||
"nextLevel": 0,
|
"createTime": "2024-12-24 18:15:43",
|
||||||
"nextLevelExp": 0,
|
"updateTime": 1735035343000,
|
||||||
"micEffects": [
|
"erbanNo": "6228657",
|
||||||
{
|
"nick": "Molistar",
|
||||||
"id": 4,
|
"avatar": "https://image.pekolive.com/bfed3b08-1ebe-42dc-b9a4-619cb2da0e43.gif",
|
||||||
"reachLevel": 1,
|
"isOnline": 0,
|
||||||
"dressUrl": "https://image.pekolive.com/micEffect1.svga"
|
"seq": 0
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 5,
|
|
||||||
"reachLevel": 1,
|
|
||||||
"dressUrl": "https://image.pekolive.com/micEffect2.svga"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 6,
|
|
||||||
"reachLevel": 1,
|
|
||||||
"dressUrl": "https://image.pekolive.com/micEffect3.svga"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"micSkins": [
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"reachLevel": 1,
|
|
||||||
"dressUrl": "https://image.pekolive.com/micSkin1.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 2,
|
|
||||||
"reachLevel": 1,
|
|
||||||
"dressUrl": "https://image.pekolive.com/micSkin2.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 3,
|
|
||||||
"reachLevel": 1,
|
|
||||||
"dressUrl": "https://image.pekolive.com/micSkin3.png"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"timestamp": 1734946769207
|
"timestamp": 1735109388648
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user