fix:不能正常接收菜单点击事件

master
xiaoyu 2021-03-04 16:09:04 +08:00
parent 761e78798b
commit c70cbf65b5
3 changed files with 2 additions and 3 deletions

View File

@ -182,7 +182,6 @@ public class AppletHandlerModule extends BaseApi {
handler.post(() -> { handler.post(() -> {
channel.invokeMethod("extensionApi:onCustomMenuClick", params); channel.invokeMethod("extensionApi:onCustomMenuClick", params);
}); });
callback.onSuccess(null);
} }
@Override @Override

View File

@ -34,6 +34,6 @@ abstract class AppletHandler {
Future<List<CustomMenu>> getCustomMenus(String appId); Future<List<CustomMenu>> getCustomMenus(String appId);
/// ///
Future onCustomMenuClick( Future<void> onCustomMenuClick(
String appId, String path, String menuId, String appInfo); String appId, String path, String menuId, String appInfo);
} }

View File

@ -180,7 +180,7 @@ class Mop {
print("registerAppletHandler getCustomMenus list $list"); print("registerAppletHandler getCustomMenus list $list");
return list; return list;
}; };
_extensionApis["onCustomMenuClick"] = (params) { _extensionApis["onCustomMenuClick"] = (params) async {
return handler.onCustomMenuClick( return handler.onCustomMenuClick(
params["appId"], params["path"], params["menuId"], params["appInfo"]); params["appId"], params["path"], params["menuId"], params["appInfo"]);
}; };