1.update
parent
456b942ebd
commit
80c3a496b3
|
@ -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) {
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue