fix bug and add gd loc
This commit is contained in:
@@ -38,6 +38,7 @@ import com.mogo.eagle.core.utilcode.util.AppUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ProcessUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadPoolService
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.map.location.GDLocationClient
|
||||
import com.mogo.module.common.constants.HostConst
|
||||
import com.rousetime.android_startup.AndroidStartup
|
||||
import com.zhjt.mogo_core_function_devatools.env.EnvChangeManager
|
||||
@@ -74,12 +75,17 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
override fun create(context: Context): Boolean {
|
||||
this.context = context
|
||||
if (ProcessUtils.isMainProcess(context)) {
|
||||
initGDLoc()
|
||||
initHttpDns()
|
||||
initCloudClientConfig()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
private fun initGDLoc() {
|
||||
GDLocationClient.getInstance(context).start()
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化 HttpDNS ,这里会通过一个接口获取所有鹰眼中使用的微服务域名以及端口号
|
||||
* 后续的网络请求会通过 HttpDnsInterceptor 进行拦截替换
|
||||
@@ -242,10 +248,10 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
linkCode = CHAIN_LINK_CLOUD_SHOW,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = CHAIN_ALIAS_CODE_HTTP_DNS_CHANGED,
|
||||
paramIndexes = [0],
|
||||
paramIndexes = [0,1],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
override fun onAddressChanged(address: Map<String, String>?) {
|
||||
override fun onAddressChanged(cityCode: String, address: Map<String, String>?) {
|
||||
val dnsCacheIp = mogoHttpDns.getCachedHttpDnsIps(
|
||||
host,
|
||||
HttpDnsConst.HTTP_DNS_ADDRESS_TYPE_HTTP
|
||||
|
||||
Reference in New Issue
Block a user