Merge branch 'v1.5.0/ranking' into v1.5.0/test

This commit is contained in:
Max
2023-11-07 10:01:52 +08:00
17 changed files with 76 additions and 603 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,31 @@ 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 = AvRoomDataManager.get().getRoomUid();
InitInfo info = InitialModel.get().getCacheInitInfo();
if (info != null) {
String uri = info.getH5Uri("roomRank");
if (uri != null && uri.length() > 0) {
return uri + "?roomUid=" + roomUid;
}
}
return WEB_URL.concat("/yinmeng/modules/room_rank/index.html?roomUid=" + roomUid);
}
/**
* 帮助页
*/
@@ -329,13 +353,6 @@ public class UriProvider {
}
/**
* 房间排行榜
*/
public static String getRoomRanking() {
return WEB_URL.concat("/yinmeng/modules/room_rank/index.html?roomUid=" + AvRoomDataManager.get().getRoomUid());
}
/**
* 第三方SDK协议
*

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