补充finishRunningApplet接口

master
kangxuyao 2022-03-29 16:03:59 +08:00
parent 6a34c70efb
commit 956c1f7124
2 changed files with 11 additions and 3 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

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