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 c0bf857..ec823b3 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,7 @@ public class BaseModule extends BaseApi { if (disablePermission == null) { disablePermission = false; } + String userId = ""; if (param.get("userId") != null) { userId = (String) param.get("userId"); diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/InitSDKModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/InitSDKModule.java index 8a61930..628a555 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/InitSDKModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/InitSDKModule.java @@ -178,7 +178,11 @@ public class InitSDKModule extends BaseApi { configBuilder.setXLogDir(logDir); } configBuilder.setEnablePreNewProcess((Boolean) configMap.get("enablePreNewProcess")); - + configBuilder.setUseLocalTbsCore((Boolean) configMap.get("useLocalTbsCore")); + String tbsCoreUrl = (String) configMap.get("tbsCoreUrl"); + if (tbsCoreUrl != null) { + configBuilder.setTbsCoreUrl(tbsCoreUrl); + } Map uiConfigMap = (Map) param.get("uiConfig"); String appendingCustomUserAgent = (String) uiConfigMap.get("appendingCustomUserAgent"); if (appendingCustomUserAgent != null) { diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/util/InitUtils.java b/android/src/main/java/com/finogeeks/mop/api/mop/util/InitUtils.java index 5279c98..ba2e082 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/util/InitUtils.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/util/InitUtils.java @@ -41,6 +41,7 @@ public class InitUtils { uiConfig.setHideFavoriteMenu((Boolean) map.get("isHideFavoriteMenu")); uiConfig.setHideSettingMenu((Boolean) map.get("isHideSettingMenu")); uiConfig.setHideTransitionCloseButton((Boolean) map.get("hideTransitionCloseButton")); + uiConfig.setUseNativeLiveComponent((Boolean) map.get("useNativeLiveComponent")); Map capsuleConfigMap = (Map) map.get("capsuleConfig"); if (capsuleConfigMap != null) { FinAppConfig.UIConfig.CapsuleConfig capsuleConfig = new FinAppConfig.UIConfig.CapsuleConfig(); diff --git a/example/pubspec.lock b/example/pubspec.lock index e2c9ced..c8e9952 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -169,7 +169,14 @@ packages: name: test_api url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.9" + version: "0.4.3" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.3.0" vector_math: dependency: transitive description: diff --git a/lib/mop.dart b/lib/mop.dart index df353a6..e2a769a 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -210,6 +210,14 @@ class Config { /// SDK的语言类型,默认为中文 LanguageType language = LanguageType.Chinese; + /// Android属性 + /// 是否使用本地加载tbs内核 + bool useLocalTbsCore = false; + + /// Android属性 + /// tbs内核的下载地址,不包含文件名 + String? tbsCoreUrl; + Config(this.finStoreConfigs); Map toMap() { @@ -252,6 +260,8 @@ class Config { "logDir": logDir, "enablePreNewProcess": enablePreNewProcess, "language":language.index, + "useLocalTbsCore": useLocalTbsCore, + "tbsCoreUrl": tbsCoreUrl, }; } } @@ -356,7 +366,7 @@ class UIConfig { /// 该手势禁用,不影响小程序里页面的侧滑返回上一页的功能 bool disableSlideCloseAppletGesture = false; - // 注入小程序统称appletText字符串,默认为“小程序”。 + /// 注入小程序统称appletText字符串,默认为“小程序”。 String? appletText; /// Android属性 @@ -401,6 +411,7 @@ class UIConfig { "disableSlideCloseAppletGesture": disableSlideCloseAppletGesture, "appletText": appletText, "loadingLayoutCls": loadingLayoutCls, + "useNativeLiveComponent": useNativeLiveComponent, }; } } @@ -990,7 +1001,7 @@ class Mop { UIConfig? uiConfig, String? customWebViewUserAgent, int? appletIntervalUpdateLimit, - int? maxRunningApplet, + int? maxRunningApplet }) async { List>? storeConfigs = finStoreConfigs?.map((e) => e.toMap()).toList(); @@ -1011,7 +1022,7 @@ class Mop { "uiConfig": uiConfig?.toMap(), "customWebViewUserAgent": customWebViewUserAgent, "appletIntervalUpdateLimit": appletIntervalUpdateLimit, - "maxRunningApplet": maxRunningApplet + "maxRunningApplet": maxRunningApplet, }); return ret; } diff --git a/pubspec.lock b/pubspec.lock index 7d68fe5..f39f99b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -42,14 +42,14 @@ packages: name: collection url: "https://pub.flutter-io.cn" source: hosted - version: "1.16.0" + version: "1.15.0" fake_async: dependency: transitive description: name: fake_async url: "https://pub.flutter-io.cn" source: hosted - version: "1.3.0" + version: "1.2.0" flutter: dependency: "direct main" description: flutter @@ -88,13 +88,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.12.11" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.1.4" meta: dependency: transitive description: @@ -108,7 +101,7 @@ packages: name: path url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.1" + version: "1.8.0" sky_engine: dependency: transitive description: flutter @@ -120,7 +113,7 @@ packages: name: source_span url: "https://pub.flutter-io.cn" source: hosted - version: "1.8.2" + version: "1.8.1" stack_trace: dependency: transitive description: @@ -155,14 +148,21 @@ packages: name: test_api url: "https://pub.flutter-io.cn" source: hosted - version: "0.4.9" + version: "0.4.3" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.3.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.2" + version: "2.1.1" sdks: - dart: ">=2.17.0-0 <3.0.0" + dart: ">=2.14.0 <3.0.0" flutter: ">=2.2.3"