Commit 454d7512 by 霍志良

feat:修改AAR包

parent dc9b8f34
...@@ -8,6 +8,7 @@ import com.ydl.ydlcommon.base.config.IConfigModule; ...@@ -8,6 +8,7 @@ import com.ydl.ydlcommon.base.config.IConfigModule;
import com.ydl.ydlcommon.base.config.YDLConstants; import com.ydl.ydlcommon.base.config.YDLConstants;
import com.ydl.ydlcommon.base.delegate.IAppLifecycles; import com.ydl.ydlcommon.base.delegate.IAppLifecycles;
import com.ydl.ydlcommon.base.config.GlobalConfig; import com.ydl.ydlcommon.base.config.GlobalConfig;
import com.ydl.ydlcommon.utils.YDLCacheUtils;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
...@@ -20,10 +21,9 @@ import java.util.List; ...@@ -20,10 +21,9 @@ import java.util.List;
public final class DemoGlobalConfig implements IConfigModule { public final class DemoGlobalConfig implements IConfigModule {
String APP_DOMAIN = "https://api.github.com/"; String APP_DOMAIN = "https://api.github.com/";
// public static String appEnv = YDLConstants.ENV_AUTO_TEST; // public static String appEnv = YDLConstants.ENV_AUTO_TEST;
public static String appEnv = YDLConstants.ENV_TEST; // public static String appEnv = YDLConstants.ENV_TEST;
// public static String appEnv = YDLConstants.ENV_NEW_TEST;//配置未上传到maven库 public static String appEnv = YDLConstants.ENV_NEW_TEST;//配置未上传到maven库
// public static String appEnv = YDLConstants.ENV_PROD; // public static String appEnv = YDLConstants.ENV_PROD;
@Override @Override
public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) { public void injectAppLifecycle(@NotNull Context context, @NotNull List<IAppLifecycles> lifecycles) {
lifecycles.add(new DemoAppLifecycles()); lifecycles.add(new DemoAppLifecycles());
......
...@@ -74,17 +74,17 @@ class CoursePlugin : MethodChannel.MethodCallHandler { ...@@ -74,17 +74,17 @@ class CoursePlugin : MethodChannel.MethodCallHandler {
GETPUBLICPARAMAS -> { GETPUBLICPARAMAS -> {
val appEnv = BaseApp.instance.getGlobalConfig().appEnv val appEnv = BaseApp.instance.getGlobalConfig().appEnv
var isDevelopment = 0 var isDevelopment = "0"
if (YDLConstants.ENV_TEST == appEnv) { if (YDLConstants.ENV_TEST == appEnv) {
isDevelopment = 1 isDevelopment = "1"
} else if (YDLConstants.ENV_NEW_TEST == appEnv) { } else if (YDLConstants.ENV_NEW_TEST == appEnv) {
isDevelopment = 2 isDevelopment = "2"
} }
val loginBean = ModularServiceManager.getPlatformUserService()?.getUser() val loginBean = ModularServiceManager.getPlatformUserService()?.getUser()
val mMap = mutableMapOf<String, Any>() val mMap = mutableMapOf<String, Any>()
var uid = loginBean?.userId ?: "" var uid = loginBean?.userId ?: ""
mMap["isDevelopment"] = isDevelopment mMap["isDevelopment"] =isDevelopment
mMap["uid"] = if (TextUtils.isEmpty(uid)) "0" else uid mMap["uid"] = if (TextUtils.isEmpty(uid)) "0" else uid
mMap["accessToken"] = loginBean?.token ?: "" mMap["accessToken"] = loginBean?.token ?: ""
?: "" ?: ""
......
...@@ -12,10 +12,7 @@ import com.ydl.ydlcommon.data.PlatformDataManager ...@@ -12,10 +12,7 @@ import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.data.http.GsonProvider import com.ydl.ydlcommon.data.http.GsonProvider
import com.ydl.ydlcommon.modular.ModularServiceManager import com.ydl.ydlcommon.modular.ModularServiceManager
import com.ydl.ydlcommon.router.YdlCommonOut import com.ydl.ydlcommon.router.YdlCommonOut
import com.ydl.ydlcommon.utils.LogUtil import com.ydl.ydlcommon.utils.*
import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.utils.YDLCacheUtils
import com.ydl.ydlcommon.utils.YdlBuryPointUtil
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.common.tools.RxDeviceTool import com.yidianling.common.tools.RxDeviceTool
import de.greenrobot.event.EventBus import de.greenrobot.event.EventBus
...@@ -82,21 +79,22 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler { ...@@ -82,21 +79,22 @@ class YDLCommonPlugin : MethodChannel.MethodCallHandler {
val appEnv = BaseApp.instance.getGlobalConfig().appEnv val appEnv = BaseApp.instance.getGlobalConfig().appEnv
val cacheAppEnv = YDLCacheUtils.getCacheApi() val cacheAppEnv = YDLCacheUtils.getCacheApi()
var isDevelopment = 0 var isDevelopment = "0"
if (!TextUtils.isEmpty(cacheAppEnv)) { if (!TextUtils.isEmpty(cacheAppEnv)) {
if (YDLConstants.ENV_TEST == cacheAppEnv || YDLConstants.ENV_AUTO_TEST == cacheAppEnv) { if (YDLConstants.ENV_TEST == cacheAppEnv || YDLConstants.ENV_AUTO_TEST == cacheAppEnv) {
isDevelopment = 1 isDevelopment = "1"
} else if (YDLConstants.ENV_NEW_TEST == cacheAppEnv) { } else if (YDLConstants.ENV_NEW_TEST == cacheAppEnv) {
isDevelopment = 2 isDevelopment = "2"
} }
} else { } else {
if (YDLConstants.ENV_TEST == cacheAppEnv || YDLConstants.ENV_AUTO_TEST == appEnv) { if ( YDLConstants.ENV_TEST == appEnv) {
isDevelopment = 1 isDevelopment = "1"
} else if (YDLConstants.ENV_NEW_TEST == cacheAppEnv) { } else if (YDLConstants.ENV_NEW_TEST == appEnv) {
isDevelopment = 2 isDevelopment = "2"
} }
} }
com.yidianling.common.tools.LogUtil.e("aaaaacommon"+isDevelopment+"环境"+appEnv)
mMap["isDevelopment"] = isDevelopment mMap["isDevelopment"] = isDevelopment
......
...@@ -7,6 +7,7 @@ import com.ydl.ydlcommon.base.config.YDLConstants.ENV_NEW_TEST ...@@ -7,6 +7,7 @@ import com.ydl.ydlcommon.base.config.YDLConstants.ENV_NEW_TEST
import com.ydl.ydlcommon.base.config.YDLConstants.ENV_TEST import com.ydl.ydlcommon.base.config.YDLConstants.ENV_TEST
import com.ydl.ydlcommon.data.PlatformDataManager import com.ydl.ydlcommon.data.PlatformDataManager
import com.ydl.ydlcommon.modular.ModularServiceManager import com.ydl.ydlcommon.modular.ModularServiceManager
import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.RxAppTool import com.yidianling.common.tools.RxAppTool
import com.yidianling.common.tools.RxDeviceTool import com.yidianling.common.tools.RxDeviceTool
...@@ -43,13 +44,14 @@ object AppUtils { ...@@ -43,13 +44,14 @@ object AppUtils {
fun getHttpCommonParams(): Map<String, Any> { fun getHttpCommonParams(): Map<String, Any> {
val mMap = mutableMapOf<String, Any>() val mMap = mutableMapOf<String, Any>()
val appEnv = BaseApp.instance.getGlobalConfig().appEnv val appEnv = BaseApp.instance.getGlobalConfig().appEnv
var isDevelopment = 0 var isDevelopment = "0"
if (ENV_TEST == appEnv) { if (ENV_TEST == appEnv) {
isDevelopment = 1 isDevelopment = "1"
} else if (ENV_NEW_TEST == appEnv) { } else if (ENV_NEW_TEST == appEnv) {
isDevelopment = 2 isDevelopment = "2"
} }
LogUtil.e("aaaaaapputils"+isDevelopment+"环境"+appEnv)
val osBuild = "${RxDeviceTool.getBuildBrandModel()},${RxDeviceTool.getSDKVersionName()},${ val osBuild = "${RxDeviceTool.getBuildBrandModel()},${RxDeviceTool.getSDKVersionName()},${
RxAppTool.getAppVersionName( RxAppTool.getAppVersionName(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment