diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java index 9b823a2..3f8964e 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java @@ -67,6 +67,17 @@ public class BaseModule extends BaseApi { if (disablePermission == null) { disablePermission = false; } + + Boolean useLocalTbsCore = (Boolean) param.get("useLocalTbsCore"); + if (useLocalTbsCore == null) { + useLocalTbsCore = false; + } + + String tbsCoreUrl = ""; + if (param.get("tbsCoreUrl") != null) { + tbsCoreUrl = (String) param.get("tbsCoreUrl"); + } + String userId = ""; if (param.get("userId") != null) { userId = (String) param.get("userId"); @@ -126,8 +137,8 @@ public class BaseModule extends BaseApi { .setBindAppletWithMainProcess(bindAppletWithMainProcess) .setLogLevel(XLogLevel.LEVEL_VERBOSE) .setXLogDir(new File(getContext().getExternalCacheDir(),"xlog")) - .setUseLocalTbsCore(true) - .setTbsCoreUrl("https://www-cdn.finclip.com/sdk/x5/latest/"); + .setUseLocalTbsCore(useLocalTbsCore) + .setTbsCoreUrl(tbsCoreUrl); // .setPageCountLimit(pageCountLimit); diff --git a/lib/mop.dart b/lib/mop.dart index fb94edf..02b325f 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -431,6 +431,9 @@ class Mop { String? customWebViewUserAgent, int? appletIntervalUpdateLimit, int? maxRunningApplet, + bool useLocalTbsCore = false, + String? tbsCoreUrl + }) async { List>? storeConfigs = finStoreConfigs?.map((e) => e.toMap()).toList(); @@ -451,7 +454,9 @@ class Mop { "uiConfig": uiConfig?.toMap(), "customWebViewUserAgent": customWebViewUserAgent, "appletIntervalUpdateLimit": appletIntervalUpdateLimit, - "maxRunningApplet": maxRunningApplet + "maxRunningApplet": maxRunningApplet, + "useLocalTbsCore": useLocalTbsCore, + "tbsCoreUrl": tbsCoreUrl }); return ret; }