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

View File

@ -33,7 +33,7 @@ abstract class AppletHandler {
/// ///
Future<void> onCustomMenuClick( 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); Future<void> appletDidOpen(String appId);

View File

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