feat:完成首页榜单&房间榜单 动态地址功能(待测试)
This commit is contained in:
@@ -28,10 +28,12 @@ import com.nnbc123.app.databinding.FragmentChatroomGameMainBinding
|
||||
import com.nnbc123.app.friend.view.SelectFriendActivity
|
||||
import com.nnbc123.app.home.helper.OpenRoomHelper
|
||||
import com.nnbc123.app.ui.utils.loadAvatar
|
||||
import com.nnbc123.app.ui.webview.DialogWebViewActivity
|
||||
import com.nnbc123.app.ui.widget.ShareDialog
|
||||
import com.nnbc123.app.ui.widget.ShareDialog.OnShareDialogItemClick
|
||||
import com.nnbc123.app.utils.RegexUtil
|
||||
import com.nnbc123.app.vip.VipMainActivity
|
||||
import com.nnbc123.core.UriProvider
|
||||
import com.nnbc123.core.gift.bean.GiftMultiReceiverInfo
|
||||
import com.nnbc123.core.gift.bean.GiftReceiveInfo
|
||||
import com.nnbc123.core.gift.bean.LuckyBagGifts
|
||||
@@ -467,11 +469,20 @@ class HomePartyFragment : BaseFragment(), View.OnClickListener, OnShareDialogIte
|
||||
.onEvent(StatisticsProtocol.EVENT_CP_ROOM_RANKING_LIST_CLICK, "房间榜")
|
||||
} else StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_MP_ROOM_RANKING_LIST_CLICK, "房间榜")
|
||||
if (childFragmentManager.findFragmentByTag("dialog_fragment_room_rank") != null) {
|
||||
return
|
||||
val roomUid = AvRoomDataManager.get().mCurrentRoomInfo?.roomUid
|
||||
var rankUri: String? = null
|
||||
if (roomUid != null) {
|
||||
rankUri = UriProvider.getRoomRanking(roomUid)
|
||||
}
|
||||
if (rankUri.isNullOrEmpty()) {
|
||||
if (childFragmentManager.findFragmentByTag("dialog_fragment_room_rank") != null) {
|
||||
return
|
||||
}
|
||||
val roomRankDialogFragment = RoomRankDialogFragment.newInstance()
|
||||
roomRankDialogFragment.show(childFragmentManager, "dialog_fragment_room_rank")
|
||||
} else {
|
||||
DialogWebViewActivity.start(mContext, rankUri)
|
||||
}
|
||||
val roomRankDialogFragment = RoomRankDialogFragment.newInstance()
|
||||
roomRankDialogFragment.show(childFragmentManager, "dialog_fragment_room_rank")
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
|
@@ -116,6 +116,9 @@ public class MicroView extends LinearLayout implements View.OnLayoutChangeListen
|
||||
}
|
||||
|
||||
private void subMsg() {
|
||||
if (isInEditMode()) {
|
||||
return;
|
||||
}
|
||||
subscribe = IMNetEaseManager.get()
|
||||
.getChatRoomEventObservable().subscribe(
|
||||
roomEvent -> onReceiveRoomEvent(roomEvent),
|
||||
|
@@ -2,6 +2,8 @@ package com.nnbc123.core;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.nnbc123.core.initial.InitialModel;
|
||||
import com.nnbc123.core.initial.bean.InitInfo;
|
||||
import com.nnbc123.core.manager.AvRoomDataManager;
|
||||
|
||||
/**
|
||||
@@ -68,9 +70,30 @@ public class UriProvider {
|
||||
* 贵族介绍页
|
||||
*/
|
||||
public static String getRanking() {
|
||||
InitInfo info = InitialModel.get().getCacheInitInfo();
|
||||
if (info != null) {
|
||||
String uri = info.getH5Uri("rank");
|
||||
if (uri != null && uri.length() > 0) {
|
||||
return uri;
|
||||
}
|
||||
}
|
||||
return WEB_URL.concat("/yinmeng/modules/rank/index.html#/rank");
|
||||
}
|
||||
|
||||
/**
|
||||
* 房间榜单
|
||||
*/
|
||||
public static String getRoomRanking(long roomUid) {
|
||||
InitInfo info = InitialModel.get().getCacheInitInfo();
|
||||
if (info != null) {
|
||||
String uri = info.getH5Uri("roomRank");
|
||||
if (uri != null && uri.length() > 0) {
|
||||
return uri + "?roomUid=" + roomUid;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 帮助页
|
||||
*/
|
||||
|
@@ -0,0 +1,9 @@
|
||||
package com.nnbc123.core.initial.bean
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* Created by Max on 2023/11/5 13:56
|
||||
* Desc:H5配置
|
||||
**/
|
||||
data class H5Uri(val code: String? = null, val uri: String? = null) : Serializable
|
@@ -187,6 +187,36 @@ public class InitInfo implements Serializable {
|
||||
}
|
||||
|
||||
private List<Long> checkUids;
|
||||
|
||||
public List<H5Uri> getH5Uris() {
|
||||
return H5Uris;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取H5-Uri
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
public String getH5Uri(String code) {
|
||||
if (code == null) {
|
||||
return null;
|
||||
}
|
||||
if (H5Uris == null) {
|
||||
return null;
|
||||
}
|
||||
for (int i = 0; i < H5Uris.size(); i++) {
|
||||
H5Uri item = H5Uris.get(i);
|
||||
if (item.getCode() != null && item.getCode().equals(code)) {
|
||||
return item.getUri();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setH5Uris(List<H5Uri> h5Uris) {
|
||||
H5Uris = h5Uris;
|
||||
}
|
||||
|
||||
private boolean checkInviteCode;
|
||||
private List<String> homeTabList;
|
||||
private int roomBlackListSize;
|
||||
@@ -196,6 +226,8 @@ public class InitInfo implements Serializable {
|
||||
private List<String> officialAccountUids;
|
||||
private boolean twelveStarSwitch;
|
||||
|
||||
private List<H5Uri> H5Uris;
|
||||
|
||||
//<editor-fold defaultstate="collapsed" desc="delombok">
|
||||
@SuppressWarnings("all")
|
||||
public InitInfo() {
|
||||
@@ -839,6 +871,9 @@ public class InitInfo implements Serializable {
|
||||
final Object this$monsters = this.getMonsters();
|
||||
final Object other$monsters = other.getMonsters();
|
||||
if (this$monsters == null ? other$monsters != null : !this$monsters.equals(other$monsters)) return false;
|
||||
final Object this$h5Uris = this.getH5Uris();
|
||||
final Object other$h5Uris = other.getH5Uris();
|
||||
if (this$h5Uris == null ? other$h5Uris != null : !this$h5Uris.equals(other$h5Uris)) return false;
|
||||
final Object this$tax = this.getTax();
|
||||
final Object other$tax = other.getTax();
|
||||
if (this$tax == null ? other$tax != null : !this$tax.equals(other$tax)) return false;
|
||||
@@ -932,6 +967,8 @@ public class InitInfo implements Serializable {
|
||||
result = result * PRIME + ($nobleResource == null ? 43 : $nobleResource.hashCode());
|
||||
final Object $monsters = this.getMonsters();
|
||||
result = result * PRIME + ($monsters == null ? 43 : $monsters.hashCode());
|
||||
final Object $h5Uris = this.getH5Uris();
|
||||
result = result * PRIME + ($h5Uris == null ? 43 : $h5Uris.hashCode());
|
||||
final Object $tax = this.getTax();
|
||||
result = result * PRIME + ($tax == null ? 43 : $tax.hashCode());
|
||||
final Object $webHostName = this.getWebHostName();
|
||||
|
Reference in New Issue
Block a user