[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,26 +0,0 @@
package com.mogo.eagle.core.function
import com.mogo.commons.debug.DebugConfig
/**
* cmdb 域名
*/
class BindHostConst {
companion object {
private const val UPGRADE_APP_HOST_DEV = "https://eagle-qa.zhidaozhixing.com/"
private const val UPGRADE_APP_HOST = "http://eagle-mis.zhidaozhixing.com/"
@JvmStatic
fun getBaseUrl(): String {
return when (DebugConfig.getNetMode()) {
DebugConfig.NET_MODE_DEV -> UPGRADE_APP_HOST_DEV
DebugConfig.NET_MODE_QA -> UPGRADE_APP_HOST_DEV
DebugConfig.NET_MODE_DEMO -> UPGRADE_APP_HOST
DebugConfig.NET_MODE_RELEASE -> UPGRADE_APP_HOST
else -> UPGRADE_APP_HOST
}
}
}
}

View File

@@ -5,8 +5,8 @@ import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BIN
import android.content.Context;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
import com.mogo.commons.constants.HostConst;
import com.mogo.eagle.core.data.bindingcar.UpgradeAppInfo;
import com.mogo.eagle.core.function.BindHostConst;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.network.MoGoRetrofitFactory;
import com.mogo.eagle.core.network.utils.GsonUtil;
@@ -33,7 +33,7 @@ public class UpgradeAppNetWorkManager {
private UpgradeAppNetWorkManager() {
mUpgradeApiService = MoGoRetrofitFactory.getInstance(BindHostConst.getBaseUrl())
mUpgradeApiService = MoGoRetrofitFactory.getInstance(HostConst.Companion.getHost())
.create(UpgradeApiService.class);
}

View File

@@ -3,10 +3,10 @@ package com.mogo.eagle.core.function.bindingcar.network;
import android.content.Context;
import android.util.Log;
import com.mogo.commons.constants.HostConst;
import com.mogo.commons.constants.SharedPrefsConstants;
import com.mogo.eagle.core.data.bindingcar.BindingcarInfo;
import com.mogo.eagle.core.data.bindingcar.ModifyBindingcarInfo;
import com.mogo.eagle.core.function.BindHostConst;
import com.mogo.eagle.core.function.api.bindingcar.BindingcarCallBack;
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager;
import com.mogo.eagle.core.network.MoGoRetrofitFactory;
@@ -35,7 +35,7 @@ public class BindingcarNetWorkManager {
private static final String TAG = "BindingcarNetManager";
private BindingcarNetWorkManager() {
mBindingcarApiService = MoGoRetrofitFactory.getInstance(BindHostConst.getBaseUrl())
mBindingcarApiService = MoGoRetrofitFactory.getInstance(HostConst.Companion.getHost())
.create(BindingcarApiService.class);
}