[2.13.0] change the host location and fix bug of token problem

This commit is contained in:
zhongchao
2022-11-30 15:22:13 +08:00
parent 573bc5a385
commit 0d6938262c
25 changed files with 56 additions and 367 deletions

View File

@@ -1,22 +0,0 @@
package com.zhjt.mogo_core_function_devatools.funcconfig.network
import com.mogo.commons.debug.DebugConfig
class FuncConfigHost {
companion object{
private const val HOST_DEV = "https://eagle-qa.zhidaozhixing.com"
private const val HOST_RELEASE = "https://eagle.zhidaozhixing.com"
fun get(): String{
return when (DebugConfig.getNetMode()) {
DebugConfig.NET_MODE_DEV -> HOST_DEV
DebugConfig.NET_MODE_QA -> HOST_DEV
DebugConfig.NET_MODE_DEMO -> HOST_RELEASE
DebugConfig.NET_MODE_RELEASE -> HOST_RELEASE
else -> HOST_RELEASE
}
}
}
}

View File

@@ -1,6 +1,7 @@
package com.zhjt.mogo_core_function_devatools.funcconfig.network
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.commons.constants.HostConst
import com.mogo.eagle.core.data.BaseResponse
import com.mogo.eagle.core.network.MoGoRetrofitFactory
import com.mogo.eagle.core.network.apiCall
@@ -11,7 +12,7 @@ import com.zhjt.service_biz.FuncConfig
class FuncConfigNetWorkModel {
private fun getNetWorkApi(baseUrl: String = FuncConfigHost.get()): FuncConfigApiService {
private fun getNetWorkApi(baseUrl: String = HostConst.getHost()): FuncConfigApiService {
return MoGoRetrofitFactory.getInstanceNoCallAdapter(baseUrl)
.create(FuncConfigApiService::class.java)
}

View File

@@ -4,7 +4,7 @@ import com.mogo.eagle.core.data.Response
import com.mogo.eagle.core.network.MoGoRetrofitFactory
import com.mogo.eagle.core.network.apiResponseCall
import com.mogo.eagle.core.network.request
import com.mogo.eagle.core.data.constants.HostConst
import com.mogo.commons.constants.HostConst
import com.zhjt.mogo_core_function_devatools.upgrade.network.HostConst.Companion.getBaseUrl
class UpgradeVersionNetWorkModel {