diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/AppletManageModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/AppletManageModule.java index df67b0e..1903dce 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/AppletManageModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/AppletManageModule.java @@ -31,7 +31,7 @@ public class AppletManageModule extends BaseApi { @Override public String[] apis() { return new String[]{"currentApplet", "closeAllApplets", "clearApplets", "removeUsedApplet", "closeApplet", - "setActivityTransitionAnim", "sendCustomEvent", "callJS"}; + "setActivityTransitionAnim", "sendCustomEvent", "callJS","finishRunningApplet"}; } @Override @@ -58,6 +58,14 @@ public class AppletManageModule extends BaseApi { } else if (event.equals("closeAllApplets")) { FinAppClient.INSTANCE.getAppletApiManager().closeApplets(); callback.onSuccess(null); + }else if(event.equals("finishRunningApplet")){ + if (param.containsKey("appId") && param.get("appId") instanceof String) { + String appId = (String) param.get("appId"); + FinAppClient.INSTANCE.getAppletApiManager().finishRunningApplet(appId); + callback.onSuccess(null); + } else { + callback.onFail(null); + } } else if (event.equals("closeApplet")) { if (param.containsKey("appId") && param.get("appId") instanceof String) { String appId = (String) param.get("appId"); 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 1db0bb0..7f5d87b 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 @@ -83,8 +83,23 @@ public class BaseModule extends BaseApi { Gson gson = new Gson(); List finStoreConfigs = null; if (param.get("finStoreConfigs") != null) { - finStoreConfigs = gson.fromJson(gson.toJson(param.get("finStoreConfigs")), new TypeToken>() { - }.getType()); + finStoreConfigs = new ArrayList<>(); + List> configs = (List>) param.get("finStoreConfigs"); + for (Map config : configs) { + for (String key : config.keySet()) { + String sdkKey = (String) config.get("sdkKey"); + String sdkSecret = (String) config.get("sdkSecret"); + String apiUrl = (String) config.get("apiServer"); + String apmUrl = (String) config.get("apmServer"); + if (apmUrl == null) apmUrl = ""; + String fingerprint = (String) config.get("fingerprint"); + if (fingerprint == null) fingerprint = ""; + String encryptType = (String) config.get("cryptType"); + Boolean encryptServerData1 = (Boolean) config.get("encryptServerData"); + if (encryptServerData1 == null) encryptServerData1 = false; + finStoreConfigs.add(new FinStoreConfig(sdkKey, sdkSecret, apiUrl, apmUrl, "", fingerprint, encryptType, encryptServerData1)); + } + } } FinAppConfig.UIConfig uiConfig = null; if (param.get("uiConfig") != null) { diff --git a/ios/mop.podspec b/ios/mop.podspec index 7a375bc..3cbf61a 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.36.0-alpha20220323v02' - s.dependency 'FinAppletExt' , '2.36.0-alpha20220323v02' + s.dependency 'FinApplet' , '2.35.13' + s.dependency 'FinAppletExt' , '2.35.13' end diff --git a/publish.sh b/publish.sh index d05023b..d80f7c2 100755 --- a/publish.sh +++ b/publish.sh @@ -1,4 +1,4 @@ + flutter packages pub publish --dry-run --server=https://pub.dartlang.org -flutter packages pub publish --server=https://pub.dartlang.org - +flutter packages pub publish --server=https://pub.dartlang.org --force \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 3f09934..6fbcfbc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.35.11' +version: '2.35.14' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: