From 07ccc4ed4fa5398070c201508f68c326fe8232e5 Mon Sep 17 00:00:00 2001 From: Sean Date: Wed, 17 Jan 2024 18:07:27 +0800 Subject: [PATCH] xj --- ios/Classes/MopPlugin.m | 13 +++++++++++++ lib/mop.dart | 5 +++++ 2 files changed, 18 insertions(+) diff --git a/ios/Classes/MopPlugin.m b/ios/Classes/MopPlugin.m index 4b7e617..f6678f2 100644 --- a/ios/Classes/MopPlugin.m +++ b/ios/Classes/MopPlugin.m @@ -149,6 +149,19 @@ static MopPlugin *_instance; [PhizLanguageData sharedInstance].countryCode = cCode; [PhizLanguageData sharedInstance].languageCode = cLang; } + else if ([@"getMiniShareInfo" isEqualToString:call.method]) { + NSString *appId = call.arguments[@"appId"]; + FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; + [channel invokeMethod:@"extensionApi:forwardApplet" arguments:@{@"appletInfo":contentInfo} result:^(id _Nullable result2) { + if([result2 isKindOfClass:[FlutterError class]]|| [result2 isKindOfClass:[FlutterMethodNotImplemented class] ]) + { + result(nil); + }else + { + result(result); + } + }]; + } else { MOPApiRequest* request = [[MOPApiRequest alloc] init]; request.command = call.method; diff --git a/lib/mop.dart b/lib/mop.dart index 4d6c194..f45884f 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -1323,4 +1323,9 @@ class Mop { void moveCurrentAppletToFront() async { return await _channel.invokeMethod("moveCurrentAppletToFront"); } + + ///获取分享信息 + Future getMiniShareInfo(String appId) async { + return await _channel.invokeMethod("getMiniShareInfo", {"appId": appId}); + } }