个人信息显示,签约1035添加

This commit is contained in:
2025-12-04 14:25:09 +08:00
parent 885f981b6f
commit 64f538f04d
2 changed files with 47 additions and 41 deletions

View File

@@ -1,11 +1,8 @@
package com.xscm.modulemain.activity.room.fragment package com.xscm.modulemain.activity.room.fragment
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Context
import android.os.Bundle import android.os.Bundle
import android.os.Vibrator
import android.view.Gravity import android.view.Gravity
import android.view.HapticFeedbackConstants
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.widget.PopupWindow import android.widget.PopupWindow
@@ -238,6 +235,7 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
R.id.tv_time_right -> { R.id.tv_time_right -> {
MvpPre.signEnd(mSignId!!) MvpPre.signEnd(mSignId!!)
} }
R.id.iv_help -> { R.id.iv_help -> {
//签约规则 //签约规则
val bundle = Bundle() val bundle = Bundle()
@@ -399,7 +397,7 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
if (fromUserInfo != null && toUserInfo != null && signValue != null) { if (fromUserInfo != null && toUserInfo != null && signValue != null) {
signTypeDialog?.show(1) signTypeDialog?.show(1)
}else{ } else {
signTypeDialog?.show(2) signTypeDialog?.show(2)
} }
} }
@@ -417,13 +415,14 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
override fun signCoinList(list: List<String>) { override fun signCoinList(list: List<String>) {
MvpPre!!.wallet(list) MvpPre!!.wallet(list)
} }
override fun wallet(list: List<String>, walletBean: WalletBean?) { override fun wallet(list: List<String>, walletBean: WalletBean?) {
if (dialogMentorShip == null) { if (dialogMentorShip == null) {
dialogMentorShip = DialogMentorShip(ActivityUtils.getTopActivity()) dialogMentorShip = DialogMentorShip(ActivityUtils.getTopActivity())
} }
ActivityUtils.getTopActivity() ActivityUtils.getTopActivity()
dialogMentorShip?.setClickable(true) dialogMentorShip?.setClickable(true)
dialogMentorShip?.show(mRoomId,list, mSignPitBean, walletBean, dialogMentorShip?.show(mRoomId, list, mSignPitBean, walletBean,
object : DialogMentorShip.OnItemClickListener { object : DialogMentorShip.OnItemClickListener {
override fun onItemClick(coin: String) { override fun onItemClick(coin: String) {
dialogMentorShip?.setClickable(false) dialogMentorShip?.setClickable(false)
@@ -481,7 +480,10 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
fun event1035(messageEvent: RoomMessageEvent) { fun event1035(messageEvent: RoomMessageEvent) {
val fromUserId = messageEvent.text.fromUserInfo.user_id
val viewPos = indexList.indexOf(fromUserId.toString())
val pitBean = mRoomInfo?.room_info?.pit_list!![indexList[viewPos].toInt() - 1]
viewList[viewPos].setData(pitBean)
} }
fun event1039(messageEvent: RoomMessageEvent) { fun event1039(messageEvent: RoomMessageEvent) {
@@ -633,11 +635,8 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
} }
fun event1005(message: RoomMessageEvent) { fun event1005(message: RoomMessageEvent) {
// 检查是否有多个用户信息 // 检查是否有多个用户信息
if (message.text.toUserInfos != null && !message.text.toUserInfos.isEmpty() if (!message.text.toUserInfos.isNullOrEmpty()) {
) {
// 处理多个用户的情况 // 处理多个用户的情况
for (userOnlineStatusBean in message.text.toUserInfos) { for (userOnlineStatusBean in message.text.toUserInfos) {
updateCharmForUser(userOnlineStatusBean) updateCharmForUser(userOnlineStatusBean)
@@ -657,7 +656,7 @@ class RoomMentorShipFragment(var mRoomInfo: RoomInfoResp?) :
if (mBinding.rmsw1.getUserId() != null && mBinding.rmsw1.getUserId().equals(userId)) { if (mBinding.rmsw1.getUserId() != null && mBinding.rmsw1.getUserId().equals(userId)) {
mBinding.rmsw1.setCharm(charm) mBinding.rmsw1.setCharm(charm)
} }
if(mBinding.rmswMidd.userId!=null && mBinding.rmswMidd.userId.equals(userId)){ if (mBinding.rmswMidd.userId != null && mBinding.rmswMidd.userId.equals(userId)) {
mBinding.rmswMidd.setCharm(charm) mBinding.rmswMidd.setCharm(charm)
} }
} }

View File

@@ -535,6 +535,43 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
} }
private void showCp() { private void showCp() {
if (userInfo.getUser_id() == SpUtil.getUserId()){
mBinding.imRoomGz.setVisibility(GONE);
}else {
mBinding.imRoomGz.setVisibility(VISIBLE);
}
if (!userInfo.getIcon().isEmpty()) {
mBinding.flexEntry.setVisibility(VISIBLE);
for (String url : userInfo.getIcon()) {
if (url.contains("http")) {
ImageView imageView1 = new ImageView(Application.getInstance());
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_20)
);
params.setMargins(0, 0, Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
imageView1.setLayoutParams(params);
imageView1.setScaleType(ImageView.ScaleType.FIT_START);
// 使用 Glide 加载图片
ImageUtils.loadHeadCC(url, imageView1, params);
mBinding.flexEntry.addView(imageView1);
}
}
} else {
mBinding.flexEntry.setVisibility(GONE);
}
if (userInfo.getProfile().isEmpty()) {
mBinding.jianj.setText("");
mBinding.jianj.setVisibility(GONE);
} else {
mBinding.jianj.setText(userInfo.getProfile());
mBinding.jianj.setVisibility(VISIBLE);
}
if (userInfo.getCp_info() != null) { if (userInfo.getCp_info() != null) {
mBinding.ll.setVisibility(VISIBLE); mBinding.ll.setVisibility(VISIBLE);
@@ -563,36 +600,6 @@ public class RoomUserInfoFragment extends BaseMvpDialogFragment<RoomUserPresente
mBinding.cpAnim.setMute(true); mBinding.cpAnim.setMute(true);
mBinding.cpAnim.setSource(userInfo.getCp_info().pendant, 1); mBinding.cpAnim.setSource(userInfo.getCp_info().pendant, 1);
if (userInfo.getProfile().isEmpty()) {
mBinding.jianj.setText("");
mBinding.jianj.setVisibility(GONE);
} else {
mBinding.jianj.setText(userInfo.getProfile());
mBinding.jianj.setVisibility(VISIBLE);
}
if (!userInfo.getIcon().isEmpty()) {
mBinding.flexEntry.setVisibility(VISIBLE);
for (String url : userInfo.getIcon()) {
if (url.contains("http")) {
ImageView imageView1 = new ImageView(Application.getInstance());
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_20)
);
params.setMargins(0, 0, Application.getInstance().getResources().getDimensionPixelSize(com.xscm.moduleutil.R.dimen.dp_5), 0); // 右边距
imageView1.setLayoutParams(params);
imageView1.setScaleType(ImageView.ScaleType.FIT_START);
// 使用 Glide 加载图片
ImageUtils.loadHeadCC(url, imageView1, params);
mBinding.flexEntry.addView(imageView1);
}
}
} else {
mBinding.flexEntry.setVisibility(GONE);
}
ImageUtils.loadHeadCC(userInfo.getCp_info().user_info1.avatar, mBinding.ivCp1); ImageUtils.loadHeadCC(userInfo.getCp_info().user_info1.avatar, mBinding.ivCp1);
ImageUtils.loadHeadCC(userInfo.getCp_info().user_info2.avatar, mBinding.ivCp2); ImageUtils.loadHeadCC(userInfo.getCp_info().user_info2.avatar, mBinding.ivCp2);