[Feat]统一NDE域名
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user