From 9a6e6b25febe30787e7fbbae75a4a7c16b7f14d1 Mon Sep 17 00:00:00 2001 From: wangyong Date: Wed, 15 Mar 2023 17:46:29 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9AX5=20CDN=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E5=81=9A=E6=88=90=E5=8F=AF=E9=85=8D=E7=BD=AE=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/finogeeks/mop/api/mop/BaseModule.java | 15 +++++++++++++-- lib/mop.dart | 7 ++++++- 2 files changed, 19 insertions(+), 3 deletions(-) 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; }