Merge branch 'master' of ssh://gitlab.finogeeks.club:2233/finclipsdk/finclip-flutter-sdk

* 'master' of ssh://gitlab.finogeeks.club:2233/finclipsdk/finclip-flutter-sdk:
  补充finishRunningApplet接口
  初始化接口finstoreConfig问题处理
  release: version:2.35.14
  初始化接口finstoreConfig问题处理
master
jizelin 2022-03-31 15:50:39 +08:00
commit 8dda415ffe
5 changed files with 31 additions and 8 deletions

View File

@ -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");

View File

@ -83,8 +83,23 @@ public class BaseModule extends BaseApi {
Gson gson = new Gson();
List<FinStoreConfig> finStoreConfigs = null;
if (param.get("finStoreConfigs") != null) {
finStoreConfigs = gson.fromJson(gson.toJson(param.get("finStoreConfigs")), new TypeToken<List<FinStoreConfig>>() {
}.getType());
finStoreConfigs = new ArrayList<>();
List<Map<String, Object>> configs = (List<Map<String, Object>>) param.get("finStoreConfigs");
for (Map<String, Object> 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) {

View File

@ -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

View File

@ -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

View File

@ -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: