master
wangzhaoyao 2023-01-11 16:31:12 +08:00
parent 456b942ebd
commit 80c3a496b3
3 changed files with 3 additions and 4 deletions

View File

@ -95,14 +95,14 @@
NSError *parseError = nil;
NSMutableDictionary *shareDic = [[NSMutableDictionary alloc] initWithDictionary:[self dictionaryRepresentation:appletInfo]];
[shareDic setValue:@{@"desc" : shareDic[@"originalInfo"][@"customData"][@"detailDescription"]} forKey:@"params"];
[shareDic setValue:contentInfo[@"query"] forKey:@"query"];
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:shareDic options:NSJSONWritingPrettyPrinted error:&parseError];
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
NSDictionary *arguments = @{
@"appId": contentInfo[@"appId"],
@"path": contentInfo[@"path"],
@"menuId": contentInfo[@"menuId"],
@"appInfo": jsonString,
@"query" : contentInfo[@"query"]
@"appInfo": jsonString
};
FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
[channel invokeMethod:@"extensionApi:onCustomMenuClick" arguments:arguments result:^(id _Nullable result) {

View File

@ -33,7 +33,7 @@ abstract class AppletHandler {
///
Future<void> onCustomMenuClick(
String appId, String path, String menuId, String appInfo, String query);
String appId, String path, String menuId, String appInfo);
///
Future<void> appletDidOpen(String appId);

View File

@ -608,7 +608,6 @@ class Mop {
params["path"],
params["menuId"],
params["appInfo"],
params["query"],
);
};
_appletHandlerApis["appletDidOpen"] = (params) async {