From 0ac5a988dc6ca7bf9b5b4bf575551f87613ed8e8 Mon Sep 17 00:00:00 2001 From: Stewen <784547228@qq.com> Date: Tue, 22 Aug 2023 18:02:39 +0800 Subject: [PATCH] sync --- ios/Classes/Api/MOPAppletDelegate.m | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/ios/Classes/Api/MOPAppletDelegate.m b/ios/Classes/Api/MOPAppletDelegate.m index 79089ea..4d26aa7 100644 --- a/ios/Classes/Api/MOPAppletDelegate.m +++ b/ios/Classes/Api/MOPAppletDelegate.m @@ -75,17 +75,15 @@ - (NSArray> *)customMenusInApplet:(FATAppletInfo *)appletInfo atPath:(NSString *)path { NSLog(@"customMenusInApplet:%@,appletInfo=%@",path,appletInfo); - __block NSArray *list; - FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; - [channel invokeMethod:@"extensionApi:getCustomMenus" arguments:@{@"appId": appletInfo.appId} result:^(id _Nullable result) { - CFRunLoopStop(CFRunLoopGetMain()); - if ([result isKindOfClass:[NSArray class]]) { - list = result; - } - }]; - CFRunLoopRun(); + + NSDictionary *item1 = @{@"menuId": @"shareToChatPicId", @"title": @"Share to friends", @"image": @"miniChat", @"darkImage": @"miniChat", @"type": @"common"}; + NSDictionary *item2 = @{@"menuId": @"shareToOutsidePicId", @"title": @"Share to others", @"image": @"miniSend", @"darkImage": @"miniSend", @"type": @"common"}; + NSDictionary *item3 = @{@"menuId": @"shareQrcodePicId", @"title": @"Phiz code", @"image": @"qrCode", @"darkImage": @"qrCode", @"type": @"common"}; + NSDictionary *item4 = @{@"menuId": @"555", @"title": @"小程序支付测试4", @"image": @"qrCode", @"darkImage": @"qrCode", @"type": @"common"}; + NSArray *> *list = @[item1, item2, item3, item4]; NSLog(@"customMenusInApplet:%@,list=%@",path,list); + NSMutableArray *models = [NSMutableArray array]; for (NSDictionary *data in list) { MopCustomMenuModel *model = [[MopCustomMenuModel alloc] init]; @@ -115,6 +113,7 @@ return models; } + - (void)clickCustomItemMenuWithInfo:(NSDictionary *)contentInfo inApplet:(FATAppletInfo *)appletInfo completion:(void (^)(FATExtensionCode code, NSDictionary *result))completion { NSError *parseError = nil; NSMutableDictionary *shareDic = [[NSMutableDictionary alloc] initWithDictionary:[self dictionaryRepresentation:appletInfo]];