feat:完成首页榜单&房间榜单 动态地址功能(待测试)

This commit is contained in:
Max
2023-11-06 11:08:31 +08:00
parent ca2b411bac
commit b9c165f355
5 changed files with 87 additions and 4 deletions

View File

@@ -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;
}
/**
* 帮助页
*/

View File

@@ -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

View File

@@ -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();