[Feat]统一NDE域名

This commit is contained in:
chenfufeng
2025-03-19 17:51:15 +08:00
committed by xinfengkun
parent f336b51053
commit 6e5c7b5873
7 changed files with 158 additions and 1 deletions

View File

@@ -13,6 +13,9 @@ public class HostConst {
public static final String NED_QA = "https://nde-qa-city.zhidaozhixing.com";
public static final String NED_RELEASE = "https://nde-city.zhidaozhixing.com";
private static volatile String unifiedNdeHost = "";
private static volatile int sourceType = -1;// 默认-1云端为0域控为1
public static String getHost() {
String host = HOST_RELEASE;
if (FunctionBuildConfig.urlJson.getEagleMisUrl().isEmpty()) {
@@ -45,6 +48,14 @@ public class HostConst {
}
public static String getNDEHost() {
if (unifiedNdeHost.isEmpty() || unifiedNdeHost == null) {
return getOldNDEHost();
} else {
return unifiedNdeHost;
}
}
private static String getOldNDEHost() {
String host = NED_RELEASE;
switch (DebugConfig.getNetMode()) {
case DebugConfig.NET_MODE_DEV:
@@ -55,4 +66,12 @@ public class HostConst {
return host;
}
public static void updateNdeHost(String ndeHost, int srcType) {
sourceType = srcType;
unifiedNdeHost = ndeHost;
}
public static int getHostSource() {
return sourceType;
}
}